text
stringlengths
3
1.04M
package com.visionarysoftwaresolutions.smacker.api.meals; import com.visionarysoftwaresolutions.eventr.Observable; public interface ObservableMealLog extends Observable, MealLog { }
# Hymenoglossum cruentum C.Presl SPECIES #### Status ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
<?php return unserialize('a:1:{i:0;O:27:"Doctrine\\ORM\\Mapping\\Column":9:{s:4:"name";s:13:"observaciones";s:4:"type";s:4:"text";s:6:"length";N;s:9:"precision";i:0;s:5:"scale";i:0;s:6:"unique";b:0;s:8:"nullable";b:0;s:7:"options";a:0:{}s:16:"columnDefinition";N;}}');
You are able to rely on Handy Men Team to deliver the best expert services when it comes to Handyman in Lawton, MI. Our company has a team of competent experts and the most impressive technology available to present everything that you need. We make sure you get the most effective solutions, the right price, and the very best quality supplies. We can help you to make choices for your own task, reply to all your questions, and schedule an appointment with our experts when you contact us at 800-356-4092. Saving cash is a valuable part for your work. Still, saving cash should not indicate that you lose excellent quality on Handyman in Lawton, MI. We provide the best quality even while saving you money. We make use of the leading materials and techniques to be certain that your task is going to hold up against the years, and save you money with solutions which do not modify the high quality of the job. For instance, we are careful to stay away from costly mistakes, work promptly to conserve working hours, and make certain that you will enjoy the best bargains on materials and labor. If you wish to spend less, Handy Men Team is the service to call. Call 800-356-4092 to talk to our customer care associates, now. You have to be knowledgeable when it comes to Handyman in Lawton, MI. We will ensure that you know what can be expected. We take the unexpected surprises out of the picture through providing precise and detailed information. Step one will be to call us today by dialing 800-356-4092 to begin your project. During this phone call, you're going to get your questions responded to, and we'll arrange a time to commence work. We are going to work together with you throughout the entire process, and our staff is going to arrive promptly and prepared. Whenever you are planning a task for Handyman in Lawton, MI, there are several good reasons to work with Handy Men Team. Our supplies are of the highest quality, our money saving practices are helpful and powerful, and our client satisfaction scores cannot be beat. We appreciate your needs and objectives, and we're here to serve you using our skills. Call 800-356-4092 to connect with Handy Men Team and consider all of your needs concerning Handyman in Lawton.
How and to whom we will disclose such information. The information collected from you by Fortis may constitute 'personal information' or 'sensitive personal data or information' under the SPI Rules. Personal information is defined under the SPI Rules to mean any information that relates to a natural person, which, either directly or indirectly, in combination with other informationavailable or likely to be available with a body corporate, is capable of identifying such person. ContactingUsers for offering new products or services. Analyzing anonymized information for commercial use. You are responsible for maintaining the accuracy of the information you submit to us, such as your contact information provided as part of account registration. If your personal information changes, you may correct, deleteinaccuracies, or amend information by making the change on your profile information page on the Websites or App or by contacting us at [email protected]. We will make good faith efforts to make requested changes in our then active databases as soon as reasonably practicable. If you provide any information that is untrue, inaccurate, out of date or incomplete (or becomes untrue, inaccurate, out of date or incomplete), or Fortis has reasonable grounds to suspect that the information provided by you is untrue, inaccurate, out of date or incomplete, Fortis may, at its sole discretion, discontinue the provision of the Services to you. If you wish to cancel your account or request that we no longer use yourinformation to provide you services, contact us through [email protected]. We will retain your information for as long as your account with the Services is active and as needed to provide you the Services. We shall not retain such information for longer than is required for the purposes for which the information may lawfully be used or is otherwise required under any other law for the time being in force. After a period of time, your data may be anonymized and aggregated, and then may be held by us or our Partners as long as necessary for us to provide our Services effectively or improve the Services, but our use of the anonymized data will be solely for analytic purposes. Fortis may require the User to pay with a credit card, debit card,net banking or other online payment mechanisms for Services for which an amount(s) is/are payable. Fortis will collect such User's credit card number and/or other financial institution information such as bank account numbers and will use that information for the billing and payment processes, including but not limited to the use and disclosure of such credit card number and information to third parties as necessary to complete such billing operation. Verification of credit information, however, is accomplished solely by the User through the authentication process offered by a third party payment gateway. User's credit-card/debit card details are transacted upon secure sites of approved payment gateways which are digitally underencryption, thereby providing the highest possible degree of care as per current technology. User is advised, however, that internet technology is not full proof safe and User should exercise discretion on using the same. Due to the communications standards on the Internet, when a User or or anyone who visits the Website, we automatically receive the URL of the site from which anyone visits. We also receive the Internet Protocol (IP) address of each User's computer (or the proxy server a User used to access the World Wide Web), User's computer/ device operating system and type of web browser the User is using, email patterns, as well as the name of User's ISP. This information is used to analyze overall trends to help Fortis improve its Service. The linkage between User's IP address and User's personally identifiable information may be available to us or our Partners but is not shared with other third parties. Notwithstanding the above, we may share some of the aggregate findings (not the specific data) in anonymized form (i.e., non-personally identifiable) with advertisers, sponsors, investors, strategic partners, and others in order to help grow our business. In order to have access to all the features and benefits on our Website or App, a User must first create an account on our Website or App. To create an account, a User is required to provide the following information, which such User recognizes and expressly acknowledges is personal information allowing others, including Fortis, to identify the User: name, User ID, email address, address, date of birth, gender, phone number and password chosen by the User. Other optional information may be requested on the registration page. We may, in future, include other optional requests for information from the User to help us to customize the Services to deliver personalized information to the User. However, We assume your consent in relation to various matters, once you complete the registration process. The Services may enable a User to communicate with other Users or to post information to be accessed by others, whereupon other Users may collect such data. Such Users, including any moderators or administrators, are not authorized Fortis representatives or agents, and their opinions or statements do not necessarily reflect those of Fortis, and they are not authorized to bind Fortis to any contract. Fortis hereby expressly disclaims any liability for any reliance or misuse of such information that is made available by Users or visitors in such a manner. Fortis may periodically ask users to complete surveys asking about their experiences with features of the Websites, App nd Services. Our surveys may ask visitors for demographic information such as age, gender, and education. We use survey information for evaluation and quality improvement purposes, including helping Fortis to improve information and services offered. In addition, users giving feedback may be individually contacted for follow-up due to concerns raised during the course of such evaluation. Demographic information and Web log data may be stored for future evaluation and quality improvement activities. Comments or questions sent to us using email or secure messaging forms will be shared with our employees and health care professionals who are most able to address the comment or question. We will archive your messages once we have made our best effort to provide you with a complete and satisfactory response. Some of our services such as our automated appointment selection and prescription refill for Fortis generated prescriptions interact directly with other Fortis data systems. Data about your transaction may be stored in these systems, and available to people who test and support these systems. When you use a service on the Websites or the App to interact directly with Fortis health care professionals, some information you provide may be documented in your medical record, and available for use to guide your treatment as a patient. Our Websites and the App may include social media Features, such as the Facebook button. These Features may collect your IP address, which page you are visiting on our site, and may set a cookie to enable the Feature to function properly. Your interactions with these Features are governed by the privacy statement of the company providing them. If you are using the Websites or App, with your permission, we will use the geolocation feature of your mobile device or same or similar feature of the device you are using to access the Websites. When you download and use the App, we automatically collect information on the type of device you use, operating system version, and the device identifier. Fortis and our Partners do not share your location information with other any third party. You may opt out of location based services on your mobile phone by changing the relevant/ applicable setting at your device level. Fortis has implemented best international market practices and security policies, rules and technical measures to protect the personal data that it has under its control from unauthorised access, improper use or disclosure, unauthorised modification and unlawful destruction or accidental loss. However, for any data loss or theft due to unauthorized access to the User's electronic devices through which the User avails the Services, Fortis or its Partners shall not be held liable for any loss whatsoever incurred by the User. Fortis ensures it and its partners implement reasonable security practices and procedures that are commensurate with respect to the information being collected and the nature of Fortis's business. The reasonable security practices and procedures implemented by us include but are not limited to: encrypting data when it is on the move using industry standard practices, regularly changing production keys and password, secure access to all production servers, performing regular security updates on our servers and more. To the extent necessary to provide Users with the Services, Fortis may provide their personal information to third party contractors who work on behalf of or with Fortis to provideUsers with such Services, to help Fortis communicate withUsers or to maintain the Website or App. Generally these contractors do not have any independent right to share this information, however certain contractors who provide services on the Website, including the providers of online communications services, will have rights to use and disclose the personal information collected in connection with the provision of these Services in accordance with their own privacy policies. No sensitive personal data or information is automatically collected by Fortis from any casual visitors of this website, who are merely perusing the site. If you, as a casual visitor, have browsed any page of this Website prior to reading the privacy statements set out herein, and you do not agree with them, normally quitting the browser should ordinarily clear any temporary cookies installed by Fortis. We, however, encourage you to use the "clear cookies" functionality of your browsers to ensure such clearing / deletion, as Fortis cannot guarantee, predict or provide for the behaviour of the equipment of all the visitors of the Website. Your Personal Information is maintained by Fortis in electronic form on its or its employees and Partners equipment. Such information may also be converted to physical form from time to time. We take necessary precautions to protect your personal information both online and off-line, and implements reasonable security practices and measures including certain managerial, technical, operational and physical security control measures that are commensurate with respect to the information being collected and the nature of Fortis's business. No administrator at Fortis will have knowledge of your password. It is important for you to protect against unauthorized access to your password, your computer and your mobile phone or device. Be sure to log off from the Website when finished. Fortis and its Partners do not undertake any liability for any unauthorized use of your account and password. If you suspect any unauthorized use of your account, you must immediately notify Fortis by sending an email to [email protected]. You shall be liable to indemnify Fortis, its employees and Partners due to any loss suffered by them due to such unauthorized use of your account and password. Fortis makes all User information accessible to its employees only on aneed-to-know basis. Part of the functionality of the Services is assisting the patients, customers and other stakeholders (like doctors, labs, pharmacies, customer care executives and others) to access information relating to them. Fortis may, therefore, retain and submit all such records to the relevant patients, their doctors or other stakeholders. Notwithstanding the above, Fortis is not responsible for the confidentiality, security or distribution of your personal information by our Partners and third parties outside the scope of our agreement with such Partners and third parties. Further, Fortis and its Partners shall not be responsible for any breach of security or for any actions of any third parties or events that are beyond the reasonable control of Fortis and its Partners including, acts of government, computer hacking, unauthorised access to computer data and storage device,computer crashes, breach of security and encryption, poor quality of Internet service or telephone service of the User etc. If a User uses the Services or accesses the Website or uses the App after a notice of changes has been sent to such User or published on the Website, such User hereby provides his/her/its consent to the changed terms. Fortis strongly encourages parents and guardians to supervise the online activities of their minor children and consider using parental control tools available from online services and software manufacturers to help provide a child-friendlyonline environment. These tools also can prevent minors from disclosing their name, address, and other personally identifiable information online without parental permission. Although the Fortis Website, App and Services are not intended for use by minors, Fortis respects the privacy of minors who may inadvertently use the internet or the mobile application.
college being was having some problems getting the posts from our new authors up right away. This was a bug with my daily deals script which filtered out certain results from showing up on the homepage. I have disabled this part of the script for now so all posts will be immediately visible. Due to this however, the daily deals will also be showing up as regular stories. Hello very cool website!! Guy .. Excellent .. Wonderful .. I’ll bookmark your web site and take the feeds additionally…I’m happy to seek out a lot of useful information right here within the put up, we need work out more strategies on this regard, thanks for sharing.
The peak of wedding season can begin as early as March and last until the end of June. If you’re like most wedding planners, you’ve been putting together every element of the wedding for months now. But have you reserved your valet parking service? If not, you should go with a top-notch valet company that can customize your valet experience precisely the way you want it. This is why wedding planners across the Twin Cities Metro area choose Unparalleled Parking. Contact us today to secure your date. All weddings have food, music, flowers, and cake. Not every wedding offers valet service for the guests. Why not set yourself apart with the most appreciated element of your special day. When your guests arrive, they will be pleasantly surprised as one of our valet greeters opens the door and welcomes them to the event of the year. Long after the hors d'oeuvres have been forgotten, everybody will be talking about the valet service. Nothing is worse than guests running from the parking lot to the door during a downpour. Since Mother Nature’s schedule doesn’t always align with ours, a valet service ensures that, in spite of the weather conditions, your guests can keep their dignity intact, so to speak. We provide covered valet driveways so that all passengers have quick access to the front door without getting wet or weather-worn. If your wedding is in the metro area, you’ll need to consider the safety and security of your guests. Valet parking keeps attendees protected from traffic and criminal activity. It gives them quick passage to the building’s entrance and eliminates any possibility of harm. Weddings almost always have elderly guests who attend. Having highly trained professionals helping them in and out of their vehicles can prevent a potential accident. The transition from ceremony to reception can often cause traffic problems and delays. People often complain about how difficult it is to get to the reception hall. Valet parking can make the process happen more efficiently Unparalleled can retrieve each car and get each party on their way one at a time to ensure a smooth exit from the ceremony. If you need additional valet at the reception, we can have a second team in place, ready to receive guests. To make your wedding the one everyone will be talking about, hire Unparalleled Parking for complete valet parking service. We offer valet parking for businesses, corporate events, private parties, and weddings. We can schedule your date in advance and go over the details so that your wedding goes as planned. To reserve your wedding date, call us today at 651-300-1515, or you can message us at [email protected].
Specializing in the wispy, sparse and non-commital zen that defined 70s chill-folk-rock, this Cincy band makes elevator music for bongpackers old and young. They rarely deviate from a formula that nestles Blind Melon between Mountain and Belle & Sebastian – wait, I’m lying, there’s some Warlocks fuzz-rock in there too. What I’m trying to say, and failing miserably, is that the band is perfectly named: it’s strong and lithe, a little too sweet, blocky and chunky but simultaneously graceful. One thing you’ll walk away knowing for sure is that this is historically accurate acid folk-rock; there’s no way you won’t think things along the lines of “Jesus, did they have to chase the singer around with a butterfly net to get him to show up in the studio or what?” Reason for that is singer Jason Snell’s half-there-ness; it’s like early 70s Ozzy in ballad mode jamming with Canned Heat in endless variations on Going Up the Country, in other words about 70% of your basic Bonnaroo crowd would take to it like magpies to a roll of Reynolds Wrap. Disclosure: We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com, Amazon.co.uk and affiliated sites.
package operations_test import ( "encoding/json" "testing" "time" "github.com/omise/omise-go" "github.com/omise/omise-go/internal/testutil" . "github.com/omise/omise-go/operations" r "github.com/stretchr/testify/require" ) func TestRefund(t *testing.T) { const ( ChargeID = "chrg_test_4yq7duw15p9hdrjp8oq" TransactionID = "trxn_test_4yqmv79fzpy0gmz5mmq" RefundID = "rfnd_test_4yqmv79ahghsiz23y3c" ) client := testutil.NewFixedClient(t) refund := &omise.Refund{} client.MustDo(refund, &RetrieveRefund{ChargeID, RefundID}) r.Equal(t, RefundID, refund.ID) r.Equal(t, ChargeID, refund.Charge) r.Equal(t, TransactionID, refund.Transaction) refund = &omise.Refund{} client.MustDo(refund, &CreateRefund{ ChargeID: ChargeID, Amount: 10000, Void: false, }) r.Equal(t, RefundID, refund.ID) r.Equal(t, int64(10000), refund.Amount) err := client.Do(nil, &RetrieveRefund{ChargeID, "not_exist"}) r.Error(t, err) r.EqualError(t, err, "(404/not_found) refund 404 was not found") } func TestRefund_Network(t *testing.T) { testutil.Require(t, "network") client := testutil.NewTestClient(t) // create a charge so we can refund token := createTestToken(client) charge := createTestCharge(client, token) // list refunds on the charge list := &ListRefunds{ charge.ID, List{Limit: 100, From: time.Now().Add(-1 * time.Hour)}, } refunds := &omise.RefundList{} client.MustDo(refunds, list) r.Len(t, refunds.Data, 0) // create a half refund on the charge refund := &omise.Refund{} client.MustDo(refund, &CreateRefund{ ChargeID: charge.ID, Amount: charge.Amount >> 1, }) r.Equal(t, refund.Amount, charge.Amount>>1) r.Equal(t, refund.Currency, charge.Currency) // list refunds again which now contains the created refunds client.MustDo(refunds, list) r.Len(t, refunds.Data, 1) r.Equal(t, refunds.Data[0].ID, refund.ID) // retrieve refund by id, which should match what we already have. client.MustDo(refund, &RetrieveRefund{ ChargeID: charge.ID, RefundID: refund.ID, }) r.Equal(t, refunds.Data[0].ID, refund.ID) r.Equal(t, refunds.Data[0].Amount, refund.Amount) } func TestCreateRefundMarshal_WithMetadata(t *testing.T) { req := &CreateRefund{ ChargeID: "chrg_test_4yq7duw15p9hdrjp8oq", Amount: 10000, Void: false, Metadata: map[string]interface{}{ "color": "red", }, } expected := `{"amount":10000,"metadata":{"color":"red"}}` b, err := json.Marshal(req) r.Nil(t, err, "err should be nothing") r.Equal(t, expected, string(b)) } func TestCreateRefundMarshal_WithoutMetadata(t *testing.T) { req := &CreateRefund{ ChargeID: "chrg_test_4yq7duw15p9hdrjp8oq", Amount: 10000, } expected := `{"amount":10000}` b, err := json.Marshal(req) r.Nil(t, err, "err should be nothing") r.Equal(t, expected, string(b)) }
#--CORBA STUBS----------------------------------------------------------------- import ACSCOURSE_MOUNT__POA #--ACS Imports----------------------------------------------------------------- from Acspy.Servants.ContainerServices import ContainerServices from Acspy.Servants.ComponentLifecycle import ComponentLifecycle from Acspy.Servants.ACSComponent import ACSComponent #--ACS Error System Imports---------------------------------------------------- import ACSErrTypeACSCourseImpl class Mount1(ACSCOURSE_MOUNT__POA.Mount1, #CORBA stubs for IDL interface ACSComponent, #Base IDL interface ContainerServices, #Developer niceties ComponentLifecycle): #HLA stuff ''' Simple component implementation provided as a reference for developers. ''' def __init__(self): ''' Just call superclass constructors here. ''' ACSComponent.__init__(self) ContainerServices.__init__(self) return #------------------------------------------------------------------------------ #--Implementation of IDL methods----------------------------------------------- #------------------------------------------------------------------------------ def objfix(self, az, el): ''' Python implementation of IDL method. ''' if el<=90: self.getLogger().logInfo("objfix called with az="+str(az)+" and el="+str(el)) else: self.getLogger().logCritical("Wrong value for el "+str(el)) raise ACSErrTypeACSCourseImpl.TargetOutOfRangeExImpl() #------------------------------------------------------------------------------ #--Main defined only for generic testing--------------------------------------- #------------------------------------------------------------------------------ if __name__ == "__main__": import ACSErrTypeACSCourse print "Creating an object" g = Mount1() try: g.objfix(10,90) except ACSErrTypeACSCourse.TargetOutOfRangeEx, e: h = ACSErrTypeACSCourseImpl.TargetOutOfRangeExImpl(exception=e, create=0) h.Print() print "Done..."
package controllers; import models.User; import play.Play; import play.data.validation.Email; import play.data.validation.MinSize; import play.data.validation.Required; import play.data.validation.Validation; import play.mvc.Controller; public class Application extends Controller { public static void index() throws Throwable { if (Security.isConnected()) { Groups.index(); } else { String property = Play.configuration.getProperty("talks.limit"); Integer limit = Integer.parseInt(property); if (User.count() > limit) { Secure.login(); } else { render(); } } } public static void register(@Required String username, @Required String password, @Required String confirm, @Required @Email String email) throws Throwable { if (!Validation.hasErrors()) { if (confirm.equals(password)) { if (User.register(username, password, email)) { Groups.index(); } } } index(); } public static void verify(@Required Long id, @Required String code) throws Throwable { if (Validation.hasErrors()) { index(); } else { User user = User.findById(id); user.verify(code); Secure.login(); } } }
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to you 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * 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. */ package org.apache.geode.cache.lucene.internal.distributed; import static org.apache.geode.cache.Region.SEPARATOR; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.any; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.util.concurrent.TimeUnit; import org.junit.Before; import org.junit.Test; import org.junit.experimental.categories.Category; import org.mockito.ArgumentCaptor; import org.apache.geode.cache.Region; import org.apache.geode.cache.asyncqueue.internal.AsyncEventQueueImpl; import org.apache.geode.cache.execute.ResultSender; import org.apache.geode.cache.lucene.internal.InternalLuceneService; import org.apache.geode.cache.lucene.internal.LuceneIndexImpl; import org.apache.geode.internal.cache.InternalCache; import org.apache.geode.internal.cache.execute.InternalRegionFunctionContext; import org.apache.geode.test.junit.categories.LuceneTest; @Category({LuceneTest.class}) public class WaitUntilFlushedFunctionJUnitTest { String regionPath = SEPARATOR + "region"; String indexName = "index"; final EntryScore<String> r1_1 = new EntryScore<>("key-1-1", .5f); final EntryScore<String> r1_2 = new EntryScore<>("key-1-2", .4f); final EntryScore<String> r1_3 = new EntryScore<>("key-1-3", .3f); final EntryScore<String> r2_1 = new EntryScore<>("key-2-1", .45f); final EntryScore<String> r2_2 = new EntryScore<>("key-2-2", .35f); InternalRegionFunctionContext mockContext; ResultSender mockResultSender; Region<Object, Object> mockRegion; AsyncEventQueueImpl mockAEQ; InternalLuceneService mockService; LuceneIndexImpl mockIndex; WaitUntilFlushedFunctionContext waitArgs; private InternalCache mockCache; @Test public void testExecution() throws Exception { when(mockContext.getDataSet()).thenReturn(mockRegion); when(mockContext.getArguments()).thenReturn(waitArgs); when(mockContext.getResultSender()).thenReturn(mockResultSender); when(mockCache.getAsyncEventQueue(any())).thenReturn(mockAEQ); when(mockAEQ.waitUntilFlushed(10000, TimeUnit.MILLISECONDS)).thenReturn(true); WaitUntilFlushedFunction function = new WaitUntilFlushedFunction(); function.execute(mockContext); ArgumentCaptor<Boolean> resultCaptor = ArgumentCaptor.forClass(Boolean.class); verify(mockResultSender).lastResult(resultCaptor.capture()); Boolean result = resultCaptor.getValue(); assertTrue(result); } @Test public void testQueryFunctionId() { String id = new WaitUntilFlushedFunction().getId(); assertEquals(WaitUntilFlushedFunction.class.getName(), id); } @Before public void createMocksAndCommonObjects() throws Exception { mockContext = mock(InternalRegionFunctionContext.class); mockResultSender = mock(ResultSender.class); mockRegion = mock(Region.class); mockAEQ = mock(AsyncEventQueueImpl.class); mockIndex = mock(LuceneIndexImpl.class); mockService = mock(InternalLuceneService.class); mockCache = mock(InternalCache.class); waitArgs = new WaitUntilFlushedFunctionContext(indexName, 10000, TimeUnit.MILLISECONDS); when(mockRegion.getCache()).thenReturn(mockCache); when(mockRegion.getFullPath()).thenReturn(regionPath); when(mockCache.getService(any())).thenReturn(mockService); when(mockService.getIndex(eq("index"), eq(regionPath))).thenReturn(mockIndex); } }
Linux Kernelに「Apple Magic Keyboard over USB」に続き「Magic Keyboard over Bluetooth」パッチが追加。 | AAPL Ch. The Apple Magic Keyboard has worked with Linux already when using the USB-based connection, but not Bluetooth (though some have managed workarounds). Additionally, the Apple Magic Keyboard having the numeric keypad hasn’t worked with either USB or Bluetooth.Both of those Apple Magic Keyboard limitations are now overcome in the kernel with a small patch written by Google’s Sean O’Brien. Support already exists for the Magic Keyboard over USB connection. This patch adds support for the Magic Keyboard over Bluetooth connection, and for the Magic Keyboard with Numeric Keypad over Bluetooth and USB connection.
If you're looking for safety, space and style; the 2018 Hyundai Tucson is the SUV for you! Intelligently designed to give you the most functionality in a striking and exciting to drive package. Shopping for a 2018 Tucson near Atlanta, GA? Look no further than Nalley Hyundai in Lithonia. Our huge inventory of new and used vehicles give you several amazing options to choose from. Plus with our online finance application you can get the car buying process started right from the comfort of your own living room. If you have any questions about the 2018 Tucson or any of our other Hyundai vehicles, please contact our friendly sales team. They can help you schedule a test drive, figure out financing and more! The Hyundai Tucson is the perfect small SUV for anyone that wants a mix of style, safety and plenty of cargo space. With sleek curves and an available panoramic sunroof1 and HID headlights with dynamic bending light2 the Tucson demands attention. With two powerful engine options (2.0L 4-cylinder with 164 hp and 1.6 Turbo GDI with 175 hp) the Tucson gets the job done while still maintaining an impressive estimated 30 MPG highway3. Plus this road-ready SUV is stocked full of standard features including a 6-way adjustable drivers seat, 60/40 split rear seating for optimal cargo room, bluetooth, cruise control, rearview camera and remote keyless entry. The Tucson comes in five available trims including the SE, SEL, SEL Plus, Value and Limited. Decided on the 2018 Hyundai Tucson? Great choice! To make sure you're getting the best deal available, check out Hyundai's great incentives and our dealer offers online to find special lease and finance offers on your new Hyundai. Once you've nailed down your pricing, click over to our online trade evaluation tool and get a preliminary trade value in seconds. With the current incentives and your trade value combined, you could drive home in a new Tucson for less than you think! To finish up the process, use our online pre-qualification and financing application. You can even complete your vehicle purchase entirely online through the Nalley Push Start Program. All you have to do is choose the green "Buy Now" button on and vehicle on our website to get started! Don't trust your Hyundai to just any service technician. When you need maintenance or repair, be sure to make an appointment with the expertly trained and certified technicians at our state-of-the-art Service Center. Stocked with cutting-edge equipment, our entire facility was designed with your Hyundai in mind. Whether you need an oil change, brake service, alignment or battery replacement, our team has the know-how to handle any service on any model and year of vehicle. Easily schedule your appointment online to save time and to save money, check out our online service coupons! 1. Available on Value and Limited with Ultimate Package. 2. Available on Limited with Ultimate Package. 3. 2018 Tucson SE/SEL/SEL Plus FWD A/T: 23 City/30 Hwy/26 Combined. 2018 Tucson SE/SEL/SEL Plus AWD A/T: 21 City/26 Hwy/23 Combined. 2018 Tucson Limited FWD 25 City/30 Hwy/27: Combined. 2018 Tucson Limited AWD: 24 City/28 Hwy/25 Combined. EPA estimates. For comparison only. Your actual mileage may vary with options, driving conditions, driving habits and vehicle's condition.
Compliance Umbrella ("us", "we", or "our") operates http://www.ComplianceUmbrella.com (the "Site"). This page informs you of our policies regarding the collection, use and disclosure of Personal Information we receive from users of the Site. We use your Personal Information only for providing and improving the Site. By using the Site, you agree to the collection and use of information in accordance with this policy. To enroll and use our Site, we may ask you to provide us with certain personally identifiable information that can be used to contact or identify you. Personally identifiable information may include, but is not limited to your name, business address, employee names and email addresses, customer complaint information including customer’s name, contact information and email address, name of person’s having an ownership interest in your business, such as Shareholders, and Members of the Board of Directors ("Personal Information"). No data associated with you, your company, your employees, or your customers will be used or revealed to any third party for any reason or for any other commercial use by us without your express permission. All data associated with your account is considered your property. We claim no use or rights in your data. If your account is terminated, all your data will be returned to you and deleted by us. Such deleted data will be destroyed using data security best practices. We reserve the right to archive the data from terminated accounts offline if this is specifically required by law, or necessary for a valid business purpose, but this data will never be released to third parties without your express consent. Cookies are files with small amounts of data, which may include an anonymous unique identifier. Cookies are sent to your browser from a web site and stored on your computer's hard drive. Like many sites, we use "cookies" to collect information. You will need to use all portions of the Site and this will require you to accept cookies from ComplianceUmbrella.com. No other use whatsoever of any of your data will occur or be transacted by ComplianceUmbrella.com . The security of your Personal Information is important to us, but remember that no method of transmission over the Internet, or method of electronic storage, is 100% secure. While we strive to use commercially acceptable means to protect your Personal Information, we cannot guarantee its absolute security. It is our intention and our policy to remain strictly confidential with all data presented to and by your Company.
<?php /* $Id: mypeerresults.php 1761 2014-05-24 13:17:31Z hom $ */ requireCap(CAP_DEFAULT); require_once('tutorhelper.php'); require_once('simplequerytable.php'); require_once('makeinput.php'); require_once 'navigation2.php'; $judge=$judge; $sql="select * from student_email where snummer=$judge"; $resultSet=$dbConn->Execute($sql); if ($resultSet === false) { print "error fetching judge data with $sql : ".$dbConn->ErrorMsg()."<br/>\n"; } if (!$resultSet->EOF) extract($resultSet->fields,EXTR_PREFIX_ALL,'judge'); $student_data="$judge_roepnaam $judge_tussenvoegsel $judge_achternaam ($judge_snummer)"; $page_opening='All peer assessment results for '.$student_data; $page=new PageContainer(); $page->setTitle($page_opening); $nav=new Navigation($tutor_navtable, basename(__FILE__), $page_opening); $nav->setInterestMap($tabInterestCount); $nav->addLeftNavText(file_get_contents('news.html')); ob_start(); tutorHelper($dbConn,$isTutor); $page->addBodyComponent(new Component(ob_get_clean())); $page->addBodyComponent($nav); ob_start(); ?> <div style='padding:1em'> <h2>This page informs you about your peer assessment results of all assessments</h2> <p>All assessment results for <b><?=$student_data?></b></p> <fieldset><legend>Group membership</legend> <?php $lang='\''.$lang.'\''; $sql="select year,afko,description,milestone,grp_num,criterium as crit_num,". " case \n". " when $lang='de' then de_short\n". " when $lang='nl' then nl_short\n". " else en_short\n". " end as criterium\n,". " round(grade,2)||'('||round(grp_avg,2)||')' as grade,\n". " round(multiplier,2) as muliplier\n". " from my_peer_results_2 mr join project using(prj_id)\n". " where snummer=$snummer and assessment_complete = true order by year desc,prj_id,milestone,criterium"; $resultSet= $dbConn->Execute($sql); if ($resultSet === false) { $dbConn->log('Error '.$dbConn->ErrorMsg()." with ".$sql); } else { simpletable($dbConn,$sql, "<table summary='group memership' ". "border='1' style='border-collapse:collapse;background:white;border:1px 1px;' >\n"); // $dbConn->log($sql); } ?> </fieldset> </div> </td></tr></table> <!-- db_name=<?=$db_name?> --> <?php $page->addBodyComponent( new Component(ob_get_clean())); $page->show(); ?>
Is business charge card useful? ‘Yes’ -may be the answer that’s arrives quickly. That’s true a minimum of for many companies (especially smaller businesses). Before we delve much deeper into how business charge cards are useful, let us try to know very well what a company charge card is. Quite simply, a company charge card is really a charge card that’s possessed with a business and never a person. To know this better, you can just draw an example between your business charge cards and business accounts, that are within the title from the business too. Apart from that, business charge cards operate in virtually exactly the same fashion because the personal charge cards having a couple of exceptions. These exceptions are by means of versatility in borrowing limit, low APRs plus some more complex benefits that are offered to business charge cards only. Even from exactly that, business charge cards appear a great proposition. However, business charge cards could be attractive even without individuals benefits since the primary benefit lies elsewhere. The large-large take advantage of a company charge card is realized when it comes to business expense accounting. For many smaller businesses, business expense accounting is really a large overhead. With business charge cards, this really is handled effortlessly – you just need to make sure that you make all of your business expenses in your business charge card and allow the personal expenses be around the personal charge card i.e. segregation of personal and business expenses is all that you should do. Therefore the bill for the business charge card may have all of the business expenses onto it and also you wouldn’t have to collate the various bills or straighten out the products out of your personal charge card bill. The important thing here’s to make certain that you employ your company charge card for your business expenses (or around you are able to). Furthermore, lots of business charge card providers understand this necessity of small company as well as organise the company charge card bills in ways that fits the accounting needs of those companies. So mostly, they’ll properly group the price around the business charge card bill in order to facilitate business expense accounting. Actually, a few of the business charge card providers visit a degree of supplying the debts inside a format that are obtainable and released for an accounting system i.e. you don’t have to go into the data by hand inside your accounting system. Just in case the format isn’t appropriate for the accounting system, you are able to employ a software professional to create a little quick program to morph it into a appropriate format. Thus only one reason – ‘facilitation of economic expense accounting’, is sufficient to offer the situation of small company charge cards. Does anybody do that and just how much are you able to earn? Can there be any options for financial loans or business card printing? My Opportunity hasn’t even began yet. I needed to buy merchandise without obtaining a loan. I’m not sure how to proceed – help. My opportunity is definitely an LLC Online only. I have only a web-based store. Can One buy stuff having a personal charge card and write them back for tax reasons or will i require a Business Charge Card? I’m constantly receiving business card printing on my small door. I understand occasions are difficult, but it’s getting annoying, Can’t this kind of activity be reported/avoided? Let me get 250 color business card printing with Ultra violet coating on sides or on one for reds. I’ve read bad reviews of lots of online ink jet printers. Can someone let me know the very best one with great service at an inexpensive? Basically desired to own small company and have the ability to charge charge cards, just how much wouldn’t it require me to pay for every transaction and also to really arrange it? Also, if the clients are internationally, would the little costs apply?
namespace Ioke.Lang { using System; using System.Globalization; using Ioke.Math; public class Decimal : IokeData { private readonly BigDecimal value; public static BigDecimal GetValue(object number) { return ((Decimal)IokeObject.dataOf(number)).value; } public Decimal(string textRepresentation) { this.value = new BigDecimal(textRepresentation); } public Decimal(BigDecimal value) { this.value = value; } public static Decimal CreateDecimal(string val) { return new Decimal(val); } public static Decimal CreateDecimal(RatNum val) { return new Decimal(new BigDecimal(val.longValue())); } public static Decimal CreateDecimal(BigDecimal val) { return new Decimal(val); } public string AsNativeString() { string s = value.ToString(MathContext.PLAIN); if(s[s.Length-1] == '0' && s.IndexOf('.') != -1 && s.IndexOf('e') == -1 && s.IndexOf('E') == -1) { int end = s.Length-1; while(s[end] == '0' && s[end-1] != '.') end--; if(s[end-1] == '.') end++; return s.Substring(0, end); } return s; } public override string ToString() { return AsNativeString(); } public override string ToString(IokeObject obj) { return AsNativeString(); } public override IokeObject ConvertToRational(IokeObject self, IokeObject m, IokeObject context, bool signalCondition) { System.Console.Error.WriteLine("convertorational should be implemented"); throw new Exception("TODO: implement"); } public override IokeObject ConvertToDecimal(IokeObject self, IokeObject m, IokeObject context, bool signalCondition) { return self; } public static string GetInspect(object on) { return ((Decimal)(IokeObject.dataOf(on))).Inspect(on); } public string Inspect(object obj) { return AsNativeString(); } public override void Init(IokeObject obj) { Runtime runtime = obj.runtime; obj.Kind = "Number Decimal"; runtime.Decimal = obj; obj.RegisterMethod(runtime.NewNativeMethod("returns true if the left hand side decimal is equal to the right hand side decimal.", new TypeCheckingNativeMethod("==", TypeCheckingArgumentsDefinition.builder() .ReceiverMustMimic(runtime.Decimal) .WithRequiredPositional("other") .Arguments, (method, on, args, keywords, context, message) => { Decimal d = (Decimal)IokeObject.dataOf(on); object other = args[0]; return ((other is IokeObject) && (IokeObject.dataOf(other) is Decimal) && ((on == context.runtime.Decimal && other == on) || d.value.Equals(((Decimal)IokeObject.dataOf(other)).value))) ? context.runtime.True : context.runtime.False; }))); obj.RegisterMethod(runtime.NewNativeMethod("Returns a text representation of the object", new TypeCheckingNativeMethod.WithNoArguments("asText", obj, (method, on, args, keywords, context, message) => { return runtime.NewText(on.ToString()); }))); obj.RegisterMethod(obj.runtime.NewNativeMethod("Returns a text inspection of the object", new TypeCheckingNativeMethod.WithNoArguments("inspect", obj, (method, on, args, keywords, context, message) => { return method.runtime.NewText(Decimal.GetInspect(on)); }))); obj.RegisterMethod(obj.runtime.NewNativeMethod("Returns a brief text inspection of the object", new TypeCheckingNativeMethod.WithNoArguments("notice", obj, (method, on, args, keywords, context, message) => { return method.runtime.NewText(Decimal.GetInspect(on)); }))); obj.RegisterMethod(obj.runtime.NewNativeMethod("returns a hash for the decimal number", new NativeMethod.WithNoArguments("hash", (method, context, message, on, outer) => { outer.ArgumentsDefinition.CheckArgumentCount(context, message, on); return context.runtime.NewNumber(Decimal.GetValue(on).GetHashCode()); }))); obj.RegisterMethod(runtime.NewNativeMethod("compares this number against the argument, true if this number is the same, otherwise false", new TypeCheckingNativeMethod("==", TypeCheckingArgumentsDefinition.builder() .ReceiverMustMimic(obj) .WithRequiredPositional("other") .Arguments, (method, on, args, keywords, context, message) => { object arg = args[0]; if(IokeObject.dataOf(arg) is Number) { return (Decimal.GetValue(on).CompareTo(Number.GetValue(arg).AsBigDecimal()) == 0) ? context.runtime.True : context.runtime.False; } else if(IokeObject.dataOf(arg) is Decimal) { return (Decimal.GetValue(on).CompareTo(Decimal.GetValue(arg)) == 0) ? context.runtime.True : context.runtime.False; } else { return context.runtime.False; } }))); obj.RegisterMethod(runtime.NewNativeMethod("compares this number against the argument, returning -1, 0 or 1 based on which one is larger. if the argument is a rational, it will be converted into a form suitable for comparing against a decimal, and then compared. if the argument is neither a Rational nor a Decimal, it tries to call asDecimal, and if that doesn't work it returns nil.", new TypeCheckingNativeMethod("<=>", TypeCheckingArgumentsDefinition.builder() .ReceiverMustMimic(obj) .WithRequiredPositional("other") .Arguments, (method, on, args, keywords, context, message) => { object arg = args[0]; IokeData data = IokeObject.dataOf(arg); if(data is Number) { return context.runtime.NewNumber(Decimal.GetValue(on).CompareTo(Number.GetValue(arg).AsBigDecimal())); } else { if(!(data is Decimal)) { arg = IokeObject.ConvertToDecimal(arg, message, context, false); if(!(IokeObject.dataOf(arg) is Decimal)) { // Can't compare, so bail out return context.runtime.nil; } } if(on == context.runtime.Decimal || arg == context.runtime.Decimal) { if(arg == on) { return context.runtime.NewNumber(0); } return context.runtime.nil; } return context.runtime.NewNumber(Decimal.GetValue(on).CompareTo(Decimal.GetValue(arg))); } }))); obj.RegisterMethod(runtime.NewNativeMethod("returns the difference between this number and the argument. if the argument is a rational, it will be converted into a form suitable for subtracting against a decimal, and then subtracted. if the argument is neither a Rational nor a Decimal, it tries to call asDecimal, and if that fails it signals a condition.", new TypeCheckingNativeMethod("-", TypeCheckingArgumentsDefinition.builder() .ReceiverMustMimic(obj) .WithRequiredPositional("subtrahend") .Arguments, (method, on, args, keywords, context, message) => { object arg = args[0]; IokeData data = IokeObject.dataOf(arg); if(data is Number) { return context.runtime.NewDecimal(Decimal.GetValue(on).subtract(Number.GetValue(arg).AsBigDecimal())); } else { if(!(data is Decimal)) { arg = IokeObject.ConvertToDecimal(arg, message, context, true); } return context.runtime.NewDecimal(Decimal.GetValue(on).subtract(Decimal.GetValue(arg))); } }))); obj.RegisterMethod(runtime.NewNativeMethod("returns the sum of this number and the argument. if the argument is a rational, it will be converted into a form suitable for addition against a decimal, and then added. if the argument is neither a Rational nor a Decimal, it tries to call asDecimal, and if that fails it signals a condition.", new TypeCheckingNativeMethod("+", TypeCheckingArgumentsDefinition.builder() .ReceiverMustMimic(obj) .WithRequiredPositional("addend") .Arguments, (method, on, args, keywords, context, message) => { object arg = args[0]; IokeData data = IokeObject.dataOf(arg); if(data is Number) { return context.runtime.NewDecimal(Decimal.GetValue(on).add(Number.GetValue(arg).AsBigDecimal())); } else { if(!(data is Decimal)) { arg = IokeObject.ConvertToDecimal(arg, message, context, true); } return context.runtime.NewDecimal(Decimal.GetValue(on).add(Decimal.GetValue(arg))); } }))); obj.RegisterMethod(runtime.NewNativeMethod("returns the product of this number and the argument. if the argument is a rational, the receiver will be converted into a form suitable for multiplying against a decimal, and then multiplied. if the argument is neither a Rational nor a Decimal, it tries to call asDecimal, and if that fails it signals a condition.", new TypeCheckingNativeMethod("*", TypeCheckingArgumentsDefinition.builder() .ReceiverMustMimic(obj) .WithRequiredPositional("multiplier") .Arguments, (method, on, args, keywords, context, message) => { object arg = args[0]; IokeData data = IokeObject.dataOf(arg); if(data is Number) { return context.runtime.NewDecimal(Decimal.GetValue(on).multiply(Number.GetValue(arg).AsBigDecimal())); } else { if(!(data is Decimal)) { arg = IokeObject.ConvertToDecimal(arg, message, context, true); } return context.runtime.NewDecimal(Decimal.GetValue(on).multiply(Decimal.GetValue(arg))); } }))); obj.RegisterMethod(runtime.NewNativeMethod("returns the quotient of this number and the argument.", new TypeCheckingNativeMethod("/", TypeCheckingArgumentsDefinition.builder() .ReceiverMustMimic(obj) .WithRequiredPositional("divisor") .Arguments, (method, on, args, keywords, context, message) => { object arg = args[0]; IokeData data = IokeObject.dataOf(arg); if(data is Number) { return context.runtime.NewDecimal(Decimal.GetValue(on).divide(Number.GetValue(arg).AsBigDecimal())); } else { if(!(data is Decimal)) { arg = IokeObject.ConvertToDecimal(arg, message, context, true); } while(Decimal.GetValue(arg).CompareTo(BigDecimal.ZERO) == 0) { IokeObject condition = IokeObject.As(IokeObject.GetCellChain(context.runtime.Condition, message, context, "Error", "Arithmetic", "DivisionByZero"), context).Mimic(message, context); condition.SetCell("message", message); condition.SetCell("context", context); condition.SetCell("receiver", on); object[] newCell = new object[]{arg}; context.runtime.WithRestartReturningArguments(()=>{context.runtime.ErrorCondition(condition);}, context, new IokeObject.UseValue("newValue", newCell)); arg = newCell[0]; } BigDecimal result = null; try { result = Decimal.GetValue(on).divide(Decimal.GetValue(arg), BigDecimal.ROUND_UNNECESSARY); } catch(System.ArithmeticException) { result = Decimal.GetValue(on).divide(Decimal.GetValue(arg), MathContext.DECIMAL128); } return context.runtime.NewDecimal(result); } }))); } } }
At least 213 people have been killed since July 21, 2017 in India's state of Gujarat after extremely heavy monsoon rains hit the state causing severe flooding. Hundreds of cities and villages were devastated and more than 130 000 people evacuated. Gujarat authorities said the state's death toll, which jumped by 90 in the past day as floodwaters started to recede from low-lying areas, was likely to increase as new victims were discovered. "Only after a postmortem is conducted we can officially confirm the death of a person," an official at the Gujarat emergency control room told Agence France-Presse. "Since many bodies were found, postmortems took time, hence the sudden jump in numbers." According to Times of India, the maximum deaths have happened since July 21 in Banaskantha district that was pounded by incessant rainfall and due to a release of massive quantity of water from the local dams later. Control room sources said that 61 deaths, mostly due to drowning, have been reported from Banaskantha alone. "This is the worst flood of the century in Banaskantha," Chief Minister Vijay Rupani said. Lightning storms in Odisha and another state, Jharkhand, killed 21 people on Monday, July 31 with more inclement weather expected throughout this week. Most of the victims were working in fields when lightning struck them, disaster management authority officials said.
exports.definition = { config: { adapter: { type: "properties", collection_name: "zzEventsEventViewerModel" } }, extendModel: function(Model) { _.extend(Model.prototype, { // extended functions and properties go here }); return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype, { // extended functions and properties go here // For Backbone v1.1.2, uncomment the following to override the // fetch method to account for a breaking change in Backbone. /* fetch: function(options) { options = options ? _.clone(options) : {}; options.reset = true; return Backbone.Collection.prototype.fetch.call(this, options); } */ }); return Collection; } };
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>R-tree free functions (boost::geometry::index::)</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> <link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Geometry"> <link rel="up" href="../spatial_indexes.html" title="Spatial Indexes"> <link rel="prev" href="boost__geometry__index__rtree/get_allocator__.html" title="get_allocator()"> <link rel="next" href="group__rtree__functions/insert_rtree_________value_const___.html" title="insert(rtree&lt;...&gt; &amp;, Value const &amp;)"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="boost__geometry__index__rtree/get_allocator__.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../spatial_indexes.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="group__rtree__functions/insert_rtree_________value_const___.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="geometry.reference.spatial_indexes.group__rtree__functions"></a><a class="link" href="group__rtree__functions.html" title="R-tree free functions (boost::geometry::index::)">R-tree free functions (boost::geometry::index::)</a> </h4></div></div></div> <div class="toc"><dl> <dt><span class="section"><a href="group__rtree__functions/insert_rtree_________value_const___.html">insert(rtree&lt;...&gt; &amp;, Value const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/insert_rtree_________iterator__iterator_.html">insert(rtree&lt;...&gt; &amp;, Iterator, Iterator)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/insert_rtree_________convertibleorrange_const___.html">insert(rtree&lt;...&gt; &amp;, ConvertibleOrRange const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/remove_rtree_________value_const___.html">remove(rtree&lt;...&gt; &amp;, Value const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/remove_rtree_________iterator__iterator_.html">remove(rtree&lt;...&gt; &amp;, Iterator, Iterator)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/remove_rtree_________convertibleorrange_const___.html">remove(rtree&lt;...&gt; &amp;, ConvertibleOrRange const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/query_rtree______const____predicates_const____outiter_.html">query(rtree&lt;...&gt; const &amp;, Predicates const &amp;, OutIter)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/qbegin_rtree______const____predicates_const___.html">qbegin(rtree&lt;...&gt; const &amp;, Predicates const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/qend_rtree______const___.html">qend(rtree&lt;...&gt; const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/begin_rtree______const___.html">begin(rtree&lt;...&gt; const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/end_rtree______const___.html">end(rtree&lt;...&gt; const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/clear_rtree________.html">clear(rtree&lt;...&gt; &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/size_rtree______const___.html">size(rtree&lt;...&gt; const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/empty_rtree______const___.html">empty(rtree&lt;...&gt; const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/bounds_rtree______const___.html">bounds(rtree&lt;...&gt; const &amp;)</a></span></dt> <dt><span class="section"><a href="group__rtree__functions/swap_rtree_________rtree________.html">swap(rtree&lt;...&gt; &amp;, rtree&lt;...&gt; &amp;)</a></span></dt> </dl></div> <h6> <a name="geometry.reference.spatial_indexes.group__rtree__functions.h0"></a> <span><a name="geometry.reference.spatial_indexes.group__rtree__functions.functions"></a></span><a class="link" href="group__rtree__functions.html#geometry.reference.spatial_indexes.group__rtree__functions.functions">Functions</a> </h6> <div class="informaltable"><table class="table"> <colgroup> <col> <col> </colgroup> <thead><tr> <th> <p> Function </p> </th> <th> <p> Description </p> </th> </tr></thead> <tbody> <tr> <td> <p> <a class="link" href="group__rtree__functions/insert_rtree_________value_const___.html#group__rtree__functions_1gada4f62111ed22eb2860ea30995c1ce60"><code class="computeroutput"><span class="identifier">insert</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="special">&amp;,</span> <span class="identifier">Value</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Insert a value to the index. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/insert_rtree_________iterator__iterator_.html#group__rtree__functions_1ga056469ea699e609e67762fe1b789997f"><code class="computeroutput"><span class="identifier">insert</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="special">&amp;,</span> <span class="identifier">Iterator</span><span class="special">,</span> <span class="identifier">Iterator</span><span class="special">)</span></code></a> </p> </td> <td> <p> Insert a range of values to the index. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/insert_rtree_________convertibleorrange_const___.html#group__rtree__functions_1gab4edad000d63eb103f2dad3813ceb2b3"><code class="computeroutput"><span class="identifier">insert</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="special">&amp;,</span> <span class="identifier">ConvertibleOrRange</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Insert a value created using convertible object or a range of values to the index. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/remove_rtree_________value_const___.html#group__rtree__functions_1gaf353d90fd933e6110b031f63166fb45a"><code class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="special">&amp;,</span> <span class="identifier">Value</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Remove a value from the container. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/remove_rtree_________iterator__iterator_.html#group__rtree__functions_1gaa460a8985496cf133f63f245527ac6e7"><code class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="special">&amp;,</span> <span class="identifier">Iterator</span><span class="special">,</span> <span class="identifier">Iterator</span><span class="special">)</span></code></a> </p> </td> <td> <p> Remove a range of values from the container. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/remove_rtree_________convertibleorrange_const___.html#group__rtree__functions_1ga700c922f8b4d5ebd073e999e12b55249"><code class="computeroutput"><span class="identifier">remove</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="special">&amp;,</span> <span class="identifier">ConvertibleOrRange</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Remove a value corresponding to an object convertible to it or a range of values from the container. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/query_rtree______const____predicates_const____outiter_.html#group__rtree__functions_1gadb43b211d5d743ebe2ef256328286e95"><code class="computeroutput"><span class="identifier">query</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="keyword">const</span> <span class="special">&amp;,</span> <span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;,</span> <span class="identifier">OutIter</span><span class="special">)</span></code></a> </p> </td> <td> <p> Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/qbegin_rtree______const____predicates_const___.html#group__rtree__functions_1ga45c2b7b112bf730d10367e10df62aa3c"><code class="computeroutput"><span class="identifier">qbegin</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="keyword">const</span> <span class="special">&amp;,</span> <span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Returns the query iterator pointing at the begin of the query range. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/qend_rtree______const___.html#group__rtree__functions_1ga5c9a1eb0421bf2c702392247d48143e5"><code class="computeroutput"><span class="identifier">qend</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Returns the query iterator pointing at the end of the query range. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/begin_rtree______const___.html#group__rtree__functions_1ga2467dc6ac90303496abd6ebd136eba18"><code class="computeroutput"><span class="identifier">begin</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Returns the iterator pointing at the begin of the rtree values range. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/end_rtree______const___.html#group__rtree__functions_1ga8fd1e53d8492643cbc9840ff715bb736"><code class="computeroutput"><span class="identifier">end</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Returns the iterator pointing at the end of the rtree values range. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/clear_rtree________.html#group__rtree__functions_1gabaca6c24c3838a8164aa3700c459e7a4"><code class="computeroutput"><span class="identifier">clear</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Remove all values from the index. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/size_rtree______const___.html#group__rtree__functions_1gaa19a09e7b5f0a86a4b74ef2342de1d68"><code class="computeroutput"><span class="identifier">size</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Get the number of values stored in the index. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/empty_rtree______const___.html#group__rtree__functions_1gaba44e2fb12fdc7b528bfee56a88e0844"><code class="computeroutput"><span class="identifier">empty</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Query if there are no values stored in the index. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/bounds_rtree______const___.html#group__rtree__functions_1ga4e43e7720c66e88959ff511a7462a3ff"><code class="computeroutput"><span class="identifier">bounds</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="keyword">const</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Get the box containing all stored values or an invalid box if the index has no values. </p> </td> </tr> <tr> <td> <p> <a class="link" href="group__rtree__functions/swap_rtree_________rtree________.html#group__rtree__functions_1gaa1250318a78d7e27ba8f3537eb0ddb3f"><code class="computeroutput"><span class="identifier">swap</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="special">&amp;,</span> <span class="identifier">rtree</span><span class="special">&lt;...&gt;</span> <span class="special">&amp;)</span></code></a> </p> </td> <td> <p> Exchanges the contents of the container with those of other. </p> </td> </tr> </tbody> </table></div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2009-2015 Barend Gehrels, Bruno Lalande, Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its affiliates<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="boost__geometry__index__rtree/get_allocator__.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../spatial_indexes.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="group__rtree__functions/insert_rtree_________value_const___.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>
On Sunday night at 1 AM, in an extremely rare weekend sitting in Ontario’s legislature, chants from protesters huddled outside could be heard echoing through the walls of Queen’s Park and into the chambers where Ford was ramming through his “total power” bill (Bill 31). If it passes, it means Ford gets to meddle in Toronto’s election, even though the Ontario’s Superior Court ruled this was unconstitutional. In essence, it puts Ford above the law and our constitution. The most strategic thing you can do right now is let your Conservative MPP know that as a voter, you will judge their silence too. We know that MPPs take emails from constituents seriously, and tally up the number that support or oppose. With the final vote coming down in just 48 hours, we need as many people to speak out as possible. Will you spend 2 minutes to send an email to your MPP demanding they stand up to Ford and vote NO on Thursday? We’ve prewritten an email for you, it only takes a few clicks. Ford's trying to override our Charter rights to concentrate his power. Call on your MPP to oppose this dangerous move before it's too late. Dear MPP, I’m writing to urge you to vote NO to the upcoming vote on Bill 31. I’m appealing to your reason, and to your conscience on this. I know that you understand the gravity of what Ford is doing, and the implications it will have on our shared democracy. Suspending Charter Rights in order to interfere in democratic elections is what we expect of autocratic governments seeking to concentrate their power, not democracies built on the rule of law. Legal societies, former Conservative leaders, and even architects of Canada’s constitution have strongly condemned this move, and made it clear that “history will judge the silence” of those who don’t stand up to Ford on this. Please be a leader and stand up for the rule of law and our Charter of Rights and Freedoms. Vote NO to Bill 31. Leadnow is sustained by thousands of small, individual donations from across the country. Can you chip in to help us ramp up our campaign to stop Ford's attack on our democracy?
<HTML> <TITLE>Priki, Prevalent Wiki</TITLE> <body onload="document.location.href='wiki/Front Page'"> </BODY> </HTML>
In other words, $31,000 in 1913 is equivalent in purchasing power to about $795,986.06 in 2019, a difference of $764,986.06 over 106 years. The 1913 inflation rate was 2.06%. The current inflation rate (2018 to 2019) is now 1.86%1. If this number holds, $31,000 today will be equivalent in buying power to $31,577.38 next year. The current inflation rate page gives more detail on the latest official inflation rates. This chart shows calculation of buying power equivalence, often referred to as "the value of a dollar" over time for $31,000 in 1913 (price index tracking began in 1635). Inflation can also vary widely by country. For comparison, in the UK £31,000.00 in 1913 would be equivalent to £3,547,355.40 in 2019, an absolute change of £3,516,355.40 and a cumulative change of 11,343.08%. Compare these numbers to the US's overall absolute change of $764,986.06 and total percent change of 2,467.70%. $31,000 in 1913 has the same "purchasing power" or "buying power" as $795,986.06 in 2019. To help put this inflation into perspective, if we had invested $31,000 in the S&P 500 index in 1913, our investment would be nominally worth approximately $711,860,964.80 in 2019. This is a return on investment of 2,296,225.69%, with an absolute return of $711,829,964.80. The compounding effect of inflation would account for 96.11% of returns ($684,107,458.09) during this period. This means the inflation-adjusted real return of our $31,000 investment is $27,722,506.71. You may use the following MLA citation for this page: “$31,000 in 1913 → 2019 | Inflation Calculator.” U.S. Official Inflation Data, Alioth Finance, 23 Apr. 2019, https://www.officialdata.org/1913-dollars-in-2019?amount=31000.
// migration for https://github.com/bipio-server/bipio/pull/14 var fs = require('fs'), Migration = { run : function(app, configPath, next) { var config = JSON.parse(fs.readFileSync(configPath)), rootPath = GLOBAL.SERVER_ROOT + '/../'; if (!config.crons.transforms_compact) { config.crons.transforms_compact = "0 0 */8 * * *"; fs.writeFileSync(configPath , JSON.stringify(config, null, 2)); console.info("\nConfig (for 0.3.19) written to : " + configPath + "\n"); next(); } else { next('Nothing To Do'); } } } module.exports = Migration;
#define _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_DEPRECATE #define NOMINMAX #include <ctime> #include <string> #include <cstring> #include <vector> #include "xgboost/src/sync/sync.h" #include "xgboost/src/io/io.h" #include "xgboost/src/utils/utils.h" #include "xgboost/src/utils/config.h" #include "xgboost/src/learner/learner-inl.hpp" #include "xgboost/src/io/simple_dmatrix-inl.hpp" #include "xgboost/src/io/page_dmatrix-inl.hpp" #include "exgb_commands.h" #include "erl_driver.h" #include "erl_interface.h" #include "ei.h" #include "assert.h" #if ERL_DRV_EXTENDED_MAJOR_VERSION < 2 #define ErlDrvSizeT int #define ErlDrvSSizeT int #endif #define MAX_MODELS 4096 // State structure typedef struct { long model_idx; xgboost::learner::BoostLearner *models[MAX_MODELS]; ErlDrvPort drv_port; } state; ei_x_buff *badarg(); ei_x_buff *do_predict(state *st, char *args, int index); ei_x_buff *do_load_model(state *st, char *args, int index); // ============================================================================= // Erlang Callbacks // ============================================================================= extern "C" { static ErlDrvData start(ErlDrvPort port, char *command) { state *drvstate = (state *)driver_alloc(sizeof(state)); drvstate->drv_port = port; drvstate->model_idx = 0; return (ErlDrvData)drvstate; } static void stop(ErlDrvData drvstate) { state *st = (state *)drvstate; driver_select(st->drv_port, (ErlDrvEvent)(size_t)fileno(stdin), DO_READ, 0); driver_free(drvstate); } static void output(ErlDrvData drvstate, char *buff, ErlDrvSizeT bufflen) { state *st = (state *)drvstate; long fn; int index = 0, version, arity; ei_x_buff *ret = NULL; ei_decode_version(buff, &index, &version); ei_decode_tuple_header(buff, &index, &arity); ei_decode_long(buff, &index, &fn); //printf("fn: %ld a: %d idx: %d\n\r", fn, arity, index); switch (fn) { case PREDICT: ret = do_predict(st, buff, index); break; case LOAD_MODEL: ret = do_load_model(st, buff, index); break; default: ret = badarg(); break; } driver_output(st->drv_port, ret->buff, ret->index); } } // ============================================================================= // XGBoost function wrappers // =========================================================================== ei_x_buff *do_predict(state *st, char *args, int index) { int pred_margin = 0; int ntree_limit = 0; int arity; long model; ei_decode_tuple_header(args, &index, &arity); ei_decode_long(args, &index, &model); xgboost::learner::BoostLearner *learner = st->models[model]; ei_decode_list_header(args, &index, &arity); if (arity > 0) { std::vector<float> preds; xgboost::io::DMatrixSimple *data = new xgboost::io::DMatrixSimple(); std::vector<xgboost::RowBatch::Entry> feats; int nfet = arity; feats.resize(nfet); for (int i = 0; i < nfet; i++) { double feat_i; ei_decode_double(args, &index, &feat_i); feats[i] = xgboost::RowBatch::Entry(i, feat_i); } data->AddRow(feats); learner->Predict(*data, pred_margin != 0, &preds, ntree_limit); ei_x_buff *x = (ei_x_buff *) malloc(sizeof(ei_x_buff)); ei_x_new_with_version(x); ei_x_encode_tuple_header(x, 2); ei_x_encode_atom(x, "ok"); ei_x_encode_double(x, preds[0]); return x; } else { return badarg(); } } ei_x_buff *do_load_model(state *st, char *args, int index) { long strlen; int arity; ei_decode_tuple_header(args, &index, &arity); assert(arity == 2); ei_decode_long(args, &index, &strlen); //printf("strlen: %ld a: %d idx: %d\n", strlen, arity, index); char model[strlen]; ei_decode_string(args, &index, model); ei_x_buff *x = (ei_x_buff *) malloc(sizeof(ei_x_buff)); ei_x_new_with_version(x); try { xgboost::learner::BoostLearner *learner = new xgboost::learner::BoostLearner(); learner->LoadModel(model); st->models[st->model_idx] = learner; ei_x_encode_tuple_header(x, 2); ei_x_encode_atom(x, "ok"); ei_x_encode_long(x, st->model_idx); st->model_idx++; } catch (std::exception& load_error) { // TODO: fix me - actuall catch and return the error tuple ei_x_encode_tuple_header(x, 2); ei_x_encode_atom(x, "error"); ei_x_encode_long(x, -1L); } return x; } // ============================================================================= // Utility functions // ============================================================================= ei_x_buff *badarg() { ei_x_buff *ret = (ei_x_buff *) malloc(sizeof(ei_x_buff)); ei_x_new_with_version(ret); ei_x_encode_atom(ret, "badarg"); return ret; } // ============================================================================= // Erlang driver_entry Specification // =========================================================================== extern "C" { ErlDrvEntry driver_entry = { NULL, /* F_PTR init, called when driver is loaded */ start, /* L_PTR start, called when port is opened */ stop, /* F_PTR stop, called when port is closed */ output, /* F_PTR output, called when erlang has sent */ NULL, /* F_PTR ready_input, called when input descriptor ready */ NULL, /* F_PTR ready_output, called when output descriptor ready */ "exgb", /* char *driver_name, the argument to open_port */ NULL, /* F_PTR finish, called when unloaded */ NULL, /* void *handle, Reserved by VM */ NULL, //control, /* F_PTR control, port_command callback */ NULL, /* F_PTR timeout, reserved */ NULL, /* F_PTR outputv, reserved */ NULL, /* F_PTR ready_async, only for async drivers */ NULL, /* F_PTR flush, called when port is about to be closed, but there is data in driver queue */ NULL, /* F_PTR call, much like control, sync call to driver */ NULL, /* F_PTR event, called when an event selected by driver_event() occurs. */ ERL_DRV_EXTENDED_MARKER, /* int extended marker, Should always be set to indicate driver versioning */ ERL_DRV_EXTENDED_MAJOR_VERSION, /* int major_version, should always be set to this value */ ERL_DRV_EXTENDED_MINOR_VERSION, /* int minor_version, should always be set to this value */ 0, /* int driver_flags, see documentation */ NULL, /* void *handle2, reserved for VM use */ NULL, /* F_PTR process_exit, called when a monitored process dies */ NULL /* F_PTR stop_select, called to close an event object */ }; // ============================================================================= // Erlang Driver Name // ============================================================================= DRIVER_INIT(exgb) { return &driver_entry; } }
/* Copyright (c) 2007 - 2010, Carlos Guzmán Álvarez All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; using System.Xml.Serialization; namespace Hanoi.Serialization.InstantMessaging.Privacy { /// <remarks /> [Serializable] [XmlType(Namespace = "jabber:iq:privacy")] public enum PrivacyActionType { /// <remarks /> [XmlEnumAttribute("allow")] Allow, /// <remarks /> [XmlEnumAttribute("deny")] Deny, } }
/******************************************************************************* * HELIUM V, Open Source ERP software for sustained success * at small and medium-sized enterprises. * Copyright (C) 2004 - 2015 HELIUM V IT-Solutions GmbH * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of theLicense, or * (at your option) any later version. * * According to sec. 7 of the GNU Affero General Public License, version 3, * the terms of the AGPL are supplemented with the following terms: * * "HELIUM V" and "HELIUM 5" are registered trademarks of * HELIUM V IT-Solutions GmbH. The licensing of the program under the * AGPL does not imply a trademark license. Therefore any rights, title and * interest in our trademarks remain entirely with us. If you want to propagate * modified versions of the Program under the name "HELIUM V" or "HELIUM 5", * you may only do so if you have a written permission by HELIUM V IT-Solutions * GmbH (to acquire a permission please contact HELIUM V IT-Solutions * at [email protected]). * * 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * Contact: [email protected] ******************************************************************************/ package com.lp.client.frame.component; public class WrapperMediaControlTextmodul extends WrapperMediaControl { private static final long serialVersionUID = 5777211428781539967L; public WrapperMediaControlTextmodul(InternalFrame internalFrame, String addTitel, boolean bMitDefaultbildFeld) throws Throwable { super(internalFrame, addTitel, bMitDefaultbildFeld); } @Override protected WrapperEditorField createEditorField() throws Throwable { return new WrapperEditorFieldTextmodul(getInternalFrame(), "", bWithoutButtons); } }
(H) 02/26/19 5:00 PM Practice Binghamton Racquet Club . (H) 02/28/19 5:00 PM Practice Binghamton Racquet Club . (H) 03/05/19 5:00 PM Practice Binghamton Racquet Club . (H) 03/07/19 5:00 PM Practice Binghamton Racquet Club . (H) 03/12/19 5:00 PM Practice Binghamton Racquet Club Cancelled . (H) 03/14/19 5:00 PM Practice Binghamton Racquet Club . (H) 04/02/19 5:00 PM Practice Binghamton Racquet Club . (H) 04/04/19 3:45 PM vs Dwight School USTA Tennis Facilities 0 - 5 . (H) 04/09/19 5:00 PM Practice Binghamton Racquet Club . (H) 04/11/19 5:00 PM Practice Binghamton Racquet Club . (H) 04/16/19 5:00 PM Practice Binghamton Racquet Club . (H) 04/18/19 4:00 PM vs Birch Wathen Lenox School West Side Tennis Club . (H) 04/23/19 5:00 PM Practice Binghamton Racquet Club . (H) 04/25/19 5:00 PM Practice Binghamton Racquet Club . (H) 05/02/19 5:00 PM Practice Binghamton Racquet Club . (H) 05/03/19 4:00 PM vs Elisabeth Irwin School Leif Ericson Park-Field#1 . (H) 05/07/19 5:00 PM Practice Binghamton Racquet Club . (A) 05/09/19 4:00 PM vs French American School New York French American School . (H) 05/09/19 5:00 PM Practice Binghamton Racquet Club . (H) 05/13/19 4:00 PM vs York Prep School Leif Ericson Park-Field#1 . (H) 05/20/19 4:00 PM vs Garden School USTA Tennis Facilities .
//! This module contains the basic RootMove structures, allowing for storage of the moves from a specific position //! alongside information about each of the moves. pub mod root_moves_list; use std::cmp::Ordering as CmpOrder; use pleco::core::score::*; use pleco::BitMove; // 250 as this fits into 64 byte cache lines easily. const MAX_MOVES: usize = 250; /// Keeps track of information of a move for the position to be searched. #[derive(Copy, Clone,Eq)] pub struct RootMove { pub score: i32, pub prev_score: i32, pub bit_move: BitMove, pub depth_reached: i16, } impl RootMove { /// Creates a new `RootMove`. #[inline] pub fn new(bit_move: BitMove) -> Self { RootMove { bit_move, score: NEG_INFINITE as i32, prev_score: NEG_INFINITE as i32, depth_reached: 0, } } /// Places the current score into the previous_score field, and then updates /// the score and depth. #[inline] pub fn rollback_insert(&mut self, score: i32, depth: i16) { self.prev_score = self.score; self.score = score; self.depth_reached = depth; } /// Inserts a score and depth. #[inline] pub fn insert(&mut self, score: i32, depth: i16) { self.score = score; self.depth_reached = depth; } /// Places the current score in the previous score. #[inline] pub fn rollback(&mut self) { self.prev_score = self.score; } } // Moves with higher score for a higher depth are less impl Ord for RootMove { #[inline] fn cmp(&self, other: &RootMove) -> CmpOrder { let value_diff = self.score - other.score; if value_diff == 0 { let prev_value_diff = self.prev_score - other.prev_score; if prev_value_diff == 0 { return CmpOrder::Equal; } else if prev_value_diff > 0 { return CmpOrder::Less; } } else if value_diff > 0 { return CmpOrder::Less; } CmpOrder::Greater } } impl PartialOrd for RootMove { fn partial_cmp(&self, other: &RootMove) -> Option<CmpOrder> { Some(self.cmp(other)) } } impl PartialEq for RootMove { fn eq(&self, other: &RootMove) -> bool { self.score == other.score && self.prev_score == other.prev_score } }
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/appstream/model/UpdateFleetRequest.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::AppStream::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; UpdateFleetRequest::UpdateFleetRequest() : m_imageNameHasBeenSet(false), m_imageArnHasBeenSet(false), m_nameHasBeenSet(false), m_instanceTypeHasBeenSet(false), m_computeCapacityHasBeenSet(false), m_vpcConfigHasBeenSet(false), m_maxUserDurationInSeconds(0), m_maxUserDurationInSecondsHasBeenSet(false), m_disconnectTimeoutInSeconds(0), m_disconnectTimeoutInSecondsHasBeenSet(false), m_descriptionHasBeenSet(false), m_displayNameHasBeenSet(false), m_enableDefaultInternetAccess(false), m_enableDefaultInternetAccessHasBeenSet(false), m_domainJoinInfoHasBeenSet(false), m_idleDisconnectTimeoutInSeconds(0), m_idleDisconnectTimeoutInSecondsHasBeenSet(false), m_attributesToDeleteHasBeenSet(false), m_iamRoleArnHasBeenSet(false), m_streamView(StreamView::NOT_SET), m_streamViewHasBeenSet(false) { } Aws::String UpdateFleetRequest::SerializePayload() const { JsonValue payload; if(m_imageNameHasBeenSet) { payload.WithString("ImageName", m_imageName); } if(m_imageArnHasBeenSet) { payload.WithString("ImageArn", m_imageArn); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_instanceTypeHasBeenSet) { payload.WithString("InstanceType", m_instanceType); } if(m_computeCapacityHasBeenSet) { payload.WithObject("ComputeCapacity", m_computeCapacity.Jsonize()); } if(m_vpcConfigHasBeenSet) { payload.WithObject("VpcConfig", m_vpcConfig.Jsonize()); } if(m_maxUserDurationInSecondsHasBeenSet) { payload.WithInteger("MaxUserDurationInSeconds", m_maxUserDurationInSeconds); } if(m_disconnectTimeoutInSecondsHasBeenSet) { payload.WithInteger("DisconnectTimeoutInSeconds", m_disconnectTimeoutInSeconds); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_displayNameHasBeenSet) { payload.WithString("DisplayName", m_displayName); } if(m_enableDefaultInternetAccessHasBeenSet) { payload.WithBool("EnableDefaultInternetAccess", m_enableDefaultInternetAccess); } if(m_domainJoinInfoHasBeenSet) { payload.WithObject("DomainJoinInfo", m_domainJoinInfo.Jsonize()); } if(m_idleDisconnectTimeoutInSecondsHasBeenSet) { payload.WithInteger("IdleDisconnectTimeoutInSeconds", m_idleDisconnectTimeoutInSeconds); } if(m_attributesToDeleteHasBeenSet) { Array<JsonValue> attributesToDeleteJsonList(m_attributesToDelete.size()); for(unsigned attributesToDeleteIndex = 0; attributesToDeleteIndex < attributesToDeleteJsonList.GetLength(); ++attributesToDeleteIndex) { attributesToDeleteJsonList[attributesToDeleteIndex].AsString(FleetAttributeMapper::GetNameForFleetAttribute(m_attributesToDelete[attributesToDeleteIndex])); } payload.WithArray("AttributesToDelete", std::move(attributesToDeleteJsonList)); } if(m_iamRoleArnHasBeenSet) { payload.WithString("IamRoleArn", m_iamRoleArn); } if(m_streamViewHasBeenSet) { payload.WithString("StreamView", StreamViewMapper::GetNameForStreamView(m_streamView)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection UpdateFleetRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "PhotonAdminProxyService.UpdateFleet")); return headers; }
--TEST-- MongoDB\Driver\WriteConcern::__set_state() --FILE-- <?php require_once __DIR__ . '/../utils/tools.php'; $tests = [ [ 'w' => -3 ], [ 'w' => -2 ], // -2 is default [ 'w' => -1 ], [ 'w' => 0 ], [ 'w' => 1 ], [ 'w' => 'majority' ], [ 'w' => 'tag' ], [ 'w' => 1, 'j' => false ], [ 'w' => 1, 'wtimeout' => 1000 ], [ 'w' => 1, 'j' => true, 'wtimeout' => 1000 ], [ 'j' => true ], [ 'wtimeout' => 1000 ], ]; foreach ($tests as $fields) { var_export(MongoDB\Driver\WriteConcern::__set_state($fields)); echo "\n\n"; } ?> ===DONE=== <?php exit(0); ?> --EXPECT-- MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 'majority', )) MongoDB\Driver\WriteConcern::__set_state(array( )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => -1, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 0, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 'majority', )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 'tag', )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, 'j' => false, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, 'wtimeout' => 1000, )) MongoDB\Driver\WriteConcern::__set_state(array( 'w' => 1, 'j' => true, 'wtimeout' => 1000, )) MongoDB\Driver\WriteConcern::__set_state(array( 'j' => true, )) MongoDB\Driver\WriteConcern::__set_state(array( 'wtimeout' => 1000, )) ===DONE===
The Bell Bullitt Command took one of the all time favourite Bullitt colourways, the Bullitt Vintage Stripes, and turned it on its head. This awesome design features a luscious red interior. The Bell Bullitt has rapidly become the go-to helmet for anyone looking for a vintage look with full face protection. The Bullitt's design is based on the very first full face helmet on the market: the Bell Star. The Bullitt has inhereted the Star's classic shape and style but is completely up to date and packed with modern features that provide excellent protection and comfort. One of the Bullitt's key features is the massive viewport, offering unparallelled peripheral vision. When riding with the Bullitt, the aperture is so wide that it almost feels like you're wearing an open face helmet but make no mistake: the Bullitt offers you full face protection and is 100% ECE approved and made using the exact same technology as Bell's more modern helmet designs. The detailing on this helmet is impressive: there's four mesh-covered air intakes on the forehead, a very cleverly designed venturi vent in the back, gorgeous brushed metal side pods and a visor that is held securely in place by a leather magnetic tab.
#!/usr/bin/python3 import requests, getpass, socket, platform, subprocess, time, os, sys, getopt verb = 0 loginid = "" pw = "" def get_ip_address(): dbgmsg("Trying to obtain our current IP-Address...") try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(("134.147.64.8", 80)) dbgmsg("Success!") return s.getsockname()[0] except Exception: dbgmsg("Failure! Network unreachable.") return 0 def ping(host): dbgmsg("Trying to determine: OS...") if platform.system() == "Windows": dbgmsg("Windows detected.") res = subprocess.call(["ping", host, "-n 1"]) else: dbgmsg("UNIX(-like) OS detected.") res = subprocess.call(["ping", "-c 1", host], stdin = subprocess.PIPE, stdout = subprocess.DEVNULL, stderr = subprocess.DEVNULL) dbgmsg("Pinging to see if our connection is up...") if res == 0: dbgmsg("We're connected!") return 1 else: dbgmsg("Nope, no connection.") return 0 def establish_connection(user, pw): dbgmsg("Trying to establish connection...") ip = get_ip_address() if ip == 0: print("Network is unreachable.\n") return 0 payload = {'code': '1', 'loginid': loginid, 'password': pw, 'ipaddr': ip, 'action': 'Login'} text = "" try: dbgmsg("Trying to log in via HTTP-POST...") r = requests.post("https://login.rz.ruhr-uni-bochum.de/cgi-bin/laklogin", data=payload) text = r.text except Exception: print("An error occured while trying to login.\n") if "Authentisierung gelungen" in text: print("O.K.") return 1 else: print("Fail.") return 0 def logout(): dbgmsg("Trying to log out...") ip = get_ip_address() if ip == 0: print("Network is unreachable.\n") return 0 payload = {'code': '1', 'loginid': '', 'password': '', 'ipaddr': ip, 'action': 'Logout'} text = "" try: dbgmsg("Trying to log out via HTTP-POST...") r = requests.post("https://login.rz.ruhr-uni-bochum.de/cgi-bin/laklogin", data=payload) text = r.text except Exception: print("An error occured while trying to logout.\n") if "erfolgreich" in text: print("O.K., successfully logged out.") return 1 else: print("Fail.") return 0 def login(watchdog, interval): global loginid, pw loginid = input("Login ID: ") pw = getpass.getpass() if establish_connection(loginid, pw) == 0: exit() if watchdog: wd_enabled = 1 try: pid = os.fork() except OSError: sys.exit(1) if pid > 0: sys.exit(0) print("Watchdog-PID: " + str(os.getpid()) + "\n") while wd_enabled: time.sleep(interval) if(ping("8.8.8.8")): #print("O.K.") continue else: print("\nRUBLOGIN-Watchdog: Connection lost. Trying to re-establish...") establish_connection(loginid, pw) def dbgmsg(msg): if verb: print("Dbg: " + msg) return def print_help(): print("Usage:\n -l / --logout : Terminates the current HIRN-Port-Session\n -w / --watchdog [interval]: Enables the watchdog. Checks the status of the connection every [interval] seconds and reconnects, if neccessary\n -v / --verbose : Prints debug messages throughout the login/logout process\n -h / --help : Displays this help") def main(argv): global verb logout_v = 0 watchdog = 0 interval = 0 try: opts = getopt.getopt(argv, "hvlw:", ["help","verbose","logout","watchdog="]) except Exception: verb = 0 print("Invalid arguments. Use the -h parameter if you are lost.") sys.exit() for opt, arg in opts: if opt in ("-h", "--help"): print_help() sys.exit() elif opt in("-v", "--verbose"): verb = 1 print("Debugging messages enabled...") elif opt in ("-l", "--logout"): logout_v = 1 elif opt in ("-w", "--watchdog"): watchdog = 1 try: interval = int(arg) except ValueError: print("Only integers, please. Aborting.") sys.exit() if interval < 5: print("Interval must be 5 seconds or longer. Aborting.") sys.exit() print("Watchdog enabled.") if logout_v: logout() else: login(watchdog, interval) main(sys.argv[1:])
The double etched heart cremation pendant jewelry has a chamber inside which families can use to house the ashes of their loved one, sacred soil or lock of hair keepsake. The pendant is easily filled through the secure threaded opening using the included small funnel. The urn pendant can be permanently sealed using industrial sealant (not included).
Most provisions affecting directors came into effect in October 2007. However, duties relating to avoidance of conflicts and disclosure of interests came into force on 1 October 2008. The most significant change is to give directors power to authorise certain situations where a director has a conflict of interest. The Articles of Association of a public company must contain provisions for directors to give such an authorisation. Private companies incorporated after 1 October 2008 need take no action unless their Articles contain provisions that might invalidate directors’ authorisations. Private companies incorporated before 1 October will need to pass a members resolution to approve directors’ authorisations. Directors must not accept benefits from third parties although this duty does not apply if the benefit cannot reasonably be regarded as likely to give rise to conflicts of interest. Directors (and/or people connected to them) must avoid situations in which they have, or can have, a direct or indirect interest that conflicts or possibly may conflict with the interests of the company. The duty applies in particular to the exploitation of property, information or opportunity, regardless of whether the company is able to take advantage of it. This duty does not apply to conflicts of interest relating to transactions or arrangements the director has with the company or if the situation cannot reasonably be regarded as likely to give rise to conflicts of interest. Directors, who are in any way directly or indirectly interested in a proposed transaction or arrangement with the company, must declare the nature and extent of their interest to the directors and cannot vote. Directors must declare their interests in any existing transaction or arrangement with the company. Failure to do so is a criminal offence. Directors and company secretaries will, from October 2009, be able to provide service addresses for the public register at Companies House. Access to residential addresses will be limited to certain public authorities and credit agencies. However, residential addresses already on the public register on 1 October will not be removed unless directors or company secretaries can show they are at risk of violence or intimidation. Companies must now have at least one director who is a natural person so that every company has at least one individual who can be held accountable for the company’s actions. Restrictions on directors over 70 years old have been removed. A minimum age for directors of 16 has been introduced. Private companies can now reduce their share capital by passing a special resolution, supported by directors’ solvency statement, instead of having to go to court. The new provisions also cover the treatment of reserves arising from reductions in share capital. The restrictions on financial assistance for the acquisition of shares in private companies have been repealed. Private companies may now acquire their own fully paid shares otherwise than for valuable consideration. The new provisions include other circumstances in which a private company can acquire its own shares. A person may object to a company’s registered name in certain circumstances, for example, a) when the name is the same as the name associated with the applicant in which he has goodwill, or b) when the name is sufficiently similar to such a name that its use in the UK would be likely to mislead by suggesting a connection between the company and the applicant. An objection must be made to the Company Names Adjudicator (appointed by the Secretary of State). (iii) was formerly operating under the name and is now dormant. c) that the name was registered in the ordinary course of a company formation business and the company is available for sale to the applicant on the standard terms of that business. If the application is upheld, the adjudicator can require the respondent company to change its name. Similar to previous disclosures but there is now a requirement to include an ‘inspection’ address, where documents/registers can be inspected if they are not kept at the Company’s registered address. For more information about the changes to Companies Acts affecting your company and our compliance services, please call Peter Driver on 020 7608 0011.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_25) on Sun Feb 01 08:52:24 EST 2015 --> <title>WaitGroup</title> <meta name="date" content="2015-02-01"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="WaitGroup"; } } catch(err) { } //--> var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../com/sophos/command/package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/WaitGroup.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../index-files/index-1.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../com/sophos/command/Waitable.html" title="class in com.sophos.command"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../com/sophos/command/WaitMonitor.html" title="interface in com.sophos.command"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?com/sophos/command/WaitGroup.html" target="_top">Frames</a></li> <li><a href="WaitGroup.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">com.sophos.command</div> <h2 title="Class WaitGroup" class="title">Class WaitGroup</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>com.sophos.command.WaitGroup</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd>java.io.Closeable, java.lang.AutoCloseable</dd> </dl> <hr> <br> <pre>public class <span class="typeNameLabel">WaitGroup</span> extends java.lang.Object implements java.io.Closeable</pre> <div class="block">This class provides something akin to Windows' WaitForMultipleObjects functionality. It provides a way to efficiently wait upon any number of <a href="../../../com/sophos/command/Waitable.html" title="class in com.sophos.command"><code>Waitable</code></a> objects, until either one or all of the objects enter a signaled state. <p> Behavior is undefined if you access the same WaitGroup object across multiple threads.</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../com/sophos/command/WaitGroup.html#WaitGroup--">WaitGroup</a></span>()</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sophos/command/WaitGroup.html#addWaitable-com.sophos.command.Waitable-">addWaitable</a></span>(<a href="../../../com/sophos/command/Waitable.html" title="class in com.sophos.command">Waitable</a>&nbsp;item)</code> <div class="block">Adds a <a href="../../../com/sophos/command/Waitable.html" title="class in com.sophos.command"><code>Waitable</code></a> object to the list of objects to wait upon.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sophos/command/WaitGroup.html#close--">close</a></span>()</code></td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sophos/command/WaitGroup.html#waitForAll--">waitForAll</a></span>()</code> <div class="block">Waits until all of the items have entered a signaled state.</div> </td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sophos/command/WaitGroup.html#waitForAll-com.sophos.command.Duration-">waitForAll</a></span>(<a href="../../../com/sophos/command/Duration.html" title="class in com.sophos.command">Duration</a>&nbsp;duration)</code> <div class="block">Waits the specified duration for all of the items to have entered a signaled state.</div> </td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sophos/command/WaitGroup.html#waitForAny--">waitForAny</a></span>()</code> <div class="block">Waits until any one of the items enters a signaled state.</div> </td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sophos/command/WaitGroup.html#waitForAny-com.sophos.command.Duration-">waitForAny</a></span>(<a href="../../../com/sophos/command/Duration.html" title="class in com.sophos.command">Duration</a>&nbsp;duration)</code> <div class="block">Waits the specified duration for any one of the items enters a signaled state.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="WaitGroup--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>WaitGroup</h4> <pre>public&nbsp;WaitGroup()</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="addWaitable-com.sophos.command.Waitable-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>addWaitable</h4> <pre>public final&nbsp;void&nbsp;addWaitable(<a href="../../../com/sophos/command/Waitable.html" title="class in com.sophos.command">Waitable</a>&nbsp;item)</pre> <div class="block">Adds a <a href="../../../com/sophos/command/Waitable.html" title="class in com.sophos.command"><code>Waitable</code></a> object to the list of objects to wait upon. These are added to a sequential array.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>item</code> - the object to include</dd> </dl> </li> </ul> <a name="close--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>close</h4> <pre>public&nbsp;void&nbsp;close() throws java.io.IOException</pre> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code>close</code>&nbsp;in interface&nbsp;<code>java.io.Closeable</code></dd> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.io.IOException</code></dd> </dl> </li> </ul> <a name="waitForAll--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>waitForAll</h4> <pre>public final&nbsp;void&nbsp;waitForAll() throws java.lang.InterruptedException</pre> <div class="block">Waits until all of the items have entered a signaled state. <p> Note that this will return after all of the items have been in the signaled at any time since the wait began. This does *not* wait until the items are simultaneously signaled. For example, if waiting upon two events, and the first becomes signaled, and is then reset, and then the second event becomes signaled, this method will return (even though the two events were never both in the signaled state at the same time).</div> <dl> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.InterruptedException</code></dd> </dl> </li> </ul> <a name="waitForAll-com.sophos.command.Duration-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>waitForAll</h4> <pre>public final&nbsp;boolean&nbsp;waitForAll(<a href="../../../com/sophos/command/Duration.html" title="class in com.sophos.command">Duration</a>&nbsp;duration) throws java.lang.InterruptedException</pre> <div class="block">Waits the specified duration for all of the items to have entered a signaled state. <p> Note that this will return after all of the items have been in the signaled at any time since the wait began (or the duration elapses). This does *not* wait until the items are simultaneously signaled. For example, if waiting upon two events, and the first becomes signaled, and is then reset, and then the second event becomes signaled, this method will return (even though the two events were never both in the signaled state at the same time).</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>duration</code> - the maximum amount of time to wait</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>true, if all items have entered the signaled state, or false if the specified duration expires.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.InterruptedException</code></dd> </dl> </li> </ul> <a name="waitForAny--"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>waitForAny</h4> <pre>public final&nbsp;int&nbsp;waitForAny() throws java.lang.InterruptedException</pre> <div class="block">Waits until any one of the items enters a signaled state.</div> <dl> <dt><span class="returnLabel">Returns:</span></dt> <dd>the index of the <a href="../../../com/sophos/command/Waitable.html" title="class in com.sophos.command"><code>Waitable</code></a> object that has become signaled.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.InterruptedException</code></dd> </dl> </li> </ul> <a name="waitForAny-com.sophos.command.Duration-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>waitForAny</h4> <pre>public final&nbsp;int&nbsp;waitForAny(<a href="../../../com/sophos/command/Duration.html" title="class in com.sophos.command">Duration</a>&nbsp;duration) throws java.lang.InterruptedException</pre> <div class="block">Waits the specified duration for any one of the items enters a signaled state.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>duration</code> - the maximum amount of time to wait</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the index of the <a href="../../../com/sophos/command/Waitable.html" title="class in com.sophos.command"><code>Waitable</code></a> object that has become signaled. Or, if none of the objects become signaled in the specified duration, returns -1.</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.InterruptedException</code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../com/sophos/command/package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/WaitGroup.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../index-files/index-1.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../com/sophos/command/Waitable.html" title="class in com.sophos.command"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../com/sophos/command/WaitMonitor.html" title="interface in com.sophos.command"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?com/sophos/command/WaitGroup.html" target="_top">Frames</a></li> <li><a href="WaitGroup.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
Most of us spend a lot of period in our cars — amid commuting, processing errands, transporting others, or long trips, we usually log many hours a week in our vehicles. considering that in mind, you probably desire a car that’s not just transportation, but as a consequence a nice place to be — a comfortable spot bearing in mind kind materials laid out in a logical, thoughtful manner, and maybe even one that’s nice to see at. We comprehend this want — thus we’ve laid out the 10 best car interiors you can acquire for under $50,000. We’ve focused on the latest models, and most have been updated recently to have the funds for handsome, comfortable, thoughtfully-planned interiors that strike us as a nice area to spend time. choose any one of these vehicles, and we suspect you’ll be a tiny happier during the hours of the week you spend in your car.
/* packet-mrdisc.c 2001 Ronnie Sahlberg <See AUTHORS for email> * Routines for IGMP/MRDISC packet disassembly * * Wireshark - Network traffic analyzer * By Gerald Combs <[email protected]> * Copyright 1998 Gerald Combs * * 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 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* MRDISC code 0x24 x 0x25 x 0x26 x MRDISC : IGMP Multicast Router DISCovery Defined in draft-ietf-idmr-igmp-mrdisc-06.txt TTL==1 and IP.DST==224.0.0.2 for all packets. */ #include "config.h" #include <glib.h> #include <epan/packet.h> #include <epan/exceptions.h> #include "packet-igmp.h" #include "packet-mrdisc.h" void proto_register_mrdisc(void); static int proto_mrdisc = -1; static int hf_checksum = -1; static int hf_checksum_bad = -1; static int hf_type = -1; static int hf_advint = -1; static int hf_numopts = -1; static int hf_options = -1; static int hf_option = -1; static int hf_option_len = -1; static int hf_qi = -1; static int hf_rv = -1; static int hf_option_bytes = -1; static int ett_mrdisc = -1; static int ett_options = -1; #define MRDISC_MRA 0x24 #define MRDISC_MRS 0x25 #define MRDISC_MRT 0x26 static const value_string mrdisc_types[] = { {MRDISC_MRA, "Multicast Router Advertisement"}, {MRDISC_MRS, "Multicast Router Solicitation"}, {MRDISC_MRT, "Multicast Router Termination"}, {0, NULL} }; #define MRDISC_QI 0x01 #define MRDISC_RV 0x02 static const value_string mrdisc_options[] = { {MRDISC_QI, "Query Interval"}, {MRDISC_RV, "Robustness Variable"}, {0, NULL} }; static int dissect_mrdisc_mra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset) { guint16 num; /* Advertising Interval */ proto_tree_add_item(parent_tree, hf_advint, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* checksum */ igmp_checksum(parent_tree, tvb, hf_checksum, hf_checksum_bad, pinfo, 0); offset += 2; /* skip unused bytes */ offset += 2; /* number of options */ num = tvb_get_ntohs(tvb, offset); proto_tree_add_uint(parent_tree, hf_numopts, tvb, offset, 2, num); offset += 2; /* process any options */ while (num--) { proto_tree *tree; proto_item *item; guint8 type,len; int old_offset = offset; item = proto_tree_add_item(parent_tree, hf_options, tvb, offset, -1, ENC_NA); tree = proto_item_add_subtree(item, ett_options); type = tvb_get_guint8(tvb, offset); proto_tree_add_uint(tree, hf_option, tvb, offset, 1, type); offset += 1; len = tvb_get_guint8(tvb, offset); proto_tree_add_uint(tree, hf_option_len, tvb, offset, 1, len); offset += 1; switch (type) { case MRDISC_QI: if (item) { proto_item_set_text(item,"Option: %s == %d", val_to_str(type, mrdisc_options, "unknown %x"), tvb_get_ntohs(tvb, offset)); } if (len != 2) THROW(ReportedBoundsError); proto_tree_add_item(tree, hf_qi, tvb, offset, len, ENC_BIG_ENDIAN); offset += len; break; case MRDISC_RV: if (item) { proto_item_set_text(item,"Option: %s == %d", val_to_str(type, mrdisc_options, "unknown %x"), tvb_get_ntohs(tvb, offset)); } if (len != 2) THROW(ReportedBoundsError); proto_tree_add_item(tree, hf_rv, tvb, offset, len, ENC_BIG_ENDIAN); offset += len; break; default: if (item) { proto_item_set_text(item,"Option: unknown"); } proto_tree_add_item(tree, hf_option_bytes, tvb, offset, len, ENC_NA); offset += len; } if (item) { proto_item_set_len(item, offset-old_offset); } } return offset; } static int dissect_mrdisc_mrst(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset) { /* skip reserved byte */ offset += 1; /* checksum */ igmp_checksum(parent_tree, tvb, hf_checksum, hf_checksum_bad, pinfo, 0); offset += 2; return offset; } /* This function is only called from the IGMP dissector */ int dissect_mrdisc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset) { proto_tree *tree; proto_item *item; guint8 type; if (!proto_is_protocol_enabled(find_protocol_by_id(proto_mrdisc))) { /* we are not enabled, skip entire packet to be nice to the igmp layer. (so clicking on IGMP will display the data) */ return offset+tvb_length_remaining(tvb, offset); } item = proto_tree_add_item(parent_tree, proto_mrdisc, tvb, offset, 0, ENC_NA); tree = proto_item_add_subtree(item, ett_mrdisc); col_set_str(pinfo->cinfo, COL_PROTOCOL, "MRDISC"); col_clear(pinfo->cinfo, COL_INFO); type = tvb_get_guint8(tvb, offset); col_add_str(pinfo->cinfo, COL_INFO, val_to_str(type, mrdisc_types, "Unknown Type:0x%02x")); /* type of command */ proto_tree_add_uint(tree, hf_type, tvb, offset, 1, type); offset += 1; switch (type) { case MRDISC_MRA: offset = dissect_mrdisc_mra(tvb, pinfo, tree, offset); break; case MRDISC_MRS: case MRDISC_MRT: /* MRS and MRT packets looks the same */ offset = dissect_mrdisc_mrst(tvb, pinfo, tree, offset); break; } return offset; } void proto_register_mrdisc(void) { static hf_register_info hf[] = { { &hf_type, { "Type", "mrdisc.type", FT_UINT8, BASE_HEX, VALS(mrdisc_types), 0, "MRDISC Packet Type", HFILL }}, { &hf_checksum, { "Checksum", "mrdisc.checksum", FT_UINT16, BASE_HEX, NULL, 0, "MRDISC Checksum", HFILL }}, { &hf_checksum_bad, { "Bad Checksum", "mrdisc.checksum_bad", FT_BOOLEAN, BASE_NONE, NULL, 0x0, "Bad MRDISC Checksum", HFILL }}, { &hf_advint, { "Advertising Interval", "mrdisc.adv_int", FT_UINT8, BASE_DEC, NULL, 0, "MRDISC Advertising Interval in seconds", HFILL }}, { &hf_numopts, { "Number Of Options", "mrdisc.num_opts", FT_UINT16, BASE_DEC, NULL, 0, "MRDISC Number Of Options", HFILL }}, { &hf_options, { "Options", "mrdisc.options", FT_NONE, BASE_NONE, NULL, 0, "MRDISC Options", HFILL }}, { &hf_option, { "Option", "mrdisc.option", FT_UINT8, BASE_DEC, VALS(mrdisc_options), 0, "MRDISC Option Type", HFILL }}, { &hf_option_len, { "Length", "mrdisc.opt_len", FT_UINT8, BASE_DEC, NULL, 0, "MRDISC Option Length", HFILL }}, { &hf_qi, { "Query Interval", "mrdisc.query_int", FT_UINT16, BASE_DEC, NULL, 0, "MRDISC Query Interval", HFILL }}, { &hf_rv, { "Robustness Variable", "mrdisc.rob_var", FT_UINT16, BASE_DEC, NULL, 0, "MRDISC Robustness Variable", HFILL }}, { &hf_option_bytes, { "Data", "mrdisc.option_data", FT_BYTES, BASE_NONE, NULL, 0, "MRDISC Unknown Option Data", HFILL }}, }; static gint *ett[] = { &ett_mrdisc, &ett_options, }; proto_mrdisc = proto_register_protocol("Multicast Router DISCovery protocol", "MRDISC", "mrdisc"); proto_register_field_array(proto_mrdisc, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); }
package com.nulabinc.backlog.migration.common.conf import java.nio.file.{Path, Paths} import java.util.Date import better.files.{File => BetterFile} import com.nulabinc.backlog.migration.common.utils.{DateUtil, FileUtil} /** * @author * uchida */ class BacklogPaths( projectKey: String, basePath: Path = Paths.get("./backlog") ) { def outputPath: BetterFile = basePath def dbPath: Path = (outputPath / "data.db").path.toAbsolutePath def projectDirectoryPath(key: String): BetterFile = outputPath / "project" / key def projectJson: BetterFile = outputPath / "project.json" def groupsJson: BetterFile = outputPath / "groups.json" def projectUsersJson: BetterFile = outputPath / "project" / projectKey / "projectUsers.json" def customFieldSettingsJson: BetterFile = outputPath / "project" / projectKey / "customFieldSettings.json" def issueCategoriesJson: BetterFile = outputPath / "project" / projectKey / "issueCategories.json" def issueTypesJson: BetterFile = outputPath / "project" / projectKey / "issueTypes.json" def versionsJson: BetterFile = outputPath / "project" / projectKey / "versions.json" def wikiDirectoryPath: BetterFile = outputPath / "project" / projectKey / "wikis" def wikiJson(directory: String): BetterFile = wikiDirectoryPath / FileUtil.clean(directory) / "wiki.json" def wikiJson(path: BetterFile): BetterFile = path / "wiki.json" def wikiAttachmentDirectoryPath(directory: String): BetterFile = wikiDirectoryPath / FileUtil.clean(directory) / "attachment" def wikiAttachmentPath(path: BetterFile): BetterFile = path / "attachment" def wikiAttachmentPath(directory: String, fileName: String): BetterFile = wikiAttachmentDirectoryPath(FileUtil.clean(directory)) / FileUtil.clean( fileName ) def issueDirectoryPath: BetterFile = outputPath / "project" / projectKey / "issues" def issueDirectoryPath( eventType: String, issueId: Long, created: Date, index: Int ): BetterFile = issueDirectoryPath / DateUtil.yyyymmddFormat( created ) / s"${created.getTime}-${issueId}-${eventType}-${index}" def issueJson(path: BetterFile): BetterFile = path / "issue.json" def issueAttachmentDirectoryPath(path: BetterFile): BetterFile = path / "attachment" def issueAttachmentPath(path: BetterFile, fileName: String): BetterFile = path / FileUtil.clean(fileName) }
Link-Aggregator ===============
All across the state, you’ll see examples of how MassDevelopment has made a critical difference. In the last year alone, our real estate expertise and more than $2.8 billion in financing helped to create jobs, build homes, boost manufacturing, and drive economic growth. Search these inspiring stories by industry or product, or explore the map below.
# Golovinia cystospora (R.C. Cooke & C.H. Dickinson) Mekht., 1979 SPECIES #### Status SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in Khishchnye Nematofagovye Griby - Gifomitsety (Baku) 146 (1979) #### Original name Monacrosporium cystosporum R.C. Cooke & C.H. Dickinson, 1965 ### Remarks null
Nutritious and flavorful recipes which use our CBD super food services and products to deliver the advantages of CBD along side other foods are given by us. At the moment CBD isolate is regarded as the purest of all of them. Here are a few fantastic retailers of CBD. If you’re a normal consumer of CBD, then you have to be mindful of a CBD brands which have the results. For wellbeing therefore should you feel stressed just take to it out once more the CBD product or service is good! It softened plant’s debut . Chlorophyll is taken out by Implementing the infusion however this excess step adds an higher cost and eliminates a percentage of the cannabinoids resulting in a CBD oil that was potent. Primarily dosages are made for folks looking for maintenance, and also high doses could possibly be used to combat certain ailments. Hemp and cannabis possess a very long history across the world. CBD having plenty of compounds has shown outcomes. The lively experience escalates. Applying pure, top quality ingredients that are top helps guarantee a excellent working experience precision and also safety. You can begin having an extremely low level and increase into a particular level as possible go. The range of doses allow it to be an easy task to pick the apt formula in line. You’ll be immune. Needless to say the jar isn’t designed to be used at any time! It was not simply since vaping failed. It’s maybe not surprising that coconut oil is conveniently combined with cannabis. Jojoba oil has a distinctive flavor which may not pair nicely with brownies’ flavor. Additionally, it is known as oil. There are lots of great motives that are great to add products in your every day beauty regimen. The truth is in case that you do not specifically what elements go in the skincare points which you are using, it is immaterial that what that they tell you they are prepared to reach for your skin. It is bad for the pet. To cater for the demands of the people an increasingly growing quantity of goods have been attracted into industry. The one thing is , everyone is different and since there are many brands on the business, it’s usually tough to locate the one which is correct foryou. Afterward you definitely are aware you locate the number you demand and’ll find a organic grown goods. One among the principal reasons which men and women turn to CBD oils and tinctures is that they’re amazingly elastic. These products were made thus are going to be able to acquire the consequences that they’re expecting from their breeds. Folks just take CBD acrylic orallyputting a number of drops under the tongue to get approximately a moment and subsequently consuming. Sourcemore, among the ecigarette outlets, that can supply you using the cigarette’s quite similar impression. Tons of people prefer e liquids only since they appear chic. Women and A many men only want around 2mg to 3mg every day to get started setting a huge difference. Toward the decision of her time as manager, the owners had been hoping to help keep the company afloat, and made a decision to offer it to Greg and Ashley. The place to buy it from the Koi CBD web page. The ideal present for friend that is dear or a enthusiast.
SAN SIMEON, Calif.--There aren't many buildings in America that are as interwoven into our culture as Hearst Castle. The longtime palace-away-from-home of media mogul William Randolph Hearst, this central California mega-mansion played host to the power elite from Hollywood to Washington, D.C. for years, and was fictionalized in Orson Welles' classic film "Citizen Kane." This 165-room estate, built by esteemed California architect Julia Morgan on 250,000 stunning acres, features four main buildings with a total of 58 bedrooms and two giant pools with a total of 550,000 gallons of water. Hearst Castle is famous for its -- and Hearst's -- monumental collection of original and replica art spanning centuries and a diverse range of styles. Each year more than 630,000 people drive hours to visit, and since it opened for public tours in 1958, more than 38 million people have spent time there. And that's not including some of the 20th century's most rich and famous, from Winston Churchill to John Paul Getty to Charlie Chaplin and Gary Cooper. Very likely among the first things that most visitors see when they step off the shuttles that bring them to Hearst Castle from below is the Neptune Pool. Completed in 1936, the pool contains 345,000 gallons of water. The final in a series of three designs for a magnificent pool for the site, it is 104 feet long, 58 feet wide, and 95 feet wide at alcove. It features an oil burning heating system, light-veined Vermont marble decorating the pools and colonnades -- which have a set of four 17th century Italian bas-reliefs on their sides. An aerial view of the main parts of Hearst Castle, including the Neptune Pool on the left, and the main Casa Grande dominating the image. CNET reporter Daniel Terdiman got a special behind-the-scenes tour that included a visit to the top of the steps leading to the diving platform over the Roman Pool, a second swimming facility that contains 205,000 gallons of water. A tiled indoor pool that is accompanied by statues of eight Roman gods, goddesses, and heroes, its likely inspiration was an ancient Roman bath such as the Baths of Caracalla. According to the Hearst Castle Web site, "The mosaic tiled patterns were inspired by mosaics found in the 5th Century Mausoleum of Galla Placidia in Ravenna, Italy. They are also representative of traditional marine monster themes that can be found in ancient Roman baths. The statues are rough copies of ancient Greek and Roman statues. One such copy represents the 'Apoxyomenos.'" This is Hearst Castle's Assembly Room. A giant living room where most social evenings began when Hearst had society's best and brightest on hand, there were with cocktails, lively discussion, and an opportunity to mingle with one of the early 20th century's most powerful men. A view down at the Neptune Pool from above. The main structure on the far side of the pool features a bust of Neptune, along with columns made in Egypt and Syria from the first to the fourth centuries. The north collonades at the Neptune Pool feature four 17th-century Italian bas-reliefs on their sides. Hearst occupied the entire third floor of the main building, known as Casa Grande. Although his private chambers -- as well as those of his mistress, Marion Davies -- were on this level, the highlight is the Gothic Suite, which "evokes a church, with its high windows and painted arches," explains the Web site. "But three thousand books and an imposing conference table show that this was actually Mr. Hearst's personal library and executive board room" where he could conduct high-level meetings involving his many businesses. Ostensibly Hearst Castle's dining room is where all meals were eaten. Hearst and architect Julia Morgan called this grand room the "Refectory," the "term for a monastery dining hall. Its high windows, bright silk banners, and gleaming silver candlesticks convey the atmosphere of a church from the middle ages." The long dining table, found in the Refectory. This is where all meals were served, whether the cream of Hollywood society was in attendance, or whether it was simply Hearst and his mistress, Davies. Anyone who has visited Hearst Castle knows that the visual highlights include huge and beautiful gardens, along with many palm trees. A look at the south side of Casa Grande, which was styled after a Spanish cathedral and was done in Mediterranean Revival style. A look down the Roman Pool from atop the stairway. Constructed from 1927 to 1934, the Roman Pool complex is best compared to an ancient Roman bath. Located indoors, its water "was heated as in a tepidarium," explains the Web site. "However, in Hearst's complex there were no hot or cold baths as there were in the ancient complex. The Roman Pool complex was designed to contain an exercise room, sweat baths, a handball court and dressing rooms." A look into one of the side areas of the Roman Pool. "The Roman Pool is decorated from ceiling to floor with one-inch square mosaic tiles," according to the Web site. "These glass tiles, called smalti, are either colored (mainly blue or orange) or are clear with fused gold inside. The intense colors and shimmering gold of the tiles combine to create a breathtaking effect. The designs created by the tiles were developed by muralist Camille Solon. The inspiration for some of these designs came from the 5th Century Mausoleum of Galla Placidia." Light flows through glass bricks from above into the Roman Pool, creating a contrast with the indoor area, including this bridge which goes up to a diving platform. Located in the south tower of the mansion's main building, this is the South Celestial Bedroom, a stunning room with three balconies looking out over world-class views of California's Central Coast, the Pacific Ocean, and the thousands of acres of the Hearst estate. Famed journalist Hedda Hopper was said to have spoken of the bedroom, where she often slept, as "like a jewel box." According to "Hearst Castle," by Victoria Kastner, Hopper also said, "I never knew which meant more to me, the gold room or the view from its windows." This is the rear of Casa Grande, with a facade featuring 600-year-old columns from Venice, Italy, and windows from France that are hundreds of years old. Hearst Castle features a 10,000-bottle capacity wine cellar that to this day still holds many full bottles. Hearst himself was not fond of overdoing alcohol, and it was said that, at Hearst Castle, "drinks were served, not drunks." However, his mistress, Marion Davies, was known to abuse booze, and it is assumed that much of what was stored in the wine cellar was for her use and that of her friends. Another look at the Hearst Castle wine cellar. The walls of the Assembly Room are lined with walnut paneling, some which is original and some which are replicas, as well as "vivid tapestries, all dating back to the 16th century," the Web site explains. "Neoclassical marble statues brighten the corners and fine bronze sculptures sit atop the large tables in this room of the property. But the jigsaw puzzles, poker table, and comfy overstuffed chairs show that the Assembly Room was also a place for socializing and fun." This was Hearst's private bedroom, on the third floor of the man mansion building. In his 80s, Hearst moved from the main building into one of the three guest houses on the property, Casa del Mar. This is his bedroom in Casa del Mar, which had a total of eight bedrooms and comprises 5,350 square feet. This is the bedroom of Hearst's mistress, actress Marion Davies, on the third floor of the main mansion building, across the Gothic Study from Hearst's own bedroom. This is Hearst's private dressing room, on the third floor of Casa Grande. This is the Doge's Suite in Casa Grande, featuring an 18th century Italian ceiling, and a 17th century Italian bed. "Inspired by the ornate chambers of the Doge's Palace in Venice, this richly decorated suite of two bedrooms and a private sitting room was assigned to Mr. Hearst's special guests," according to the Web site. "They were literally surrounded by museum-quality art, including beautifully painted antique ceilings overhead. An arched marble balcony featuring carved lions -- long a symbol of Venice -- frames views of the eastern mountains." This is the Doge's Sitting Room in Casa Grande. This is the kitchen in Casa Grande, featuring this giant rotisserie oven. A look at the rest of the Casa Grande kitchen, including this long preparing table. This is Hearst's pride and joy: His library. According to the Hearst Castle Web site, "guests were welcome to browse through the...four thousand books. This imposing architectural space also showcases one of Mr. Hearst's most treasured collections: one hundred and fifty ancient Greek vases, all more than two thousand years old. These fragile clay vessels are displayed throughout the room and provide fascinating glimpses of daily life in ancient Greece. At 80 feet in length and filled with precious objects, the library is truly a place to get lost in." Above the Roman Pool are these two tennis courts, featuring glass bricks allowing light to flood into the pool below. After working up a sweat on the courts, guests were invited to go downstairs to refresh themselves. A view from under the collonades, alongside the Neptune Pool. A look up at the two towers from the front of Casa Grande. There were a set of dressing rooms in the Roman Pool building. Guests would each have one to themselves while they were swimming.
<?php namespace Todo\Http\Controllers; use Illuminate\Foundation\Bus\DispatchesCommands; use Illuminate\Routing\Controller as BaseController; use Illuminate\Foundation\Validation\ValidatesRequests; abstract class Controller extends BaseController { use DispatchesCommands, ValidatesRequests; }
Getting reliable and affordable vehicle insurance quotes are important to insure your motor or any vehicle with least possible monthly premiums. Now there are multiple factors which any insurance company takes into account while calculating insurance premiums for their clients. If you want low monthly payments for your motor insurance, then you need to find the company providing least possible vehicle insurance quotes. Now almost all insurance companies consider their client’s actual needs and history before offering their insurance coverage plan. Some of the important factors which most insurance companies take into account while calculating your actual vehicle insurance quotes are as follows. 1) Location where you live: The insurance companies usually look at your actual location where you live and where your vehicle is stationed. If your area comes under most crime events, then your monthly insurance premiums can be raised due to the high possibility of your car accidents. 2) Your previous driving history: Insurance companies also check out your previous driving records to decide your monthly premiums. If you have a bad driving history with several punishments, then your premiums are usually raised. This is why you need to have good driving records to obtain lowest possible vehicle insurance quotes. 3) Daily average mileage: The daily average mileage of your car is also considered in deciding the monthly premiums of your motor insurance. If your mileage is high, then you probably tend to get lower insurance premiums. 4) Your FICO score: Insurance companies also pay close attention to any of their potential client’s actual FICO score while deciding insurance premiums. So you need to have a higher FICO score to get reduced motor insurance quotes. 5) The market value of your vehicle: Current market value of your vehicle also plays a crucial role in deciding what would be your actual monthly insurance premiums. Higher the market value of your car, higher is the chance that you will get lower monthly payments for your motor insurance. 6) Make and model of your vehicle: The make and model of your vehicle is also an important factor in calculating your probable vehicle insurance quotes. The newer car models with good condition auto parts usually get lower monthly insurance premiums. These are the major six factors which help to decide the probable car insurance quotes for your vehicle. Getting an online motor insurance quote will save you a great deal of time and energy as well as it will help you in finding out the most affordable vehicle insurance quotes quickly. You can visit car insurance websites like GoCompare or InsurAcar for quotes. Copyright © 2019 Rev it Up Car Insurance Quotes.
#undef DEBUG /* * ARM performance counter support. * * Copyright (C) 2009 picoChip Designs, Ltd., Jamie Iles * Copyright (C) 2010 ARM Ltd., Will Deacon <[email protected]> * * This code is based on the sparc64 perf event code, which is in turn based * on the x86 code. */ #define pr_fmt(fmt) "hw perfevents: " fmt #include <linux/kernel.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/irq.h> #include <linux/irqdesc.h> #include <asm/irq_regs.h> #include <asm/pmu.h> static int armpmu_map_cache_event(const unsigned (*cache_map) [PERF_COUNT_HW_CACHE_MAX] [PERF_COUNT_HW_CACHE_OP_MAX] [PERF_COUNT_HW_CACHE_RESULT_MAX], u64 config) { unsigned int cache_type, cache_op, cache_result, ret; cache_type = (config >> 0) & 0xff; if (cache_type >= PERF_COUNT_HW_CACHE_MAX) return -EINVAL; cache_op = (config >> 8) & 0xff; if (cache_op >= PERF_COUNT_HW_CACHE_OP_MAX) return -EINVAL; cache_result = (config >> 16) & 0xff; if (cache_result >= PERF_COUNT_HW_CACHE_RESULT_MAX) return -EINVAL; ret = (int)(*cache_map)[cache_type][cache_op][cache_result]; if (ret == CACHE_OP_UNSUPPORTED) return -ENOENT; return ret; } static int armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config) { int mapping; if (config >= PERF_COUNT_HW_MAX) return -EINVAL; mapping = (*event_map)[config]; return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping; } static int armpmu_map_raw_event(u32 raw_event_mask, u64 config) { return (int)(config & raw_event_mask); } int armpmu_map_event(struct perf_event *event, const unsigned (*event_map)[PERF_COUNT_HW_MAX], const unsigned (*cache_map) [PERF_COUNT_HW_CACHE_MAX] [PERF_COUNT_HW_CACHE_OP_MAX] [PERF_COUNT_HW_CACHE_RESULT_MAX], u32 raw_event_mask) { u64 config = event->attr.config; int type = event->attr.type; if (type == event->pmu->type) return armpmu_map_raw_event(raw_event_mask, config); switch (type) { case PERF_TYPE_HARDWARE: return armpmu_map_hw_event(event_map, config); case PERF_TYPE_HW_CACHE: return armpmu_map_cache_event(cache_map, config); case PERF_TYPE_RAW: return armpmu_map_raw_event(raw_event_mask, config); } return -ENOENT; } int armpmu_event_set_period(struct perf_event *event) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct hw_perf_event *hwc = &event->hw; s64 left = local64_read(&hwc->period_left); s64 period = hwc->sample_period; int ret = 0; if (unlikely(left <= -period)) { left = period; local64_set(&hwc->period_left, left); hwc->last_period = period; ret = 1; } if (unlikely(left <= 0)) { left += period; local64_set(&hwc->period_left, left); hwc->last_period = period; ret = 1; } if (left > (s64)armpmu->max_period) left = armpmu->max_period; local64_set(&hwc->prev_count, (u64)-left); armpmu->write_counter(event, (u64)(-left) & 0xffffffff); perf_event_update_userpage(event); return ret; } u64 armpmu_event_update(struct perf_event *event) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct hw_perf_event *hwc = &event->hw; u64 delta, prev_raw_count, new_raw_count; again: prev_raw_count = local64_read(&hwc->prev_count); new_raw_count = armpmu->read_counter(event); if (local64_cmpxchg(&hwc->prev_count, prev_raw_count, new_raw_count) != prev_raw_count) goto again; delta = (new_raw_count - prev_raw_count) & armpmu->max_period; local64_add(delta, &event->count); local64_sub(delta, &hwc->period_left); return new_raw_count; } static void armpmu_read(struct perf_event *event) { armpmu_event_update(event); } static void armpmu_stop(struct perf_event *event, int flags) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct hw_perf_event *hwc = &event->hw; /* * ARM pmu always has to update the counter, so ignore * PERF_EF_UPDATE, see comments in armpmu_start(). */ if (!(hwc->state & PERF_HES_STOPPED)) { armpmu->disable(event); armpmu_event_update(event); hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE; } } static void armpmu_start(struct perf_event *event, int flags) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct hw_perf_event *hwc = &event->hw; /* * ARM pmu always has to reprogram the period, so ignore * PERF_EF_RELOAD, see the comment below. */ if (flags & PERF_EF_RELOAD) WARN_ON_ONCE(!(hwc->state & PERF_HES_UPTODATE)); hwc->state = 0; /* * Set the period again. Some counters can't be stopped, so when we * were stopped we simply disabled the IRQ source and the counter * may have been left counting. If we don't do this step then we may * get an interrupt too soon or *way* too late if the overflow has * happened since disabling. */ armpmu_event_set_period(event); armpmu->enable(event); } static void armpmu_del(struct perf_event *event, int flags) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); struct hw_perf_event *hwc = &event->hw; int idx = hwc->idx; armpmu_stop(event, PERF_EF_UPDATE); hw_events->events[idx] = NULL; clear_bit(idx, hw_events->used_mask); if (armpmu->clear_event_idx) armpmu->clear_event_idx(hw_events, event); perf_event_update_userpage(event); } static int armpmu_add(struct perf_event *event, int flags) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); struct hw_perf_event *hwc = &event->hw; int idx; int err = 0; perf_pmu_disable(event->pmu); /* If we don't have a space for the counter then finish early. */ idx = armpmu->get_event_idx(hw_events, event); if (idx < 0) { err = idx; goto out; } /* * If there is an event in the counter we are going to use then make * sure it is disabled. */ event->hw.idx = idx; armpmu->disable(event); hw_events->events[idx] = event; hwc->state = PERF_HES_STOPPED | PERF_HES_UPTODATE; if (flags & PERF_EF_START) armpmu_start(event, PERF_EF_RELOAD); /* Propagate our changes to the userspace mapping. */ perf_event_update_userpage(event); out: perf_pmu_enable(event->pmu); return err; } static int validate_event(struct pmu_hw_events *hw_events, struct perf_event *event) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); if (is_software_event(event)) return 1; if (event->state < PERF_EVENT_STATE_OFF) return 1; if (event->state == PERF_EVENT_STATE_OFF && !event->attr.enable_on_exec) return 1; return armpmu->get_event_idx(hw_events, event) >= 0; } static int validate_group(struct perf_event *event) { struct perf_event *sibling, *leader = event->group_leader; struct pmu_hw_events fake_pmu; /* * Initialise the fake PMU. We only need to populate the * used_mask for the purposes of validation. */ memset(&fake_pmu.used_mask, 0, sizeof(fake_pmu.used_mask)); if (!validate_event(&fake_pmu, leader)) return -EINVAL; list_for_each_entry(sibling, &leader->sibling_list, group_entry) { if (!validate_event(&fake_pmu, sibling)) return -EINVAL; } if (!validate_event(&fake_pmu, event)) return -EINVAL; return 0; } static irqreturn_t armpmu_dispatch_irq(int irq, void *dev) { struct arm_pmu *armpmu; struct platform_device *plat_device; struct arm_pmu_platdata *plat; int ret; u64 start_clock, finish_clock; /* * we request the IRQ with a (possibly percpu) struct arm_pmu**, but * the handlers expect a struct arm_pmu*. The percpu_irq framework will * do any necessary shifting, we just need to perform the first * dereference. */ armpmu = *(void **)dev; plat_device = armpmu->plat_device; plat = dev_get_platdata(&plat_device->dev); start_clock = sched_clock(); if (plat && plat->handle_irq) ret = plat->handle_irq(irq, armpmu, armpmu->handle_irq); else ret = armpmu->handle_irq(irq, armpmu); finish_clock = sched_clock(); perf_sample_event_took(finish_clock - start_clock); return ret; } static void armpmu_release_hardware(struct arm_pmu *armpmu) { armpmu->free_irq(armpmu); pm_runtime_put_sync(&armpmu->plat_device->dev); } static int armpmu_reserve_hardware(struct arm_pmu *armpmu) { int err; struct platform_device *pmu_device = armpmu->plat_device; if (!pmu_device) return -ENODEV; pm_runtime_get_sync(&pmu_device->dev); err = armpmu->request_irq(armpmu, armpmu_dispatch_irq); if (err) { armpmu_release_hardware(armpmu); return err; } return 0; } static void hw_perf_event_destroy(struct perf_event *event) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); atomic_t *active_events = &armpmu->active_events; struct mutex *pmu_reserve_mutex = &armpmu->reserve_mutex; if (atomic_dec_and_mutex_lock(active_events, pmu_reserve_mutex)) { armpmu_release_hardware(armpmu); mutex_unlock(pmu_reserve_mutex); } } static int event_requires_mode_exclusion(struct perf_event_attr *attr) { return attr->exclude_idle || attr->exclude_user || attr->exclude_kernel || attr->exclude_hv; } static int __hw_perf_event_init(struct perf_event *event) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct hw_perf_event *hwc = &event->hw; int mapping; mapping = armpmu->map_event(event); if (mapping < 0) { pr_debug("event %x:%llx not supported\n", event->attr.type, event->attr.config); return mapping; } /* * We don't assign an index until we actually place the event onto * hardware. Use -1 to signify that we haven't decided where to put it * yet. For SMP systems, each core has it's own PMU so we can't do any * clever allocation or constraints checking at this point. */ hwc->idx = -1; hwc->config_base = 0; hwc->config = 0; hwc->event_base = 0; /* * Check whether we need to exclude the counter from certain modes. */ if ((!armpmu->set_event_filter || armpmu->set_event_filter(hwc, &event->attr)) && event_requires_mode_exclusion(&event->attr)) { pr_debug("ARM performance counters do not support " "mode exclusion\n"); return -EOPNOTSUPP; } /* * Store the event encoding into the config_base field. */ hwc->config_base |= (unsigned long)mapping; if (!is_sampling_event(event)) { /* * For non-sampling runs, limit the sample_period to half * of the counter width. That way, the new counter value * is far less likely to overtake the previous one unless * you have some serious IRQ latency issues. */ hwc->sample_period = armpmu->max_period >> 1; hwc->last_period = hwc->sample_period; local64_set(&hwc->period_left, hwc->sample_period); } if (event->group_leader != event) { if (validate_group(event) != 0) return -EINVAL; } return 0; } static int armpmu_event_init(struct perf_event *event) { struct arm_pmu *armpmu = to_arm_pmu(event->pmu); int err = 0; atomic_t *active_events = &armpmu->active_events; /* does not support taken branch sampling */ if (has_branch_stack(event)) return -EOPNOTSUPP; if (armpmu->map_event(event) == -ENOENT) return -ENOENT; event->destroy = hw_perf_event_destroy; if (!atomic_inc_not_zero(active_events)) { mutex_lock(&armpmu->reserve_mutex); if (atomic_read(active_events) == 0) err = armpmu_reserve_hardware(armpmu); if (!err) atomic_inc(active_events); mutex_unlock(&armpmu->reserve_mutex); } if (err) return err; err = __hw_perf_event_init(event); if (err) hw_perf_event_destroy(event); return err; } static void armpmu_enable(struct pmu *pmu) { struct arm_pmu *armpmu = to_arm_pmu(pmu); struct pmu_hw_events *hw_events = this_cpu_ptr(armpmu->hw_events); int enabled = bitmap_weight(hw_events->used_mask, armpmu->num_events); if (enabled) armpmu->start(armpmu); } static void armpmu_disable(struct pmu *pmu) { struct arm_pmu *armpmu = to_arm_pmu(pmu); armpmu->stop(armpmu); } #ifdef CONFIG_PM static int armpmu_runtime_resume(struct device *dev) { struct arm_pmu_platdata *plat = dev_get_platdata(dev); if (plat && plat->runtime_resume) return plat->runtime_resume(dev); return 0; } static int armpmu_runtime_suspend(struct device *dev) { struct arm_pmu_platdata *plat = dev_get_platdata(dev); if (plat && plat->runtime_suspend) return plat->runtime_suspend(dev); return 0; } #endif const struct dev_pm_ops armpmu_dev_pm_ops = { SET_RUNTIME_PM_OPS(armpmu_runtime_suspend, armpmu_runtime_resume, NULL) }; static void armpmu_init(struct arm_pmu *armpmu) { atomic_set(&armpmu->active_events, 0); mutex_init(&armpmu->reserve_mutex); armpmu->pmu = (struct pmu) { .pmu_enable = armpmu_enable, .pmu_disable = armpmu_disable, .event_init = armpmu_event_init, .add = armpmu_add, .del = armpmu_del, .start = armpmu_start, .stop = armpmu_stop, .read = armpmu_read, }; } int armpmu_register(struct arm_pmu *armpmu, int type) { armpmu_init(armpmu); pm_runtime_enable(&armpmu->plat_device->dev); pr_info("enabled with %s PMU driver, %d counters available\n", armpmu->name, armpmu->num_events); return perf_pmu_register(&armpmu->pmu, armpmu->name, type); }
The film stars Justin Long Matthew Gray Gubler, David Cross, Jesse McCartney, Cameron Richardson Jason Lee. Post your comments about free alvin the chipmunks christmas song mp3 download. Free personal radio that learns from your taste and connects you to others who like what you like. To start this download lagu you need to click on [ Download] Button. Jango is about making online music social fun simple. Results including keyword ' alvin the chipmunks christmas song' Alvin the Chipmunks Christmas Song source: - file ext: mp3. Enjoy downloading Alvin And The Chipmunks – Home –. Skip to main content. Alvin the Chipmunks is a five- time Grammy Award- winning animated music group, created by Ross Bagdasarian Sr. For a novelty record in 1958. Good Quality Movie only 242 MB. Alvin and the chipmunks 2 songs download free. Alvin & the Chipmunks. Request a FREE Catalog. View Catalogs Online. Category Film & Animation; Song So What; Artist The Chipettes; Writers Pink EMI Music Publishing, Max Martin; Licensed to YouTube by WMG; LatinAutor, Shellback BMI - Broadcast Music Inc. Alvin And The Chipmunks - All 3 Songs - Duration:. The group consists of three singing animated anthropomorphic chipmunks: Alvin bespectacled intellectual; The Movie Alvin , the mischievous troublemaker, who quickly became the star of the group; Simon, the tall Chipmunks in English for Free By Going To Links shown Below. Free download Alvin And The Chipmunks Home Mp3. DVDs Blu- ray VHS. Alvin and the Chipmunks- bad day FREE MP3 DOWNLOAD YouTube;. : Alvin and the Chipmunks songs. Blue Christmas Elvis sings - - Free downloads, lyrics, FREE Christmas song to download, Facebook status - Christmas songs , carols, blog, words, add to MySpace, music video to copy , Facebook, music video including Christmas song lyrics , printable, midi for the season' s jingles, words for " Blue Christmas" with , singing Christmas Song print lyrics, song, music free Christmas songs. Alvin & the Chipmunks Songs List Overview Biography Songs Similar Artists DVDs CDs Vinyl Blu- ray. Alvin and the chipmunks 2 songs download free. Alvin and the Chipmunks is a American computer animated musical comedy film directed by Tim Hill. Convert this video to. ALL I WANT FOR CHRISTMAS IS MY TWO FRONT TEETH song lyrics, hundreds of Christmas songs , new favorites, please go grab Mum, ing the Fun Kids Website Hello, music including - ' All I Want For Christmas Is My Two Front Teeth' - 2 teeth, the BEST old , lyrics, Dad , BEST Christmas songs, video, chipmunks song lyrics another grown up to have a read through this. Alvin and the chipmunks 2 songs download free. Find album reviews award information for Alvin , credits , stream songs the Chipmunks 2 - The Chipmunks on AllMusic -. The group consists of three singing chipmunks: Alvin Theodore, the tall bespectacled intellectual, Simon, who quickly became the star of the group, the mischievous troublemaker, the chubby impressionable plete song listing of Alvin & the Chipmunks on. Alvin The Chipmunks Christmas Song Video. View Catalogs ee Alvin The Chipmunks Christmas Song Download Songs Mp3. It was released worldwide on December 14 by 20th Century Fox produced by Fox. All songs the chipmunks free download - Alvin The Chipmunks Popular All Songs Alvin The Chipmunks Popular Song New Music Lyrics, All Alvin The Chipmunks New Song Lyrics many more. Christmas sheet music is surprisingly hard to find when you want it. Prime Now FREE 2- hour Delivery on Everyday Items: Amazon Photos Unlimited Photo Storage Free With Prime:. The songs that you want may be very well known especially when you' re looking for certain instrumentations , but the actual arrangement you need can be extremely elusive ee Alvin The Chipmunks Christmas Song Download Songs Mp3. Alvin And The Chipmunks: The Squeakquel [ Original Motion Picture Soundtrack] ( Amazon Exclusive Version). Remember that by downloading this song you accept our terms and conditions. Based on the characters of the same name created by Ross Bagdasarian, Sr. Order Items by Catalog. Alvin the Chipmunks, simply the Chipmunks, the Chipmunks , originally David Seville are an American animated virtual band created by Ross Bagdasarian Sr. Alvin Alvin Hill The Chipmunks, The Chipmunks Wallpaper, the chipmunks free download - 200+ Alvin , The Chipmunks, Alvin Subway many more programs. Alvin and the Chipmunks- bad day FREE MP3 DOWNLOAD. We use little files - cookies - that we store on your computer to help personalise our website and allows us to keep track of how you use it.
Get social – regardless of your status! IGNITE welcomes the Phoenix LGBTQ+ Community to come together to get social with us each month! Join like-minded people who all agree to leave stigma & judgment at the door. Simply enjoy the company of new friends, free appetizers, great drinks, and our AMAZING community! What better way is there to expand your social circle!? IGNITE’s Monthly Mixer is held on the third Wednesday of each month downtown at Bliss/ReBar. Get to know new friends over yummy appetizers and delicious drinks. A selection of appetizers will be available at no cost. Drinks and a full menu of food is available for purchase – check out Bliss/ReBar’s menu here. IGNITE’s Monthly Mixer is free to attend! For the Monthly Mixers: A selection of appetizers are available for FREE! Drinks and other food items are available for purchase. You can view Bliss / ReBar’s menu by clicking here. Bliss/ReBar has generously provided the space for these events to IGNITE and appreciate your business. + What if I see somone I know? Relax – it’s just a Mixer! All we ask is that stigma related to HIV is checked at the door. Other than that – the mixer is open to our LGBTQ+ community and allies – regardless of status! No conclusions can be drawn about a person’s HIV status simply by attending the Mixer! The group is heavily mixed and status rarely even comes up. It’s simply a great way to meet new people in a local, status-neutral setting. So, if you see someone you know, do what you usually do when you see them!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_302) on Sun Aug 29 01:47:02 UTC 2021 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class net.glowstone.inventory.GlowMetaKnowledgeBook (Glowstone 2021.7.0-SNAPSHOT API)</title> <meta name="date" content="2021-08-29"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class net.glowstone.inventory.GlowMetaKnowledgeBook (Glowstone 2021.7.0-SNAPSHOT API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../net/glowstone/inventory/GlowMetaKnowledgeBook.html" title="class in net.glowstone.inventory">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?net/glowstone/inventory/class-use/GlowMetaKnowledgeBook.html" target="_top">Frames</a></li> <li><a href="GlowMetaKnowledgeBook.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class net.glowstone.inventory.GlowMetaKnowledgeBook" class="title">Uses of Class<br>net.glowstone.inventory.GlowMetaKnowledgeBook</h2> </div> <div class="classUseContainer">No usage of net.glowstone.inventory.GlowMetaKnowledgeBook</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../net/glowstone/inventory/GlowMetaKnowledgeBook.html" title="class in net.glowstone.inventory">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?net/glowstone/inventory/class-use/GlowMetaKnowledgeBook.html" target="_top">Frames</a></li> <li><a href="GlowMetaKnowledgeBook.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2021. All rights reserved.</small></p> </body> </html>
----------------------------------------- -- ID: 20858 -- Item: Lightreaver -- Additional Effect: DEATH ----------------------------------------- require("scripts/globals/status"); require("scripts/globals/magic"); require("scripts/globals/msg"); ----------------------------------- -- onAdditionalEffect Action ----------------------------------- function onAdditionalEffect(player,target,damage) local chance = 3; if (math.random(0,99) >= chance or applyResistanceAddEffect(player,target,ELE_DARK,0) <= 0.5) then return 0,0,0; elseif (target:isMob()) then if (target:isMobType(MOBTYPE_NOTORIOUS)) then return 0,0,0; else target:setHP(0) return SUBEFFECT_DEATH, msgBasic.ADD_EFFECT_STATUS, EFFECT_KO; end else target:setHP(0) return SUBEFFECT_DEATH, msgBasic.ADD_EFFECT_STATUS, EFFECT_KO; end end;
I made the Black Pepper chicken tonight for dinner. Very easy and delicious. Will definitely make again as a weeknight meal. The Essential Indian Instant Pot Cookbook is your source for simple, flavorful Indian favorites and contemporary weekday meals. With 75 well-tested recipes authorized by Instant Pot covering every meal of the day, this is a go-to resource for classic chicken, lamb, and vegetarian curries; daals, soups, and seafood like fennel and saffron spiced mussels; breakfast delights like cardamom spiced sweet potatoes and ginger almond oatmeal; and sweet treats like rose milk cake and fig and walnut halwa.
Mistress of vile deeds and evil doings. There are many categories to my store, but one of our best-selling, for literally decades, has been dice. We stock all different kinds of sets from many different companies. Literally, if a dice company has terms for wholesale, I set up an account. I will admit that through all of the manufacturers, Chessex seems to be the old standby. Our most popular types fo dice are sets of polyhedral dice for games like Dungeons and Dragons. I literally go through dozens of sets each week. Sets of 6 siders sell dramatically less, but still sell well. What I've found most unusual about the category is that even when RPG sales are flagging, my dice sales stay consistent. People love dice. And who can blame them? Can you really ever have enough dice? According to my customers, the answer is a resounding no. I'm working on developing a game mechanic into an OSR product. The mechanic is my take on percentile systems. Essentially, the DM sets the difficulty of the task, let's say its 50%. The Player's Ability Scores or Class then modify the difficulty. Let's say that I'm swing my sword at an orc, so I can either use my Strength (+10%) or Fighter Class (+20%). Fighter is the higher of the two and I use it and my modified chance to hit the orc is 70% on a d100 roll. I plan on 4 Classes: Fighter (your skill weapons and tactics), Thief (the usual skills), Wizard (which translates into your Mana Points to power spells), and Cleric (which translates into your Faith Points spells). At character creation you spread 20 points between the 4 Classes. I also plan on the typical 6 Ability Scores (Strength, Dexterity, Constitution, Intelligence, Wisdom, and Charisma). At character creation you spread 10 between the 6 Abilities. When a task comes up you look at the appropriate Ability or the Class. You choose the Highest of the 2. Humanoids that can walk as a quadruped or biped and hunt wooded areas. Special: Has Advantage on DEX checks to hide and use stealth. The Arcana of the Ancients Kickstarter rolls on. We currently have the main book, a bestiary, a deluxe version of the main book, and the next goal is the 9th World of Numenera for 5E. The user regains hit points equal to 1d6 x their level. Fireproofing SprayA nonliving object sprayed by this cypher is immune to fire damage for 24 hours. The user makes an attack roll against a single target within line of sight with this intelligent missile which deals 3d6 force damage. If the attack roll misses, roll a d6, the missile continues to attack for that many rounds on your Initiative count or until it hits. Eric Bloat of Bloat Games is a pretty swell guy. He gave me access to an ashcan copy of Blackest of Deaths, his new Dire Old School Fantasy RPG, that will be Kickstarted on April 9th. One of the most unique things about BoD is that it uses a D20 and a D6 for task resolution. Its a roll high mechanic where you want to meet or exceed your target number, so you add any modifiers to the D20 roll. However, you also look at the D6. Ignore a roll of 2-5. On a 1 you have a hindrance added to the outcome. On a 6 you have a benefit added to the outcome. So let's say that Clancy the Swift is attempting to scale a sheer wall in the dead of night with a storm raging. His D20 roll was only a 3 and he fails his attempt at the climb, but his D6 roll was a 6, so the sentries on the wall haven't noticed him. I really dig that the mechanic leaves room for the DM to interpret extra results and like how quick it is to both learn and use. I haven't posted about my Waterdeep/Undermountain game in a bit. The characters just hit 9th level at the end of last session (I use Milestones). Once they left Undermountain they've been focused on personal goals and accomplishments. The Cleric became a Templar of her Faith, in lieu of becoming Bishop. Due to an infernal deal she made her burn scars healed and her Charisma improved. Her Church took that as some great enlightenment and after a very well done improvisational speech in character, she had the clout to choose to be a Templar, the same rank as Bishop, but without all the paper work. Our Wizard is also a Paladin of Bane. In my Waterdeep, lycanthropic slavers known as the Red Door have nearly beaten the Zhentarim. A Zhent agent has convinced the Wizard to bring the Church of Bane into the fight with the Red Door. Things are going to get bloody fast, I think. Our Bard could literally drive the plotlines of a whole campaign by herself. She has currently hired out the Zhent agent to steal a violin from a Duchess so she can get the Bard's College off of her back. She also has a Patron/Romantic Interest who is missing her. Additionally, she has made a deal with Drow to get a baby chimera when it hatches and has an automaton they rescued making armor for it. Oh, and she has been one of two survivors (the other being the Cleric) who had called a truce with the leader of the Red Door. Our Fighter set up an agreement with Drow to send them 5 of his captives (from his nearby Lands) each month to open up lines of communication. His sister isn't very happy about it. Our Monk is a just your average Pandaran trying to avenge his gnome buddy. He's pretty sure they'd leave him to die if given the chance. Our Ranger is a quiet dude who gets things done. They've recently met a sect called the Aeon Priesthood who seem to dabble in time travel. He seems curious about them. We'll be down some players next session. I'd imagine the gang war plot line will be primary, but we'll see. Since they've hit 9th level, I'm beginning to lay the ground work for the climax of the campaign. We'll see how it goes.
# Hieracium mougeotii subsp. peramplum (Dahlst.) Zahn SUBSPECIES #### Status SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
package gost import ( "context" "crypto/aes" "crypto/cipher" "crypto/rand" "crypto/tls" "errors" "io" "net" "sync" "time" "github.com/go-log/log" quic "github.com/lucas-clemente/quic-go" ) type quicSession struct { conn net.Conn session quic.Session } func (session *quicSession) GetConn() (*quicConn, error) { stream, err := session.session.OpenStreamSync(context.Background()) if err != nil { return nil, err } return &quicConn{ Stream: stream, laddr: session.session.LocalAddr(), raddr: session.session.RemoteAddr(), }, nil } func (session *quicSession) Close() error { return session.session.CloseWithError(quic.ApplicationErrorCode(0), "closed") } type quicTransporter struct { config *QUICConfig sessionMutex sync.Mutex sessions map[string]*quicSession } // QUICTransporter creates a Transporter that is used by QUIC proxy client. func QUICTransporter(config *QUICConfig) Transporter { if config == nil { config = &QUICConfig{} } return &quicTransporter{ config: config, sessions: make(map[string]*quicSession), } } func (tr *quicTransporter) Dial(addr string, options ...DialOption) (conn net.Conn, err error) { opts := &DialOptions{} for _, option := range options { option(opts) } tr.sessionMutex.Lock() defer tr.sessionMutex.Unlock() session, ok := tr.sessions[addr] if !ok { var cc *net.UDPConn cc, err = net.ListenUDP("udp", &net.UDPAddr{IP: net.IPv4zero, Port: 0}) if err != nil { return } conn = cc if tr.config != nil && tr.config.Key != nil { conn = &quicCipherConn{UDPConn: cc, key: tr.config.Key} } session = &quicSession{conn: conn} tr.sessions[addr] = session } return session.conn, nil } func (tr *quicTransporter) Handshake(conn net.Conn, options ...HandshakeOption) (net.Conn, error) { opts := &HandshakeOptions{} for _, option := range options { option(opts) } config := tr.config if opts.QUICConfig != nil { config = opts.QUICConfig } if config.TLSConfig == nil { config.TLSConfig = &tls.Config{InsecureSkipVerify: true} } tr.sessionMutex.Lock() defer tr.sessionMutex.Unlock() timeout := opts.Timeout if timeout <= 0 { timeout = HandshakeTimeout } conn.SetDeadline(time.Now().Add(timeout)) defer conn.SetDeadline(time.Time{}) session, ok := tr.sessions[opts.Addr] if session != nil && session.conn != conn { conn.Close() return nil, errors.New("quic: unrecognized connection") } if !ok || session.session == nil { s, err := tr.initSession(opts.Addr, conn, config) if err != nil { conn.Close() delete(tr.sessions, opts.Addr) return nil, err } session = s tr.sessions[opts.Addr] = session } cc, err := session.GetConn() if err != nil { session.Close() delete(tr.sessions, opts.Addr) return nil, err } return cc, nil } func (tr *quicTransporter) initSession(addr string, conn net.Conn, config *QUICConfig) (*quicSession, error) { udpConn, ok := conn.(net.PacketConn) if !ok { return nil, errors.New("quic: wrong connection type") } udpAddr, err := net.ResolveUDPAddr("udp", addr) if err != nil { return nil, err } quicConfig := &quic.Config{ HandshakeIdleTimeout: config.Timeout, KeepAlive: config.KeepAlive, Versions: []quic.VersionNumber{ quic.Version1, quic.VersionDraft29, }, MaxIdleTimeout: config.IdleTimeout, } session, err := quic.Dial(udpConn, udpAddr, addr, tlsConfigQUICALPN(config.TLSConfig), quicConfig) if err != nil { log.Logf("quic dial %s: %v", addr, err) return nil, err } return &quicSession{conn: conn, session: session}, nil } func (tr *quicTransporter) Multiplex() bool { return true } // QUICConfig is the config for QUIC client and server type QUICConfig struct { TLSConfig *tls.Config Timeout time.Duration KeepAlive bool IdleTimeout time.Duration Key []byte } type quicListener struct { ln quic.Listener connChan chan net.Conn errChan chan error } // QUICListener creates a Listener for QUIC proxy server. func QUICListener(addr string, config *QUICConfig) (Listener, error) { if config == nil { config = &QUICConfig{} } quicConfig := &quic.Config{ HandshakeIdleTimeout: config.Timeout, KeepAlive: config.KeepAlive, MaxIdleTimeout: config.IdleTimeout, Versions: []quic.VersionNumber{ quic.Version1, quic.VersionDraft29, }, } tlsConfig := config.TLSConfig if tlsConfig == nil { tlsConfig = DefaultTLSConfig } var conn net.PacketConn udpAddr, err := net.ResolveUDPAddr("udp", addr) if err != nil { return nil, err } lconn, err := net.ListenUDP("udp", udpAddr) if err != nil { return nil, err } conn = lconn if config.Key != nil { conn = &quicCipherConn{UDPConn: lconn, key: config.Key} } ln, err := quic.Listen(conn, tlsConfigQUICALPN(tlsConfig), quicConfig) if err != nil { return nil, err } l := &quicListener{ ln: ln, connChan: make(chan net.Conn, 1024), errChan: make(chan error, 1), } go l.listenLoop() return l, nil } func (l *quicListener) listenLoop() { for { session, err := l.ln.Accept(context.Background()) if err != nil { log.Log("[quic] accept:", err) l.errChan <- err close(l.errChan) return } go l.sessionLoop(session) } } func (l *quicListener) sessionLoop(session quic.Session) { log.Logf("[quic] %s <-> %s", session.RemoteAddr(), session.LocalAddr()) defer log.Logf("[quic] %s >-< %s", session.RemoteAddr(), session.LocalAddr()) for { stream, err := session.AcceptStream(context.Background()) if err != nil { log.Log("[quic] accept stream:", err) session.CloseWithError(quic.ApplicationErrorCode(0), "closed") return } cc := &quicConn{Stream: stream, laddr: session.LocalAddr(), raddr: session.RemoteAddr()} select { case l.connChan <- cc: default: cc.Close() log.Logf("[quic] %s - %s: connection queue is full", session.RemoteAddr(), session.LocalAddr()) } } } func (l *quicListener) Accept() (conn net.Conn, err error) { var ok bool select { case conn = <-l.connChan: case err, ok = <-l.errChan: if !ok { err = errors.New("accpet on closed listener") } } return } func (l *quicListener) Addr() net.Addr { return l.ln.Addr() } func (l *quicListener) Close() error { return l.ln.Close() } type quicConn struct { quic.Stream laddr net.Addr raddr net.Addr } func (c *quicConn) LocalAddr() net.Addr { return c.laddr } func (c *quicConn) RemoteAddr() net.Addr { return c.raddr } type quicCipherConn struct { *net.UDPConn key []byte } func (conn *quicCipherConn) ReadFrom(data []byte) (n int, addr net.Addr, err error) { n, addr, err = conn.UDPConn.ReadFrom(data) if err != nil { return } b, err := conn.decrypt(data[:n]) if err != nil { return } copy(data, b) return len(b), addr, nil } func (conn *quicCipherConn) WriteTo(data []byte, addr net.Addr) (n int, err error) { b, err := conn.encrypt(data) if err != nil { return } _, err = conn.UDPConn.WriteTo(b, addr) if err != nil { return } return len(b), nil } func (conn *quicCipherConn) encrypt(data []byte) ([]byte, error) { c, err := aes.NewCipher(conn.key) if err != nil { return nil, err } gcm, err := cipher.NewGCM(c) if err != nil { return nil, err } nonce := make([]byte, gcm.NonceSize()) if _, err = io.ReadFull(rand.Reader, nonce); err != nil { return nil, err } return gcm.Seal(nonce, nonce, data, nil), nil } func (conn *quicCipherConn) decrypt(data []byte) ([]byte, error) { c, err := aes.NewCipher(conn.key) if err != nil { return nil, err } gcm, err := cipher.NewGCM(c) if err != nil { return nil, err } nonceSize := gcm.NonceSize() if len(data) < nonceSize { return nil, errors.New("ciphertext too short") } nonce, ciphertext := data[:nonceSize], data[nonceSize:] return gcm.Open(nil, nonce, ciphertext, nil) } func tlsConfigQUICALPN(tlsConfig *tls.Config) *tls.Config { if tlsConfig == nil { panic("quic: tlsconfig is nil") } tlsConfigQUIC := &tls.Config{} *tlsConfigQUIC = *tlsConfig tlsConfigQUIC.NextProtos = []string{"http/3", "quic/v1"} return tlsConfigQUIC }
package cn.elvea.platform.core.system.enums; import cn.elvea.platform.base.enums.BaseEnum; import lombok.Getter; /** * 数据范围 * * @author elvea * @since 0.0.1 */ @Getter public enum DataScoreTypeEnum implements BaseEnum<String> { ALL("ALL", "所有"), CURRENT_LEVEL_WITHOUT_CHILDREN("CURRENT_LEVEL_WITHOUT_CHILDREN", "本级"), CURRENT_LEVEL_WITH_CHILDREN("CURRENT_LEVEL_WITH_CHILDREN", "本级以及子级"), CUSTOMIZE("CUSTOMIZE", "自定义"), SELF("SELF", "个人"); private final String code; private final String description; DataScoreTypeEnum(final String code, final String description) { this.code = code; this.description = description; } public static DataScoreTypeEnum getAuthorityType(String code) { DataScoreTypeEnum[] ts = DataScoreTypeEnum.values(); for (DataScoreTypeEnum t : ts) { if (t.getCode().equalsIgnoreCase(code)) { return t; } } return SELF; } @Override public String getValue() { return this.code; } @Override public String getLabel() { return "label_authority_type__" + this.code.toLowerCase(); } }
Can you already imagine how you will operate your professional life coaching practice in Randall County, Texas? Have you thought about how rewarding it is to help people live their dreams? Your dreams are about to come true with your life coach training course and certification from the Spencer Institute. Your coach training with the Spencer Institute can take many different paths. In short, you have many options to totally customize your life coaching career in Randall County, Texas. Most coaches start with the Life Strategies Coach Certification to attain the high level of in-depth and base knowledge of life coaching techniques and methods before moving on to other life coaching certifications and workshops in Randall County, Texas. If your dream for your life coaching career is to help people overcome obstacles, gain direction in life, and gain clarity for their personal goals, you will learn all of that (and more) with the Life Strategies Coaching Certification in Randall County, Texas. After your earn your life coaching certification in Randall County, Texas, you can move on to our specialization certifications in unique niches of life coaching, such as wellness coaching, corporate wellness coaching, holistic coaching, green living coaching, design psychology coaching, food psychology coaching, sports psychology coaching and many others. The options to build your perfect life coaching career in Randall County, Texas are endless with the Spencer Institute.
Great home in desirable Roseville Neighborhood. Interior is neat and clean with fresh paint and new carpet. Backyard is low maintenance with large stamped concrete patio and low maintenance landscaping. Brand new landscaping in the front yard gives this home's curb appeal an A+! Home is located in the highly desirable Woodcreek High School area. Don't miss out on this desirable home!
Want to enjoy water skiing on this private lake? Call me today so I can explain how! Sarah Polley Realtor~ Your Local Friendly Neighborhood Realtor! You ready for a round of golf? Your home too would look good with a Splash of Blue! Breathtaking Golf Course Views and Frontages! Nothing says Lake Arrowhead better than this! Our area is full of many lake view homes along with lake front homes, docks and golf course frontages! Don’t miss out on these spectacular lake views! Summer is rapidly approaching!
In horse racing, there are stars, there are legends and then there is AP McCoy. In fact, Irish jump jockey Anthony Peter McCoy is so revered that he is known simply as AP (and occasionally The Champ), putting him right up there with other one-name celebs such as Elvis and God. In 1992, aged just 17, he won his first race. In 2013, he secured his 4,000th, winning 18 consecutive Champion Jockey titles along the way. To put that in perspective, the previous record holder was Peter Scudamore with seven. AP has won the lot in National Hunt racing – the Cheltenham Gold Cup, Champion Hurdle, Queen Mother Champion Chase, King George VI Chase and, finally, the Grand National (after a decade or so of trying) in 2010. And in case you don't believe just what a big deal AP really is, he's the only jockey to have won BBC Sports Personality of the Year, landing the big one in the same year he won the Grand National.
After returned from a trip to Sabah recently, with smile on my face I still couldn’t believe there are people out there seeking for my rehearsal tape. As requested, I brought that mp3 version of the tape to these guy there, who happened to be my old penpal since the 90’s. There is this overwhelming feeling and atmosphere as I gave him this piece of ‘junk’to him. It felt like I’ve just recorded that tape few days ago. It is about this rehearsal I’m going to tell you now…. The tape was the 2nd official tape released by The Ravens. An instrumental pieces of work and was written mostly by me. I remember, those days very clear it was me relentlessly composing the riffs and Yen would added some of his own skills and feels during rehearse. We were very much inspired by Mayhem, Sodom, Dissection on those days. I’m still in learning process to play guitar, while Yen was the best black metal guitarist I’ve ever meet. But the good thing in us, we never wanted to be a clone, we were always tried to do something brutal and original even it is not ‘cool’ to others. The TDK tape was recorded in M.A Studio by my friend, Malazrif using his mini compo during our rehearsal on 10th June 2000. Defunct and legend, but back in time M.A Studio is our place to throw our crafted anger, joy, frustrations, creativity, experiments and perversions. We recorded 4 songs on that day, it is “Bravery Black Leather”, which I wrote back in June 1999, “Hails Our Death” which I wrote in November 1999 - these two songs actually appeared in my 1st demo, but re-arranged and upgraded its brutality, “Towards The Raventhrone” I wrote in April 2000 and a cover of SODOM’S “Tombstone”. All blasted by necro zyklonic drums and guitar at its best. The true underground way…. At least, to my opinion. For your information, Samsul also known as Zirkelloch from Singaporean Kibosh Sybil Kismet (KSK) an old Doom Black metal band, done all the graphic design for the tape’s cover sleeves. It was impressive, as most of the bands in our era still use photocopy paper for their demo tape. But we did a full colors lazer printed covers. And it was pretty cheap in Singapore. The cover shown me doing fire-breathing with long iron chains on my neck and there is even a text ‘ Keep The Cross Upside Down’ at the back of the cover which described our attitude in The Ravens. And yes, the old school logo were done by me.
Beautiful and charming and calm duplex well situated in a residential cul-de-sac in CDN. Walking distance from Villa-Maria metro and all services. Sunfilled, hardwood floors, high ceilings and original mouldings and wood works. Fenced backyard. DOUBLE OCCUPANCY. Well Maintained. Perfect for a family or an investment!
The Foundation is honored to have been chosen for this year's Shabbaton Choir SOLIDARITY THROUGH SONG visit to Israel, with solo performances by Shimon Cramer, Lionel Rosenfeld and Rafi Posner, allowing ALL proceeds from this concert go to support the work of The Koby Mandell Foundation, helping bereaved children and families. This concert serves to commemorate the 18th anniversary since the murder of Koby Mandell and Yosef Ish Ran and the upcoming 18th summer of Camp Koby and Yosef. - providing a safe and healing camp for the hundreds of bereaved children. Appearing before audiences across Britain and around the world for over thirty years, the Shabbaton Choir performs original compositions as well as traditional favorites, combining cantorial and modern music to entertain and inspire.
<?php /** * Member controller * * @version 1.0 * @author Alvaro Torterola <[email protected]> */ class MemberController extends ApplicationController { /** * Prepare this controller * * @param void * @return MemberController */ function __construct() { parent::__construct(); prepare_company_website_controller($this, 'website'); } function init() { require_javascript("og/MemberManager.js"); ajx_current("panel", "members", null, null, true); ajx_replace(true); } function get_dimension_id() { ajx_current("empty"); $data_to_return = array(); $members_ids = json_decode(array_var($_REQUEST, 'member_id')); foreach ($members_ids as $key=>$m){ $member = Members::instance()->findById($m); if ($member instanceof Member) { $data = array(); $data['dim_id'] = $member->getDimensionId(); $data['member_id'] = $member->getId(); $data_to_return['dim_ids'][] = $data; } } ajx_extra_data(($data_to_return)); } function list_all() { ajx_current("empty"); // Get all variables from request $start = array_var($_GET,'start', 0); $limit = array_var($_GET,'limit', config_option('files_per_page')); $order = 'name'; $order_dir = array_var($_GET,'dir'); $action = array_var($_GET,'action'); $attributes = array("ids" => explode(',', array_var($_GET,'ids'))); if (!$order_dir){ switch ($order){ case 'name': $order_dir = 'ASC'; break; default: $order_dir = 'DESC'; } } $dim_id = array_var($_REQUEST, 'dim_id'); if (!is_numeric($dim_id)) return; $ot_id = array_var($_REQUEST, 'ot'); $dim_controller = new DimensionController(); $members = $dim_controller->initial_list_dimension_members($dim_id, $ot_id); $ids = array(); foreach ($members as $m){ $ids[]=$m['object_id']; } $members = active_context_members(false); // Context Members Ids $members_sql = ""; if(count($members) > 0){ $members_sql .= " AND parent_member_id IN (" . implode ( ',', $members ) . ")"; }else{ $members_sql .= " AND parent_member_id = 0"; //$members_sql .= ""; } $res = Members::findAll(array("conditions" => "object_id IN (".implode(',', $ids).") ". $members_sql,'offset' => $start, 'limit' => $limit, 'order' => "$order $order_dir")); $object = $this->prepareObject($res, $start, $limit, count($res)); ajx_extra_data($object); tpl_assign("listing", $object); } private function prepareObject($totMsg, $start, $limit, $total) { $object = array( "totalCount" => $total, "start" => $start, "dimension_id" => 0, "members" => array() ); for ($i = 0; $i < $limit; $i++){ if (isset($totMsg[$i])){ $member = $totMsg[$i]; if ($member instanceof Member){ $object["members"][] = array( 'object_id' => $member->getObjectId(), 'name' => $member->getName(), 'depth' => $member->getDepth(), 'parent_member_id' => $member->getParentMemberId(), 'dimension_id' => $member->getDimensionId(), 'id' => $member->getId(), 'ico_color' => $member->getMemberColor() ); } } } return $object; } /** * Adds a member to a dimension * * ED150217 * @param &$internal_data : must be definied to array() to get member */ function add(&$internal_data = FALSE) { if (!can_manage_dimension_members(logged_user())) { flash_error(lang('no access permissions')); ajx_current("empty"); return; } $member_data = array_var($_POST, 'member'); $member = new Member(); /*ED150217*/ if(is_array($internal_data)) $internal_data['member'] = $member; if (!is_array($member_data)) { $member_data = array(); if ($name = array_var($_GET,'name') ) { $member_data['name'] = $name; } if ($parent = array_var($_GET,'parent')) { tpl_assign('parent_sel', $parent); } tpl_assign('member_data', $member_data); // Permissions $permission_parameters = permission_member_form_parameters(); $logged_user_pg = array(); foreach ($permission_parameters['allowed_object_types'] as $ot){ $logged_user_pg[] = array( 'o' => $ot->getId(), 'w' => 1, 'd' => can_manage_dimension_members(logged_user()) ? 1 : 0, 'r' => 1 ); } $permission_parameters['member_permissions'][logged_user()->getPermissionGroupId()] = $logged_user_pg; // Add default permissions for executives, managers and administrators if (config_option('add_default_permissions_for_users')) { if ($parent == 0) { $users = Contacts::findAll(array('conditions' => "user_type IN (SELECT id FROM ".TABLE_PREFIX."permission_groups WHERE type='roles' AND name IN ('Executive','Manager','Administrator','Super Administrator'))")); } else { $users = array(); } foreach ($users as $user) { if (!isset($permission_parameters['member_permissions'][$user->getPermissionGroupId()]) || count($permission_parameters['member_permissions'][$user->getPermissionGroupId()]) == 0) { $user_pg = array(); foreach ($permission_parameters['allowed_object_types'] as $ot){ $role_perm = RoleObjectTypePermissions::findOne(array('conditions' => array("role_id=? AND object_type_id=?", $user->getUserType(), $ot->getId()))); $user_pg[] = array( 'o' => $ot->getId(), 'w' => $role_perm instanceof RoleObjectTypePermission ? ($role_perm->getCanWrite()?1:0) : 0, 'd' => $role_perm instanceof RoleObjectTypePermission ? ($role_perm->getCanDelete()?1:0) : 0, 'r' => $role_perm instanceof RoleObjectTypePermission ? 1 : 0, ); } $permission_parameters['member_permissions'][$user->getPermissionGroupId()] = $user_pg; } } } // Inherit parent permissions $parent_member = Members::findById($parent); if ($parent_member instanceof Member) { $cmps = ContactMemberPermissions::findAll(array('conditions' => 'member_id='.$parent_member->getId())); foreach ($cmps as $cmp){ $parent_pg = array( 'o' => $cmp->getObjectTypeId(), 'w' => $cmp->getCanWrite(), 'd' => $cmp->getCanDelete(), 'r' => 1 ); $permission_parameters['member_permissions'][$cmp->getPermissionGroupId()][] = $parent_pg; } } tpl_assign('permission_parameters', $permission_parameters); //-- tpl_assign("member", $member); $sel_dim = get_id("dim_id"); $current_dimension = Dimensions::getDimensionById($sel_dim); if (!$current_dimension instanceof Dimension) { flash_error("dimension dnx"); ajx_current("empty"); return; } tpl_assign("current_dimension", $current_dimension); $ot_ids = implode(",", DimensionObjectTypes::getObjectTypeIdsByDimension($current_dimension->getId())); $dimension_obj_types = ObjectTypes::findAll(array("conditions" => "`id` IN ($ot_ids)")); $dimension_obj_types_info = array(); foreach ($dimension_obj_types as $ot) { $info = $ot->getArrayInfo(array('id', 'name', 'type')); $info['name'] = lang(array_var($info, 'name')); $dimension_obj_types_info[] = $info; } tpl_assign('dimension_obj_types', $dimension_obj_types_info); if (isset($_GET['type'])) { tpl_assign('obj_type_sel', $_GET['type']); } else { if (count($dimension_obj_types_info) == 1) { tpl_assign('obj_type_sel', $dimension_obj_types_info[0]['id']); } } tpl_assign('parents', array()); tpl_assign('can_change_type', true); $restricted_dim_defs = DimensionMemberRestrictionDefinitions::findAll(array("conditions" => array("`dimension_id` = ?", $sel_dim))); $ot_with_restrictions = array(); foreach($restricted_dim_defs as $rdef) { if (!isset($ot_with_restrictions[$rdef->getObjectTypeId()])) $ot_with_restrictions[$rdef->getObjectTypeId()] = true; } tpl_assign('ot_with_restrictions', $ot_with_restrictions); $associations = DimensionMemberAssociations::findAll(array("conditions" => array("`dimension_id` = ?", $sel_dim))); $ot_with_associations = array(); foreach($associations as $assoc) { if (!isset($ot_with_associations[$assoc->getObjectTypeId()])) $ot_with_associations[$assoc->getObjectTypeId()] = true; } tpl_assign('ot_with_associations', $ot_with_associations); if (array_var($_GET, 'rest_genid') != "") tpl_assign('rest_genid', array_var($_GET, 'rest_genid')); if (array_var($_GET, 'prop_genid') != "") tpl_assign('prop_genid', array_var($_GET, 'prop_genid')); } else { try { $ok = $this->saveMember($member_data, $member); // if added from quick-add add default permissions for executives, managers and administrators if (config_option('add_default_permissions_for_users') && array_var($_GET, 'quick') && $member->getParentMemberId() == 0) { $users = Contacts::findAll(array('conditions' => "user_type IN (SELECT id FROM ".TABLE_PREFIX."permission_groups WHERE type='roles' AND name IN ('Executive','Manager','Administrator','Super Administrator'))")); if (!array_var($_REQUEST, 'permissions')) $_REQUEST['permissions'] = "[]"; $permissions_decoded = json_decode(array_var($_REQUEST, 'permissions')); foreach ($users as $user) { $role_perms = RoleObjectTypePermissions::findAll(array('conditions' => array("role_id=?", $user->getUserType()))); foreach ($role_perms as $role_perm) { $pg_obj = new stdClass(); $pg_obj->pg = $user->getPermissionGroupId(); $pg_obj->o = $role_perm->getObjectTypeId(); $pg_obj->d = $role_perm->getCanDelete(); $pg_obj->w = $role_perm->getCanWrite(); $pg_obj->r = 1; $permissions_decoded[] = $pg_obj; } } $_REQUEST['permissions'] = json_encode($permissions_decoded); } Env::useHelper('permissions'); save_member_permissions_background(logged_user(), $member, array_var($_REQUEST, 'permissions')); if ($ok) { ApplicationLogs::createLog($member, ApplicationLogs::ACTION_ADD); ajx_extra_data( array( "member"=>array( "id" => $member->getId(), "dimension_id" => $member->getDimensionId() ) )); $ret = null; Hook::fire('after_add_member', $member, $ret); evt_add("reload dimension tree", array('dim_id' => $member->getDimensionId())); $member_type = ObjectTypes::findById($member->getObjectTypeId()); $context = active_context(); $sel_mem = null; if (is_array($context)) { foreach ($context as $selection) { if ($selection instanceof Member && $selection->getDimensionId() == $member->getDimensionId()) $sel_mem = $selection; } } evt_add("ask to select member", array( 'id' => $member->getId(), 'name' => clean($member->getName()), 'type' => clean(lang($member_type->getName())), 'dimension_id' => $member->getDimensionId(), 'sel_mem' => $sel_mem == null ? '' : clean($sel_mem->getName()), )); //evt_add('select dimension member', array('dim_id' => $member->getDimensionId(), 'node' => $member->getId())); if (array_var($_POST, 'rest_genid')) evt_add('reload member restrictions', array_var($_POST, 'rest_genid')); if (array_var($_POST, 'prop_genid')) evt_add('reload member properties', array_var($_POST, 'prop_genid')); if (array_var($_GET, 'current') == 'overview-panel' && array_var($_GET, 'quick') ) { //ajx_current("reload"); } } } catch (Exception $e) { DB::rollback(); flash_error($e->getMessage()); ajx_current("empty"); } } } /* ED150217 * From edit, if duplication is required * **/ function duplicate(){ $original_member = Members::findById(get_id()); /* valeurs originales des propriétés personnalisées */ $sql = "SELECT custom_property_id, value FROM `fo_member_custom_property_values` WHERE `member_id` = ?"; $result = DB::execute($sql, array($original_member->getId())); $rows = $result->fetchAll(); $properties_values = array(); if ($rows){ foreach ($rows as $row){ $properties_values[$row['custom_property_id']] = $row; } } /* add */ $internal_data = array(); //Root member duplicated $this->add($internal_data); $member = $internal_data['member']; $memberId = $member->getId(); if(is_numeric($memberId)){ $original_member->duplicatePropertyValues($member); $original_member->duplicateContactsPermissions($member); //Duplicate children foreach($original_member->getAllChildren() as $orginal_child){ $orginal_child->duplicate($member); } /* propriétés personnalisées */ if($properties_values){ /* valeurs du formulaire */ $member_custom_properties = array_var($_POST, 'member_custom_properties'); $member_custom_properties_update_children = array_var($_POST, 'updatechildren_member_custom_properties'); foreach($member_custom_properties as $property => $value){ if(array_key_exists($property, $properties_values)){ //existe : UPDATE if(($properties_values[$property]['value'] != $value) && $member_custom_properties_update_children[$property]){ $this->updateChildrenPropertyValue($member, $property, $properties_values[$property]['value'], $value); } } } } } } function edit() { if (!can_manage_dimension_members(logged_user())) { flash_error(lang('no access permissions')); ajx_current("empty"); return; } if(isset($_POST['duplicate-member']) && $_POST['duplicate-member']){ $this->duplicate(); return; } $member = Members::findById(get_id()); if (!$member instanceof Member) { flash_error(lang('member dnx')); ajx_current("empty"); return; } $this->setTemplate('add'); $member_data = array_var($_POST, 'member'); if (!is_array($member_data)) { // New ! Permissions $permission_parameters = permission_member_form_parameters($member); tpl_assign('permission_parameters', $permission_parameters); //-- tpl_assign("member", $member); $member_data['name'] = $member->getName(); $current_dimension = $member->getDimension(); if (!$current_dimension instanceof Dimension) { flash_error("dimension dnx"); ajx_current("empty"); return; } tpl_assign("current_dimension", $current_dimension); $ot_ids = implode(",", DimensionObjectTypes::getObjectTypeIdsByDimension($current_dimension->getId())); $dimension_obj_types = ObjectTypes::findAll(array("conditions" => "`id` IN ($ot_ids)")); $dimension_obj_types_info = array(); foreach ($dimension_obj_types as $ot) { $info = $ot->getArrayInfo(array('id', 'name', 'type')); $info['name'] = lang(array_var($info, 'name')); $dimension_obj_types_info[] = $info; } tpl_assign('dimension_obj_types', $dimension_obj_types_info); tpl_assign('obj_type_sel', $member->getObjectTypeId()); tpl_assign('parents', self::getAssignableParents($member->getDimensionId(), $member->getObjectTypeId())); tpl_assign('parent_sel', $member->getParentMemberId()); tpl_assign("member_data", $member_data); tpl_assign('can_change_type', false); $restricted_dim_defs = DimensionMemberRestrictionDefinitions::findAll(array("conditions" => array("`dimension_id` = ?", $member->getDimensionId()))); $ot_with_restrictions = array(); foreach($restricted_dim_defs as $rdef) { if (!isset($ot_with_restrictions[$rdef->getObjectTypeId()])) $ot_with_restrictions[$rdef->getObjectTypeId()] = true; } tpl_assign('ot_with_restrictions', $ot_with_restrictions); $associations = DimensionMemberAssociations::findAll(array("conditions" => array("`dimension_id` = ?", $member->getDimensionId()))); $ot_with_associations = array(); foreach($associations as $assoc) { if (!isset($ot_with_associations[$assoc->getObjectTypeId()])) $ot_with_associations[$assoc->getObjectTypeId()] = true; } tpl_assign('ot_with_associations', $ot_with_associations); } else { try { $ok = $this->saveMember($member_data, $member, false); Env::useHelper('permissions'); //ED150416 added , array_var($_REQUEST, 'propagate_permissions') save_member_permissions_background(logged_user(), $member, array_var($_REQUEST, 'permissions'), array_var($_REQUEST, 'propagate_permissions')); if ($ok) { ApplicationLogs::createLog($member, ApplicationLogs::ACTION_EDIT); $ret = null; Hook::fire('after_edit_member', $member, $ret); evt_add("reload dimension tree", array('dim_id' => $member->getDimensionId(), 'mid' => $member->getId(), 'pid' => $member->getParentMemberId())); } } catch (Exception $e) { DB::rollback(); flash_error($e->getMessage()); ajx_current("empty"); } } } function saveMember($member_data, Member $member, $is_new = true) { try { DB::beginWork(); if (!$is_new) { $old_parent = $member->getParentMemberId(); } if (!isset($member_data['color']) && array_var($member_data, 'parent_member_id') > 0) { $p = Members::findById(array_var($member_data, 'parent_member_id')); $member_data['color'] = $p->getColor(); } $member_data['name'] = remove_css_and_scripts($member_data['name']); $member->setFromAttributes($member_data); /* @var $member Member */ $object_type = ObjectTypes::findById($member->getObjectTypeId()); if (!$object_type instanceof ObjectType) { throw new Exception(lang("you must select a valid object type")); } if ($member->getParentMemberId() == 0) { $dot = DimensionObjectTypes::findById(array('dimension_id' => $member->getDimensionId(), 'object_type_id' => $member->getObjectTypeId())); if (!$dot->getIsRoot()) { throw new Exception(lang("member cannot be root", lang($object_type->getName()))); } $member->setDepth(1); } else { $allowedParents = $this->getAssignableParents($member->getDimensionId(), $member->getObjectTypeId()); if (!$is_new) $childrenIds = $member->getAllChildrenIds(true); $hasValidParent = false ; if ($member->getId() == $member->getParentMemberId() || (!$is_new && in_array($member->getParentMemberId(), $childrenIds))) { throw new Exception(lang("invalid parent member")); } foreach ($allowedParents as $parent) { if ( $parent['id'] == $member->getParentMemberId() ){ $hasValidParent = true; break ; } } if (!$hasValidParent){ throw new Exception(lang("invalid parent member")); } $parent = Members::findById($member->getParentMemberId()); if ($parent instanceof Member) $member->setDepth($parent->getDepth() + 1); else $member->setDepth(1); } if ($object_type->getType() == 'dimension_object') { $handler_class = $object_type->getHandlerClass(); if ($is_new || $member->getObjectId() == 0) { eval('$dimension_object = '.$handler_class.'::instance()->newDimensionObject();'); } else { $dimension_object = Objects::findObject($member->getObjectId()); } if ($dimension_object) { $dimension_object->modifyMemberValidations($member); $dimension_obj_data = array_var($_POST, 'dim_obj'); if (!array_var($dimension_obj_data, 'name')) $dimension_obj_data['name'] = $member->getName(); eval('$fields = '.$handler_class.'::getPublicColumns();'); foreach ($fields as $field) { if (array_var($field, 'type') == DATA_TYPE_DATETIME) { $dimension_obj_data[$field['col']] = getDateValue($dimension_obj_data[$field['col']]); } } $member->save(); $dimension_object->setFromAttributes($dimension_obj_data, $member); $dimension_object->save(); $member->setObjectId($dimension_object->getId()); $member->save(); Hook::fire("after_add_dimension_object_member", $member, $null); } } else { $member->save(); } // add custom properties if (Plugins::instance()->isActivePlugin('crpm')) { $mcp_controller = new MemberCustomPropertiesController(); $mcp_controller->add_custom_properties($member); } // Other dimensions member restrictions $restricted_members = array_var($_POST, 'restricted_members'); if (is_array($restricted_members)) { MemberRestrictions::clearRestrictions($member->getId()); foreach ($restricted_members as $dim_id => $dim_members) { foreach ($dim_members as $mem_id => $member_restrictions) { $restricted = isset($member_restrictions['restricted']); if ($restricted) { $order_num = array_var($member_restrictions, 'order_num', 0); $member_restriction = new MemberRestriction(); $member_restriction->setMemberId($member->getId()); $member_restriction->setRestrictedMemberId($mem_id); $member_restriction->setOrder($order_num); $member_restriction->save(); } } } } // Save member property members (also check for required associations) /* ED141218 : save_properties n'est jamais défini. voir else */ if (array_var($_POST, 'save_properties')) { $required_association_ids = DimensionMemberAssociations::getRequiredAssociatations($member->getDimensionId(), $member->getObjectTypeId(), true); $missing_req_association_ids = array_fill_keys($required_association_ids, true); // if keeps record change is_active, if not delete record $old_properties = MemberPropertyMembers::getAssociatedPropertiesForMember($member->getId()); foreach ($old_properties as $property){ $association = DimensionMemberAssociations::findById($property->getAssociationId()); if (!$association->getKeepsRecord()){ $property->delete(); } } $new_properties = array(); $associated_members = array_var($_POST, 'associated_members', array()); foreach($associated_members as $prop_member_id => $assoc_id) { $active_association = null; if (isset($missing_req_association_ids[$assoc_id])) $missing_req_association_ids[$assoc_id] = false; $conditions = "`association_id` = $assoc_id AND `member_id` = ".$member->getId()." AND `is_active` = 1"; $active_associations = MemberPropertyMembers::find(array('conditions'=>$conditions)); if (count($active_associations)>0) $active_association = $active_associations[0]; $association = DimensionMemberAssociations::findById($assoc_id); if ($active_association instanceof MemberPropertyMember){ if ($active_association->getPropertyMemberId() != $prop_member_id){ if ($association->getKeepsRecord()){ $active_association->setIsActive(false); $active_association->save(); } // save current association $mpm = new MemberPropertyMember(); $mpm->setAssociationId($assoc_id); $mpm->setMemberId($member->getId()); $mpm->setPropertyMemberId($prop_member_id); $mpm->setIsActive(true); $mpm->save(); $new_properties[] = $mpm; } } else{ // save current association $mpm = new MemberPropertyMember(); $mpm->setAssociationId($assoc_id); $mpm->setMemberId($member->getId()); $mpm->setPropertyMemberId($prop_member_id); $mpm->setIsActive(true); $mpm->save(); $new_properties[] = $mpm; } } $missing_names = array(); $missing_count = 0; foreach ($missing_req_association_ids as $assoc => $missing) { $assoc_instance = DimensionMemberAssociations::findById($assoc); if ($assoc_instance instanceof DimensionMemberAssociation) { $assoc_dim = Dimensions::getDimensionById($assoc_instance->getAssociatedDimensionMemberAssociationId()); if ($assoc_dim instanceof Dimension) { if (!in_array($assoc_dim->getName(), $missing_names)) $missing_names[] = $assoc_dim->getName(); } } if ($missing) $missing_count++; } if ($missing_count > 0) { throw new Exception(lang("missing required associations", implode(", ", $missing_names))); } $args = array($member, $old_properties, $new_properties); Hook::fire('edit_member_properties', $args, $ret); } else if (array_var($_POST, 'save_propertiesED141218')) { /*ED141218 : depuis la mise à jour, il n'y a plus de sauvegarde */ /* valeurs existantes */ $sql = "SELECT custom_property_id, value, id FROM `fo_member_custom_property_values` WHERE `member_id` = ?"; $result = DB::execute($sql, array($member->getId())); $rows = $result->fetchAll(); $properties_values = array(); if ($rows){ foreach ($rows as $row){ $properties_values[$row['custom_property_id']] = $row; } } /* valeurs du formulaire */ $member_custom_properties = array_var($_POST, 'member_custom_properties'); $member_custom_properties_update_children = array_var($_POST, 'updatechildren_member_custom_properties'); foreach($member_custom_properties as $property => $value){ if(array_key_exists($property, $properties_values)){ //existe : UPDATE if($properties_values[$property]['value'] != $value){ $sql = "UPDATE `fo_member_custom_property_values` SET `value` = ? WHERE id = ?"; $result = DB::execute($sql, array($value, $properties_values[$property]['id'])); if($member_custom_properties_update_children[$property]){ $this->updateChildrenPropertyValue($member, $property, $properties_values[$property]['value'], $value); } } } else { // nouveau : INSERT INTO $sql = "INSERT INTO `fo_member_custom_property_values` (`member_id`, `custom_property_id`, `value`) VALUES(?, ?, ?)"; $result = DB::execute($sql, array($member->getId(), $property, $value)); if($member_custom_properties_update_children[$property]){ $this->updateChildrenPropertyValue($member, $property, null, $value); } } } } $ret = null; Hook::fire('after_member_save', $member, $ret); if ($is_new) { // set all permissions for the creator $dimension = $member->getDimension(); $allowed_object_types = array(); $dim_obj_types = $dimension->getAllowedObjectTypeContents(); foreach ($dim_obj_types as $dim_obj_type) { // To draw a row for each object type of the dimension if (!in_array($dim_obj_type->getContentObjectTypeId(), $allowed_object_types) && $dim_obj_type->getDimensionObjectTypeId() == $member->getObjectTypeId()) { $allowed_object_types[] = $dim_obj_type->getContentObjectTypeId(); } } $allowed_object_types[]=$object_type->getId(); foreach ($allowed_object_types as $ot) { $cmp = ContactMemberPermissions::findOne(array('conditions' => 'permission_group_id = '.logged_user()->getPermissionGroupId().' AND member_id = '.$member->getId().' AND object_type_id = '.$ot)); if (!$cmp instanceof ContactMemberPermission) { $cmp = new ContactMemberPermission(); $cmp->setPermissionGroupId(logged_user()->getPermissionGroupId()); $cmp->setMemberId($member->getId()); $cmp->setObjectTypeId($ot); } $cmp->setCanWrite(1); $cmp->setCanDelete(1); $cmp->save(); } // set all permissions for permission groups that has allow all in the dimension $permission_groups = ContactDimensionPermissions::findAll(array("conditions" => array("`dimension_id` = ? AND `permission_type` = 'allow all'", $dimension->getId()))); if (is_array($permission_groups)) { foreach ($permission_groups as $pg) { foreach ($allowed_object_types as $ot) { $cmp = ContactMemberPermissions::findById(array('permission_group_id' => $pg->getPermissionGroupId(), 'member_id' => $member->getId(), 'object_type_id' => $ot)); if (!$cmp instanceof ContactMemberPermission) { $cmp = new ContactMemberPermission(); $cmp->setPermissionGroupId($pg->getPermissionGroupId()); $cmp->setMemberId($member->getId()); $cmp->setObjectTypeId($ot); } $cmp->setCanWrite(1); $cmp->setCanDelete(1); $cmp->save(); } } } // Inherit permissions from parent node, if they are not already set if ( $member->getDepth() && $member->getParentMember() ) { $parentNodeId = $member->getParentMember()->getId(); $condition = "member_id = $parentNodeId" ; foreach ( ContactMemberPermissions::instance()->findAll(array("conditions"=>$condition)) as $parentPermission ){ /* @var $parentPermission ContactMemberPermission */ $g = $parentPermission->getPermissionGroupId() ; $t = $parentPermission->getObjectTypeId() ; $w = $parentPermission->getCanWrite() ; $d = $parentPermission->getCanDelete() ; $existsCondition = "member_id = ".$member->getId()." AND permission_group_id= $g AND object_type_id = $t"; if (!ContactMemberPermissions::instance()->count(array("conditions"=>$existsCondition))){ $newPermission = new ContactMemberPermission(); $newPermission->setPermissionGroupId($g); $newPermission->setObjectTypeId($t); $newPermission->setCanWrite($w); $newPermission->setCanDelete($d); $newPermission->setMemberId($member->getId()); $newPermission->save(); } } } // Fill sharing table if is a dimension object (after permission creation); if (isset($dimension_object) && $dimension_object instanceof ContentDataObject) { $dimension_object->addToSharingTable(); } } else { // if parent changed rebuild object_members for every object in this member if ($old_parent != $member->getParentMemberId()) { $sql = "SELECT om.object_id FROM ".TABLE_PREFIX."object_members om WHERE om.member_id=".$member->getId(); $object_ids = DB::executeAll($sql); $ids_str = ""; if (!is_array($object_ids)) $object_ids = array(); foreach ($object_ids as $row) { $content_object = Objects::findObject($row['object_id']); if (!$content_object instanceof ContentDataObject) continue; $parent_ids = array(); if ($old_parent > 0) { $all_parents = Members::findById($old_parent)->getAllParentMembersInHierarchy(true); foreach ($all_parents as $p) $parent_ids[] = $p->getId(); if (count($parent_ids) > 0) { DB::execute("DELETE FROM ".TABLE_PREFIX."object_members WHERE object_id=".$content_object->getId()." AND member_id IN (".implode(",",$parent_ids).")"); } } $content_object->addToMembers(array($member)); //$content_object->addToSharingTable(); $ids_str .= ($ids_str == "" ? "" : ",") . $content_object->getId(); } add_multilple_objects_to_sharing_table($ids_str, logged_user()); } } DB::commit(); flash_success(lang('success save member', lang(ObjectTypes::findById($member->getObjectTypeId())->getName()), $member->getName())); ajx_current("back"); // Add od to array on new members if ($is_new) { $member_data['member_id'] = $member->getId(); } $member_data['archived'] = $member->getArchivedById(); $member_data['path'] = trim(clean($member->getPath())); $member_data['ico'] = $member->getIconClass(); if (isset($allowed_object_types) && is_array($allowed_object_types)) { $member_data['perms'] = array(); foreach ($allowed_object_types as $ot_id) $member_data['perms'][$ot_id] = true; } evt_add("after member save", $member_data); return $member; } catch (Exception $e) { DB::rollback(); flash_error($e->getMessage()); throw $e; ajx_current("empty"); } } /* ED150217 * From edit, changes property value for each child with same old value * **/ function updateChildrenPropertyValue($member, $propertyId, $oldValue, $newValue){ $allChildren = $member->getAllChildrenIds(true); //var_dump($member->getId(), $propertyId, $oldValue, $newValue, $allChildren); if(!$allChildren) return; if($oldValue === null){ $sql = "INSERT INTO `fo_member_custom_property_values` (`member_id`, `custom_property_id`, `value`)"; $params = array(); foreach($allChildren as $child){ if(count($params)) $sql .= ' VALUES'; else $sql .= ', '; $sql .= "(?, ?, ?)"; $params[] = $child; $params[] = $property; $params[] = $value; } $result = DB::execute($sql, $params); } else{ $sql = "UPDATE `fo_member_custom_property_values` SET `value` = ? WHERE member_id IN (" . substr(str_repeat(',?', count($allChildren)),1) . ") AND `value` = ?"; $params = array($newValue); $params = array_merge($params, $allChildren); $params[] = $oldValue; $result = DB::execute($sql, $params); } } function delete() { if(!can_manage_dimension_members(logged_user())) { flash_error(lang('no access permissions')); ajx_current("empty"); return; } $member = Members::findById(get_id()); if (!$member instanceof Member) { ajx_current("empty"); return; } try { DB::beginWork(); if (!$member->canBeDeleted($error_message)) { throw new Exception($error_message); } $dim_id = $member->getDimensionId(); // Remove from sharing table $sqlDeleteSharingTable = "DELETE sh FROM `".TABLE_PREFIX."sharing_table` sh LEFT JOIN `".TABLE_PREFIX."object_members` om ON om.object_id = sh.object_id WHERE om.member_id = ".$member->getId()." AND om.is_optimization = 0;"; DB::execute($sqlDeleteSharingTable); $affectedObjectsRows = DB::executeAll("SELECT distinct(object_id) AS object_id FROM ".TABLE_PREFIX."object_members where member_id = ".$member->getId()." AND is_optimization = 0") ; if (is_array($affectedObjectsRows) && count($affectedObjectsRows) > 0) { $ids_str = ""; foreach ( $affectedObjectsRows as $row ) { $oid = $row['object_id']; $ids_str .= ($ids_str == "" ? "" : ",") . $oid; } add_multilple_objects_to_sharing_table($ids_str, logged_user()); } // remove member associations MemberPropertyMembers::delete('member_id = '.$member->getId().' OR property_member_id = '.$member->getId()); MemberRestrictions::delete('member_id = '.$member->getId().' OR restricted_member_id = '.$member->getId()); // remove from permissions tables ContactMemberPermissions::delete('member_id = '.$member->getId()); PermissionContexts::delete('member_id = '.$member->getId()); // remove associated content object if ($member->getObjectId() > 0) { $mobj = Objects::findObject($member->getObjectId()); if ($mobj instanceof ContentDataObject) $mobj->delete(); } // delete from object_members ObjectMembers::delete('member_id = '.$member->getId()); Hook::fire('delete_member', $member, $ret); $ok = $member->delete(false); if ($ok) { evt_add("reload dimension tree", array('dim_id' => $dim_id, 'node' => null)); evt_add("select dimension member", array('dim_id' => $dim_id, 'node' => 'root')); } DB::commit(); flash_success(lang('success delete member', $member->getName())); if (get_id('start')) { ajx_current("start"); } else { if (get_id('dont_reload')) { ajx_current("empty"); } else { ajx_current("reload"); } } } catch (Exception $e) { DB::rollback(); flash_error($e->getMessage()); ajx_current("empty"); } } function get_dimension_object_fields() { ajx_current("empty"); if (!can_manage_dimension_members(logged_user())) { flash_error(lang('no access permissions')); return; } $object_type = ObjectTypes::findById(get_id()); if (!$object_type instanceof ObjectType) { flash_error(lang('object type dnx')); return; } $handler_class = $object_type->getHandlerClass(); eval('$fields = '.$handler_class.'::getPublicColumns();'); if (get_id('mem_id') > 0) { $date_format = user_config_option('date_format'); $member = Members::findById(get_id('mem_id')); if ($member instanceof Member) { $dim_obj = Objects::findObject($member->getObjectId()); } if (isset($dim_obj) && !is_null($dim_obj)) { foreach($fields as &$field) { $value = $dim_obj->getColumnValue($field['col']); if ($field['type'] == DATA_TYPE_DATETIME && $value instanceOf DateTimeValue) { $value = $value->format($date_format); } $field['val'] = $value; } } } else { // inherit color from parent $color_columns = array(); foreach ($fields as $f) { if ($f['type'] == DATA_TYPE_WSCOLOR) { $color_columns[] = $f['col']; } } $parent_id = get_id('parent_id'); if (count($color_columns) > 0 && $parent_id > 0) { $parent_member = Members::findById($parent_id); if ($parent_member instanceof Member) { $dimension_object = Objects::findObject($parent_member->getObjectId()); if ($dimension_object instanceof ContentDataObject) { foreach ($color_columns as $col) { foreach ($fields as &$f) { if ($f['col'] == $col && $dimension_object->columnExists($col)) { $f['val'] = $dimension_object->getColumnValue($col); } } } } } } } $data = array( 'fields' => $fields, 'title' => lang($object_type->getName()) ); ajx_extra_data($data); } function get_dimensions_for_restrictions() { if(!can_manage_dimension_members(logged_user())) { flash_error(lang('no access permissions')); ajx_current("empty"); return; } $dim_id = get_id(); $obj_type = get_id('otype'); $restricted_dim_defs = DimensionMemberRestrictionDefinitions::findAll(array("conditions" => array("`dimension_id` = ? AND `object_type_id` = ?", $dim_id, $obj_type))); $restricted_ids_csv = ""; $orderable_dimensions_otypes = array(); foreach($restricted_dim_defs as $def) { $restricted_ids_csv .= ($restricted_ids_csv == "" ? "" : ",") . $def->getRestrictedDimensionId(); if ($def->getIsOrderable()) $orderable_dimensions_otypes[] = $def->getRestrictedDimensionId() . "_" . $def->getRestrictedObjectTypeId(); } if ($restricted_ids_csv == "") $restricted_ids_csv = "0"; $dimensions = Dimensions::findAll(array("conditions" => array("`id` <> ? AND `id` IN ($restricted_ids_csv)", $dim_id))); $childs_info = array(); $members = array(); foreach($dimensions as $dim) { $root_members = Members::findAll(array('conditions' => array('`dimension_id`=? AND `parent_member_id`=0', $dim->getId()), 'order' => '`name` ASC')); foreach ($root_members as $mem) { $members[$dim->getId()][] = $mem; $members[$dim->getId()] = array_merge($members[$dim->getId()], $mem->getAllChildrenSorted()); } //generate child array info foreach($members[$dim->getId()] as $pmember) { $childs_info[] = array("p" => $pmember->getID(), "ch" => $pmember->getAllChildrenIds(), "d" => $pmember->getDimensionId()); } } ajx_extra_data(array('childs' => $childs_info)); $orderable_members = array(); foreach ($members as $d => $dim_members) { foreach ($dim_members as $mem) { if (in_array($d."_".$mem->getObjectTypeId(), $orderable_dimensions_otypes)) $orderable_members[] = $mem->getId(); } } $member_id = get_id('mem_id'); if ($member_id > 0) { // actual restrictions $restrictions_info = array(); $restrictions = MemberRestrictions::findAll(array("conditions" => array("`member_id` = ?", $member_id))); foreach ($restrictions as $rest) { $restrictions_info[$rest->getRestrictedMemberId()] = $rest->getOrder(); } tpl_assign('restrictions', $restrictions_info); $actual_order_info = array(); $actual_order = array_keys($restrictions_info); foreach($actual_order as $mem_id) { $break = false; foreach ($members as $d => $dim_members) { foreach ($dim_members as $member) { if ($member->getId() == $mem_id) { $actual_order_info[] = array('dim'=>$d, 'mem'=>$mem_id, 'parent' => $member->getParentMemberId()); $break = true; break; } } if ($break) break; } } ajx_extra_data(array('actual_order' => $actual_order_info)); } tpl_assign('genid', array_var($_GET, 'genid')); tpl_assign('members', $members); tpl_assign('dimensions', $dimensions); tpl_assign('orderable_dimensions_otypes', $orderable_dimensions_otypes); ajx_extra_data(array('ord_members' => $orderable_members)); $this->setTemplate('dim_restrictions'); } function get_dimensions_for_properties() { if(!can_manage_dimension_members(logged_user())) { flash_error(lang('no access permissions')); ajx_current("empty"); return; } $dim_id = get_id(); $obj_type = get_id('otype'); $parent_id = get_id('parent'); if ($parent_id == 0) { $dim_obj_type = DimensionObjectTypes::findById(array('dimension_id' => $dim_id, 'object_type_id' => $obj_type)); if (!$dim_obj_type->getIsRoot()) { flash_error(lang('parent member must be selected to set properties')); ajx_current("empty"); return; } } $dimensions = array(); $associations_info = array(); $associations_info_tmp = array(); $member_parents = array(); $associations = DimensionMemberAssociations::getAssociatations($dim_id, $obj_type); foreach ($associations as $assoc) { if (Plugins::instance()->isActivePlugin('core_dimensions') && config_option('hide_people_vinculations')) { $persons_dim = Dimensions::findByCode('feng_persons'); if ($assoc->getAssociatedDimensionMemberAssociationId() == $persons_dim->getId()) { continue; } } $assoc_info = array('id' => $assoc->getId(), 'required' => $assoc->getIsRequired(), 'multi' => $assoc->getIsMultiple(), 'ot' => $assoc->getAssociatedObjectType()); $assoc_info['members'] = Members::getByDimensionObjType($assoc->getAssociatedDimensionMemberAssociationId(), $assoc->getAssociatedObjectType()); $ot = ObjectTypes::findById($assoc->getAssociatedObjectType()); $assoc_info['ot_name'] = $ot->getName(); if (!isset($associations_info_tmp[$assoc->getAssociatedDimensionMemberAssociationId()])) { $associations_info_tmp[$assoc->getAssociatedDimensionMemberAssociationId()] = array(); $dimensions[] = Dimensions::getDimensionById($assoc->getAssociatedDimensionMemberAssociationId()); } $associations_info_tmp[$assoc->getAssociatedDimensionMemberAssociationId()][] = $assoc_info; } // check for restrictions if ($parent_id > 0) { $parent = Members::findById($parent_id); $all_parents = $parent->getAllParentMembersInHierarchy(); $all_parent_ids = array($parent_id); foreach ($all_parents as $p) $all_parent_ids[] = $p->getId(); } else { $all_parent_ids = array(0); } $all_property_members = array(); foreach ($associations_info_tmp as $assoc_dim => $ot_infos) { foreach ($ot_infos as $info) { $restriction_defs = DimensionMemberRestrictionDefinitions::findAll(array("conditions" => "`dimension_id` = $dim_id AND `restricted_dimension_id` = $assoc_dim AND `restricted_object_type_id` = ".$info['ot'])); if (!is_array($restriction_defs) || count($restriction_defs) == 0) { // no restriction definitions => include all members $associations_info[$assoc_dim][] = $info; $restricted_dimensions[$assoc_dim] = false; } else { // restriction definition found => filter members $restricted_dimensions[$assoc_dim] = true; $restrictions = array(); $rest_members = array(); $conditions = ""; foreach ($restriction_defs as $rdef) { $conditions = "`restricted_member_id` IN (SELECT `id` FROM ".Members::instance()->getTableName(true)." WHERE `object_type_id` = ".$rdef->getRestrictedObjectTypeId()." AND `dimension_id` = $assoc_dim) AND `member_id` IN (".implode(",", $all_parent_ids).")"; $restrictions[] = MemberRestrictions::findAll(array("conditions" => $conditions)); } $to_intersect = array(); foreach ($restrictions as $k => $rests) { $to_intersect[$k] = array(); foreach ($rests as $rest) { $to_intersect[$k][] = $rest->getRestrictedMemberId(); } if (count($to_intersect[$k]) == 0) unset($to_intersect[$k]); } $apply_filter = true; $intersection = array_var($to_intersect, 0, array()); if (count($to_intersect) > 1) { $k = 1; while ($k < count($to_intersect)) { $intersection = array_intersect($intersection, $to_intersect[$k++]); } } else if (count($to_intersect) == 0) { // no restrictions found for members $apply_filter = false; } if ($apply_filter) $rest_members = Members::findAll(array("conditions" => "`id` IN (".implode(",", $intersection).")")); else $rest_members = $info['members']; $new_info = $info; $new_info['members'] = $rest_members; $associations_info[$assoc_dim][] = $new_info; foreach ($rest_members as $member) { if (!isset($member_parents[$assoc_dim])) $member_parents[$assoc_dim] = array(); if ($member->getParentMemberId() > 0) { $member_parents[$assoc_dim][$member->getId()] = $member->getParentMemberId(); } } } } } foreach ($associations_info as $assoc_dim => $ot_infos) { foreach ($ot_infos as $info) { foreach ($info['members'] as $mem) $all_property_members[] = $mem->getId(); } } // para cada $info['ot'] ver si en el resultado hay miembros que los restringen foreach ($associations_info as $assoc_dim => &$ot_infos) { foreach ($ot_infos as &$info) { $restriction_defs = DimensionMemberRestrictionDefinitions::findAll(array("conditions" => "`restricted_dimension_id` = $assoc_dim AND `restricted_object_type_id` = ".$info['ot'])); $restrictions = array(); foreach ($restriction_defs as $rdef) { $restrictions_tmp = MemberRestrictions::findAll(array("conditions" => "`member_id` IN ( SELECT `id` FROM ".Members::instance()->getTableName(true)." WHERE `dimension_id` = ".$rdef->getDimensionId()." AND `object_type_id` = ".$rdef->getObjectTypeId()." AND `id` IN (".implode(",", $all_property_members)."))")); $restrictions = array_merge($restrictions, $restrictions_tmp); } $restricted_ids = array(); if (count($restrictions) == 0) continue; foreach ($restrictions as $rest) $restricted_ids[] = $rest->getRestrictedMemberId(); $tmp = array(); foreach ($info['members'] as $rmem) { if (in_array($rmem->getId(), $restricted_ids)) $tmp[] = $rmem; } $info['members'] = $tmp; } } $req_dimensions = array(); foreach ($associations_info as $assoc_dim => &$ot_infos) { $required_count = 0; foreach ($ot_infos as &$info) { if ($info['required']) $required_count++; } $req_dimensions[$assoc_dim] = $required_count > 0; } $member_id = get_id('mem_id'); $actual_associations_info = array(); if ($member_id > 0) { // actual associations $actual_associations = MemberPropertyMembers::getAssociatedPropertiesForMember($member_id); foreach ($actual_associations as $actual_assoc) { $actual_associations_info[$actual_assoc->getPropertyMemberId()] = true; } } tpl_assign('genid', array_var($_GET, 'genid')); tpl_assign('dimensions', $dimensions); tpl_assign('associations', $associations_info); tpl_assign('actual_associations', $actual_associations_info); tpl_assign('req_dimensions', $req_dimensions); tpl_assign('restricted_dimensions', isset($restricted_dimensions) ? $restricted_dimensions : array()); ajx_extra_data(array('parents' => $member_parents, 'genid' => array_var($_GET, 'genid'))); $this->setTemplate('dim_properties'); } function get_assignable_parents() { if(!can_manage_dimension_members(logged_user())) { flash_error(lang('no access permissions')); ajx_current("empty"); return; } $dim_id = get_id('dim'); $otype_id = get_id('otype'); $parents_info = self::getAssignableParents($dim_id, $otype_id); ajx_extra_data(array("parents" => $parents_info)); ajx_current("empty"); } private function getAssignableParents($dim_id, $otype_id) { $parents = Members::findAll(array("conditions" => array("`object_type_id` IN ( SELECT `parent_object_type_id` FROM `". DimensionObjectTypeHierarchies::instance()->getTableName() ."` WHERE `dimension_id` = ? AND `child_object_type_id` = ? )", $dim_id, $otype_id))); $parents_info = array(); foreach ($parents as $parent) { $parents_info[] = array('id' => $parent->getId(), 'name' => $parent->getName()); } $dim_obj_type = DimensionObjectTypes::findById(array('dimension_id' => $dim_id, 'object_type_id' => $otype_id)); if ($dim_obj_type && $dim_obj_type->getIsRoot()) { array_unshift($parents_info, array('id' => 0, 'name' => lang('none'))); } return $parents_info; } function edit_permissions() { if (!can_manage_security(logged_user())) { flash_error(lang('no access permissions')); ajx_current("empty"); return; } $member = Members::findById(get_id()); if (!$member instanceof Member) { flash_error(lang('member dnx')); ajx_current("empty"); return; } if (!array_var($_POST, 'permissions')) { $permission_parameters = permission_member_form_parameters($member); tpl_assign('permission_parameters', $permission_parameters); } else { try { DB::beginWork(); save_member_permissions($member); DB::commit(); flash_success(lang('success user permissions updated')); ajx_current("back"); } catch (Exception $e) { DB::rollback(); flash_error($e->getMessage()); ajx_current("empty"); } } } function quick_add_form() { $this->setLayout('empty'); $dimension_id = array_var($_GET, 'dimension_id'); $dimension = is_numeric($dimension_id) ? Dimensions::instance()->findById($dimension_id) : null; if ($dimension instanceof Dimension){ $dimensionOptions = $dimension->getOptions(true); $object_Types = array(); $parent_member_id = array_var($_GET, 'parent_member_id'); $parent_member = Members::instance()->findById($parent_member_id) ; if ($parent_member instanceof Member) { $object_types = DimensionObjectTypes::getChildObjectTypes($parent_member); }else { $parent_member_id = 0; $parent_member = null; $object_types = DimensionObjectTypes::instance()->findAll(array("conditions"=>"dimension_id = $dimension_id AND is_root = 1 AND object_type_id<>(SELECT id from ".TABLE_PREFIX."object_types WHERE name='company')")); } if (count($object_types)) { if (count($object_types) == 1) { // Input Hidden tpl_assign('object_type', $object_types[0]); tpl_assign('object_type_name',ObjectTypes::instance()->findById($object_types[0]->getObjectTypeId())->getName()); }else{ // Input combo tpl_assign('object_types', $object_types); } }else{ tpl_assign("error_msg", $parent_member->getName() ." does not accept child nodes "); } $editUrls = array() ; foreach ($object_types as $object_type ){ /* @var $object_type DimensionObjectType */ if (ObjectTypes::instance()->findById($object_type->getObjectTypeId())->getType() != 'dimension_object') continue; $options = $object_type->getOptions(1); if (isset($options->defaultAjax) && $options->defaultAjax->controller != "dashboard" ) { $editUrls[$object_type->getObjectTypeId()] = get_url( $options->defaultAjax->controller, 'add' ); }else{ $t = ObjectTypes::instance()->findById($object_type->getObjectTypeId()); /* @var $t ObjectType */ $class_name = ucfirst($t->getName())."Controller"; if ( $t && controller_exists($t->getName(), $t->getPluginId())) { $editUrls[$object_type->getObjectTypeId()] = get_url($t->getName(), 'add'); }else{ $editUrls[$object_type->getObjectTypeId()] = get_url( 'member', 'add' , array("dim_id"=>$dimension_id)); } } } tpl_assign('editUrls', $editUrls); tpl_assign('parent_member_id',$parent_member_id ); tpl_assign('dimension_id', $dimension_id ); if (is_object($dimensionOptions) && is_object($dimensionOptions->quickAdd) && $dimensionOptions->quickAdd->formAction ) { tpl_assign('form_action', ROOT_URL."/".$dimensionOptions->quickAdd->formAction ); }else{ tpl_assign('form_action', get_url('member', 'add', array('quick'=>'1'))); } }else{ Logger::log("Invalid dimension: $dimension_id"); //die("Invalid dimension"); } } /** * Used for Drag & Drop, adds objects to a member * @author alvaro */ function add_objects_to_member() { $ids = json_decode(array_var($_POST, 'objects')); $mem_id = array_var($_POST, 'member'); if (!is_array($ids) || count($ids) == 0) { ajx_current("empty"); return; } try { DB::beginWork(); if ($mem_id) { $member = Members::findById($mem_id); $objects = array(); $from = array(); foreach ($ids as $oid) { /* @var $obj ContentDataObject */ $obj = Objects::findObject($oid); if ($obj instanceof ContentDataObject && $obj->canAddToMember(logged_user(), $member, active_context())) { $dim_obj_type_content = DimensionObjectTypeContents::findOne(array('conditions' => array('`dimension_id`=? AND `dimension_object_type_id`=? AND `content_object_type_id`=?', $member->getDimensionId(), $member->getObjectTypeId(), $obj->getObjectTypeId()))); if (!($dim_obj_type_content instanceof DimensionObjectTypeContent)) continue; if (!$dim_obj_type_content->getIsMultiple() || array_var($_POST, 'remove_prev')) { $db_res = DB::execute("SELECT group_concat(om.member_id) as old_members FROM ".TABLE_PREFIX."object_members om INNER JOIN ".TABLE_PREFIX."members m ON om.member_id=m.id WHERE m.dimension_id=".$member->getDimensionId()." AND om.object_id=".$obj->getId()); $row = $db_res->fetchRow(); if (array_var($row, 'old_members') != "") $from[$obj->getId()] = $row['old_members']; // remove from previous members ObjectMembers::delete('`object_id` = ' . $obj->getId() . ' AND `member_id` IN (SELECT `m`.`id` FROM `'.TABLE_PREFIX.'members` `m` WHERE `m`.`dimension_id` = '.$member->getDimensionId().')'); } $obj->addToMembers(array($member)); $obj->addToSharingTable(); $objects[] = $obj; if ($obj->allowsTimeslots()) { $timeslots = $obj->getTimeslots(); foreach ($timeslots as $timeslot) { $ts_mids = ObjectMembers::getMemberIdsByObject($timeslot->getId()); // if classified then reclassify if (count($ts_mids)) { if (array_var($_POST, 'remove_prev')) { ObjectMembers::delete('`object_id` = ' . $timeslot->getId() . ' AND `member_id` IN (SELECT `m`.`id` FROM `'.TABLE_PREFIX.'members` `m` WHERE `m`.`dimension_id` = '.$member->getDimensionId().')'); } $timeslot->addToMembers(array($member)); //$timeslot->addToSharingTable(); // fill sharing table in background add_object_to_sharing_table($timeslot, logged_user()); $objects[] = $timeslot; } } } if ($obj instanceof MailContent) { $conversation = MailContents::getMailsFromConversation($obj); foreach ($conversation as $conv_email) { if (array_var($_POST, 'attachment') && $conv_email->getHasAttachments()) { MailUtilities::parseMail($conv_email->getContent(), $decoded, $parsedEmail, $warnings); $classification_data = array(); for ($j=0; $j < count(array_var($parsedEmail, "Attachments", array())); $j++) { $classification_data["att_".$j] = true; } MailController::classifyFile($classification_data, $conv_email, $parsedEmail, array($member), array_var($_POST, 'remove_prev')); } } } } else { throw new Exception(lang('you dont have permissions to classify object in member', $obj->getName(), $member->getName())); } } Hook::fire('after_dragdrop_classify', $objects, $member); $display_name = $member->getName(); $lang_key = count($ids)>1 ? 'objects moved to member success' : 'object moved to member success'; $log_datas = array(); $actions = array(); // add to application logs foreach ($objects as $obj) { $actions[$obj->getId()] = array_var($from, $obj->getId()) ? ApplicationLogs::ACTION_MOVE : ApplicationLogs::ACTION_COPY; $log_datas[$obj->getId()] = (array_var($from, $obj->getId()) ? "from:" . array_var($from, $obj->getId()) . ";" : "") . "to:" . $member->getId(); } } else { if ($dim_id = array_var($_POST, 'dimension')) { $dimension = Dimensions::getDimensionById($dim_id); $from = array(); foreach ($ids as $oid) { /* @var $obj ContentDataObject */ $obj = Objects::findObject($oid); if ($obj instanceof ContentDataObject) { $db_res = DB::execute("SELECT group_concat(om.member_id) as old_members FROM ".TABLE_PREFIX."object_members om INNER JOIN ".TABLE_PREFIX."members m ON om.member_id=m.id WHERE m.dimension_id=".$dim_id." AND om.object_id=".$obj->getId()); $row = $db_res->fetchRow(); if (array_var($row, 'old_members') != "") $from[$obj->getId()] = $row['old_members']; // remove from previous members ObjectMembers::delete('`object_id` = ' . $obj->getId() . ' AND `member_id` IN ( SELECT `m`.`id` FROM `'.TABLE_PREFIX.'members` `m` WHERE `m`.`dimension_id` = '.$dim_id.')'); } $obj->addToMembers(array()); $obj->addToSharingTable(); $objects[] = $obj; } $display_name = $dimension->getName(); $lang_key = count($ids)>1 ? 'objects removed from' : 'object removed from'; $log_datas = array(); $actions = array(); // add to application logs foreach ($objects as $obj) { $actions[$obj->getId()] = array_var($from, $obj->getId()) ? ApplicationLogs::ACTION_MOVE : ApplicationLogs::ACTION_COPY; $log_datas[$obj->getId()] = (array_var($from, $obj->getId()) ? "from:" . array_var($from, $obj->getId()) . ";" : ""); } } } DB::commit(); foreach ($objects as $object) { ApplicationLogs::instance()->createLog($object, $actions[$object->getId()], false, true, true, $log_datas[$object->getId()]); } flash_success(lang($lang_key, $display_name)); if (array_var($_POST, 'reload')) ajx_current('reload'); else ajx_current('empty'); } catch (Exception $e) { DB::rollback(); ajx_current("empty"); flash_error($e->getMessage()); } } function archive() { if (!can_manage_dimension_members(logged_user())) { flash_error(lang('no access permissions')); ajx_current("empty"); return; } $member = Members::findById(get_id()); if (!$member instanceof Member) { flash_error(lang('member dnx')); ajx_current("empty"); return; } if (get_id('user')) $user = Contacts::findById($get_id('user')); else $user = logged_user(); if (!$user instanceof Contact) { ajx_current("empty"); return; } try { DB::beginWork(); set_time_limit(0); $count = $member->archive($user); evt_add("reload dimension tree", array('dim_id' => $member->getDimensionId())); if (array_var($_REQUEST, 'dont_back')) ajx_current("empty"); else ajx_current("back"); DB::commit(); ApplicationLogs::createLog($member,ApplicationLogs::ACTION_ARCHIVE); } catch (Exception $e) { DB::rollback(); flash_error($e->getMessage()); ajx_current("empty"); } } function unarchive() { if (!can_manage_dimension_members(logged_user())) { flash_error(lang('no access permissions')); ajx_current("empty"); return; } $member = Members::findById(get_id()); if (!$member instanceof Member) { flash_error(lang('member dnx')); ajx_current("empty"); return; } if (get_id('user')) $user = Contacts::findById($get_id('user')); else $user = logged_user(); if (!$user instanceof Contact) { ajx_current("empty"); return; } try { DB::beginWork(); set_time_limit(0); $count = $member->unarchive($user); evt_add("reload dimension tree", array('dim_id' => $member->getDimensionId())); if (array_var($_REQUEST, 'dont_back')) ajx_current("empty"); else ajx_current("back"); flash_success(lang('success unarchive member', $member->getName(), $count)); DB::commit(); ApplicationLogs::createLog($member, ApplicationLogs::ACTION_UNARCHIVE); } catch (Exception $e) { DB::rollback(); flash_error($e->getMessage()); ajx_current("empty"); } } // get member selectors for add to the view function get_rendered_member_selectors() { $object_members = array(); $objectId = 0; if(get_id()){ $object = Objects::findObject(get_id()); $object_type_id = $object->manager()->getObjectTypeId(); $object_members = $object->getMemberIds(); $objectId = get_id(); }else{ $object_type_id = array_var($_GET, 'objtypeid'); if(array_var($_GET,'members')){ $object_members = explode(',', array_var($_GET,'members')); } } if(count($object_members) == 0){ $object_members = active_context_members(false); } $genid = array_var($_GET, 'genid'); $listeners = array(); //ob_start — Turn on output buffering //no output is sent from the script (other than headers), instead the output is stored in an internal buffer. ob_start(); //get skipped dimensions for this view $view_name = array_var($_GET, 'view_name'); $dimensions_to_show = explode(",",user_config_option($view_name."_view_dimensions_combos")); $dimensions_to_skip = array_diff(get_user_dimensions_ids(), $dimensions_to_show); render_member_selectors($object_type_id, $genid, $object_members, array('listeners' => $listeners),$dimensions_to_skip,null,false); ajx_current("empty"); //Gets the current buffer contents and delete current output buffer. //ob_get_clean() essentially executes both ob_get_contents() and ob_end_clean(). ajx_extra_data(array("htmlToAdd" => ob_get_clean())); ajx_extra_data(array("objectId" => $objectId)); } // get_rendered_member_selectors }
As almost all students have noticed by now, there has been a change made to the Warrior’s Den in the Sakowich Center. “Warrior Whirled,” the new smoothie station, has been a welcomed addition by the student body and has received stellar reviews from those who have made purchases there. “Warrior Whirled” offers a different featured smoothie flavor every day and always has sample cups on display so those who are passing by can see if they like the day’s flavor. When asked what they thought of the new smoothie station, student Nick Rampino said, “I think it was a good addition because it adds an option for a healthy snack that also tastes good” and student Thomas Staffier responded, “The smoothies are a great option if you want to grab something refreshing on the go.” A common statement among other students who have purchased smoothies is that “the service is quick, the smoothies are good, and they are a reasonable portion for the price they are offered at, which is $3.99.” “Warrior Whirled” is open between lunch and dinner, from 12pm to 8pm so come on by and see what all the buzz is about.
Our portfolio company Promethean Power revealed good news last week: after years of technology iterations and a move to India, Promethean signed a contract with Hatsun, India’s largest private dairy, for 50 rapid milk chillers. This comes along with a new joint venture and a round of funding from First Light. You can read about Promethean’s technology journey from solar power to thermal batteries on MIT Technology Review. Douglas interviews Taha Jiwaji, founder of Tanzanian startup Bongo Live. The startup provides mobile marketing services, specializing in group messaging and SMS to serve the everyday Tanzanian customer. Bootstrapped to date, Bongo Live has stirred up competition but enjoys the first mover advantage. Although the company will face funding and talent acquisition challenges as all startups do, Jiwaji made a smart move by addressing the Tanzanian market opportunity. He says, “The market is still open and there a billion problems to solve, especially with technology…” With so few competitors on the group, now is the time to grab the opportunity. Jordan is a good example of a small emerging market with boundless opportunities for tech innovation and entrepreneurship. With a highly educated population and high rates of unemployment, we’ve seen a boom of Jordanian startups over the last few years. They’re addressing typical emerging markets problems like poor payment systems and a lack of credit. The Jordanian innovation ecosystem, centered around the development and investment fund and incubator, Oasis 500, has started to attract smart entrepreneurs from around the globe. Check out Bluelight, a Village Capital/VentureWell Boston finalist, as an example of a startup addressing the problems existing in the Jordanian market.
require 'test_helper' require 'geared_pagination/recordset' class GearedPagination::RecordsetTest < ActiveSupport::TestCase setup :create_recordings test "single limit pagination by offset" do recordset = GearedPagination::Recordset.new(Recording.all, per_page: 10) assert_equal 10, recordset.page(1).records.size assert_equal 10, recordset.page(2).records.size end test "variable limit pagination by offset" do recordset = GearedPagination::Recordset.new(Recording.all, per_page: [ 10, 15, 20 ]) assert_equal 10, recordset.page(1).records.size assert recordset.page(1).records.include?(Recording.all[0]) assert_equal 15, recordset.page(2).records.size assert recordset.page(2).records.include?(Recording.all[11]) assert_equal 20, recordset.page(3).records.size assert recordset.page(3).records.include?(Recording.all[26]) assert_equal 20, recordset.page(4).records.size assert recordset.page(4).records.include?(Recording.all[46]) end test "single limit pagination by cursor" do recordset = GearedPagination::Recordset.new Recording.all, ordered_by: :number, per_page: 10 cursor = GearedPagination::Cursor.encode(page_number: 1) assert_equal 10, recordset.page(cursor).records.size cursor = GearedPagination::Cursor.encode(page_number: 2, values: { number: 10 }) assert_equal 10, recordset.page(cursor).records.size cursor = GearedPagination::Cursor.encode(page_number: 3, values: { number: 20 }) assert_equal 10, recordset.page(cursor).records.size end test "variable limit pagination by cursor" do recordset = GearedPagination::Recordset.new Recording.all, ordered_by: [ :number, :id ], per_page: [ 10, 15, 20 ] cursor = GearedPagination::Cursor.encode(page_number: 1) assert_equal 10, recordset.page(cursor).records.size assert_equal 1, recordset.page(cursor).records.first.number assert_equal 10, recordset.page(cursor).records.last.number cursor = GearedPagination::Cursor.encode(page_number: 2, values: { number: 10, id: 10 }) assert_equal 15, recordset.page(cursor).records.size assert_equal 11, recordset.page(cursor).records.first.number assert_equal 25, recordset.page(cursor).records.last.number cursor = GearedPagination::Cursor.encode(page_number: 3, values: { number: 25, id: 25 }) assert_equal 20, recordset.page(cursor).records.size assert_equal 26, recordset.page(cursor).records.first.number assert_equal 45, recordset.page(cursor).records.last.number cursor = GearedPagination::Cursor.encode(page_number: 4, values: { number: 45, id: 45 }) assert_equal 20, recordset.page(cursor).records.size assert_equal 46, recordset.page(cursor).records.first.number assert_equal 65, recordset.page(cursor).records.last.number end test "page count" do assert_equal 7, GearedPagination::Recordset.new(Recording.all, per_page: [ 10, 15, 20 ]).page_count end test "records count" do assert_equal Recording.all.count, GearedPagination::Recordset.new(Recording.all, per_page: [ 10, 15, 20 ]).records_count end end
Kimpton Hotel Monaco Portland, in Portland, OR, boasts extensive accommodations for visiting groups. This includes 8,000 square feet of flexible meeting space with full multimedia and A/V support, catering from the Northwest-inspired Red Star Tavern (including microbrews and a variety of small plates), and even an in-room tiki bar available for small groups looking to get a fun start to the evening. But its latest addition -- a "Quiet Room" -- can appeal to visitors in a whole new way. This 100-square-foot space is aimed at business travelers looking to take a moment out of a busy day of meetings to meditate, brainstorm, or even roll out a yoga mat (guests can book for 30 minutes at a time from the front desk). "The idea for a Quiet Room started when we realized that the needs of all meeting goers weren't being met by an available guest room, event space, or business center when they required a moment of privacy," says General Manager Robert Hannigan. "There was a small amount of square footage to work with, but our team put a lot of thought into the layout …Feedback so far has been phenomenal." Thoughtful, quirky, and memorable -- those traits describe the Quiet Room, and also encapsulate the Pacific Northwest and its events offerings more generally. With a significant amount of exciting developments, it's a better time than ever to visit the cities of Portland and Seattle. Take, for example, Sentinel, a hotel that offers what it touts as "Thought Provoking Meetings" in its 23,000 square feet of event space, including art-infused meeting rooms and the striking Governor Ballroom. Its parent organization, Provenance Hotels, recently launched a new set of services for guests with pets, including high-quality pet food at the property and a souvenir dog tag -- very quirky and very Portland. There are currently 15 hotel projects in the works in Portland, which together will add 3,000 new rooms to the city. The biggest of these is the Hyatt Regency Portland at the Oregon Convention Center, which will be breaking ground this summer with an expected completion of late fall 2019.
"""This *was* the parser for the current HTML format on parl.gc.ca. But now we have XML. See parl_document.py. This module is organized like so: __init__.py - utility functions, simple parse interface common.py - infrastructure used in the parsers, i.e. regexes current.py - parser for the Hansard format used from 2006 to the present old.py - (fairly crufty) parser for the format used from 1994 to 2006 """ from parliament.imports.hans_old.common import * import logging logger = logging.getLogger(__name__) class HansardParser2009(HansardParser): def __init__(self, hansard, html): for regex in STARTUP_RE_2009: html = re.sub(regex[0], regex[1], html) super(HansardParser2009, self).__init__(hansard, html) for x in self.soup.findAll('a', 'deleteMe'): x.findParent('div').extract() def process_related_link(self, tag, string, current_politician=None): #print "PROCESSING RELATED for %s" % string resid = re.search(r'ResourceID=(\d+)', tag['href']) restype = re.search(r'ResourceType=(Document|Affiliation)', tag['href']) if not resid and restype: return string resid, restype = int(resid.group(1)), restype.group(1) if restype == 'Document': try: bill = Bill.objects.get_by_legisinfo_id(resid) except Bill.DoesNotExist: match = re.search(r'\b[CS]\-\d+[A-E]?\b', string) if not match: logger.error("Invalid bill link %s" % string) return string bill = Bill.objects.create_temporary_bill(legisinfo_id=resid, number=match.group(0), session=self.hansard.session) except Exception, e: print "Related bill search failed for callback %s" % resid print repr(e) return string return u'<bill id="%d" name="%s">%s</bill>' % (bill.id, escape(bill.name), string) elif restype == 'Affiliation': try: pol = Politician.objects.getByParlID(resid) except Politician.DoesNotExist: print "Related politician search failed for callback %s" % resid if getattr(settings, 'PARLIAMENT_LABEL_FAILED_CALLBACK', False): # FIXME migrate away from internalxref? InternalXref.objects.get_or_create(schema='pol_parlid', int_value=resid, target_id=-1) return string if pol == current_politician: return string # When someone mentions her riding, don't link back to her return u'<pol id="%d" name="%s">%s</pol>' % (pol.id, escape(pol.name), string) def get_text(self, cursor): text = u'' for string in cursor.findAll(text=parsetools.r_hasText): if string.parent.name == 'a' and string.parent['class'] == 'WebOption': text += self.process_related_link(string.parent, string, self.t['politician']) else: text += unicode(string) return text def parse(self): super(HansardParser2009, self).parse() # Initialize variables t = ParseTracker() self.t = t member_refs = {} # Get the date c = self.soup.find(text='OFFICIAL REPORT (HANSARD)').findNext('h2') self.date = datetime.datetime.strptime(c.string.strip(), "%A, %B %d, %Y").date() self.hansard.date = self.date self.hansard.save() c = c.findNext(text=r_housemet) match = re.search(r_housemet, c.string) t['timestamp'] = self.houseTime(match.group(1), match.group(2)) t.setNext('timestamp', t['timestamp']) # Move the pointer to the start c = c.next # And start the big loop while c is not None: # It's a string if not hasattr(c, 'name'): pass # Heading elif c.name == 'h2': c = c.next if not parsetools.isString(c): raise ParseException("Expecting string right after h2") t.setNext('heading', parsetools.titleIfNecessary(parsetools.tameWhitespace(c.string.strip()))) # Topic elif c.name == 'h3': top = c.find(text=r_letter) #if not parsetools.isString(c): # check if it's an empty header # if c.parent.find(text=r_letter): # raise ParseException("Expecting string right after h3") if top is not None: c = top t['topic_set'] = True t.setNext('topic', parsetools.titleIfNecessary(parsetools.tameWhitespace(c.string.strip()))) elif c.name == 'h4': if c.string == 'APPENDIX': self.saveStatement(t) print "Appendix reached -- we're done!" break # Timestamp elif c.name == 'a' and c.has_key('name') and c['name'].startswith('T'): match = re.search(r'^T(\d\d)(\d\d)$', c['name']) if match: t.setNext('timestamp', parsetools.time_to_datetime( hour=int(match.group(1)), minute=int(match.group(2)), date=self.date)) else: raise ParseException("Couldn't match time %s" % c.attrs['name']) elif c.name == 'b' and c.string: # Something to do with written answers match = r_honorific.search(c.string) if match: # It's a politician asking or answering a question # We don't get a proper link here, so this has to be a name match polname = re.sub(r'\(.+\)', '', match.group(2)).strip() self.saveStatement(t) t['member_title'] = c.string.strip() t['written_question'] = True try: pol = Politician.objects.get_by_name(polname, session=self.hansard.session) t['politician'] = pol t['member'] = ElectedMember.objects.get_by_pol(politician=pol, date=self.date) except Politician.DoesNotExist: print "WARNING: No name match for %s" % polname except Politician.MultipleObjectsReturned: print "WARNING: Multiple pols for %s" % polname else: if not c.string.startswith('Question'): print "WARNING: Unexplained boldness: %s" % c.string # div -- the biggie elif c.name == 'div': origdiv = c if c.find('b'): # We think it's a new speaker # Save the current buffer self.saveStatement(t) c = c.find('b') if c.find('a'): # There's a link... c = c.find('a') match = re.search(r'ResourceType=Affiliation&ResourceID=(\d+)', c['href']) if match and c.find(text=r_letter): parlwebid = int(match.group(1)) # We have the parl ID. First, see if we already know this ID. pol = Politician.objects.getByParlID(parlwebid, lookOnline=False) if pol is None: # We don't. Try to do a quick name match first (if flags say so) if not GET_PARLID_ONLINE: who = c.next.string match = re.search(r_honorific, who) if match: polname = re.sub(r'\(.+\)', '', match.group(2)).strip() try: #print "Looking for %s..." % polname, pol = Politician.objects.get_by_name(polname, session=self.hansard.session) #print "found." except Politician.DoesNotExist: pass except Politician.MultipleObjectsReturned: pass if pol is None: # Still no match. Go online... try: pol = Politician.objects.getByParlID(parlwebid, session=self.hansard.session) except Politician.DoesNotExist: print "WARNING: Couldn't find politician for ID %d" % parlwebid if pol is not None: t['member'] = ElectedMember.objects.get_by_pol(politician=pol, date=self.date) t['politician'] = pol c = c.next if not parsetools.isString(c): raise Exception("Expecting string in b for member name") t['member_title'] = c.strip() #print c if t['member_title'].endswith(':'): # Remove colon in e.g. Some hon. members: t['member_title'] = t['member_title'][:-1] # Sometimes we don't get a link for short statements -- see if we can identify by backreference if t['member']: member_refs[t['member_title']] = t['member'] # Also save a backref w/o position/riding member_refs[re.sub(r'\s*\(.+\)\s*', '', t['member_title'])] = t['member'] elif t['member_title'] in member_refs: t['member'] = member_refs[t['member_title']] t['politician'] = t['member'].politician c.findParent('b').extract() # We've got the title, now get the rest of the paragraph c = origdiv t.addText(self.get_text(c)) else: # There should be text in here if c.find('div'): if c.find('div', 'Footer'): # We're done! self.saveStatement(t) print "Footer div reached -- done!" break raise Exception("I wasn't expecting another div in here") txt = self.get_text(c).strip() if r_proceedings.search(txt): self.saveStatement(t) self.saveProceedingsStatement(txt, t) else: t.addText(txt, blockquote=bool(c.find('small'))) else: #print c.name if c.name == 'b': print "B: ", print c #if c.name == 'p': # print "P: ", # print c c = c.next return self.statements
With the myriad of different firestop products available on the market, how do you choose the right one? Open the UL® Fire Resistance Directory and you will find at least sixty firestop manufacturers and over 3,000 individual tested designs for various building service elements passing through fire-resistive rated barriers, including floor/ceilings and wall assemblies. With all of these choices, how do you identify which product is the best product for a particular application? The purpose of this article is to provide guidance and information on product selection for applications involving voice and data cabling. For most of us, the mention of the word firestop conjures up visions of red caulk being shot into all of the openings. In actuality, firestopping is a great deal more than just shooting red caulk into a hole. Firestopping is a system rather than just a product. A firestop system consists of: the barrier (the fire-rated wall or floor) being penetrated; the penetrating item (cables, conduits, etc.); and the firestopping products and designs used to seal the opening. A little time spent in advance choosing the right systems will not only make your initial installation easier but will continue saving the facility owner additional time and money with each subsequent cabling change. If you are installing cables or conduits in a permanent installation (one that will not require subsequent changes) a permanent firestop product such as a caulk or sealant could be the right choice. However, in any telephone or data-intensive facility, the addition or removal of cables is an almost everyday occurrence. The wrong product choice in this environment can be a quandary that can cause headaches, not to mention lost time and revenues. There are products and systems available that maintain the life safety of the structure while facilitating quick and easy alteration of the cabling system. The most accommodating firestop systems are systems engineered with re-enterable firestop products. We prefer to recommend products that are ready to install out of the box without the need for cutting, alteration, tools, or fasteners. Let’s spend a little time reviewing and commenting on the products that are frequently used in telecom and data installations. Firestop putties represent a class of 100% solids, non-hardening products. They do not shrink nor do they harden like most caulks and sealants. Putty excels in applications requiring subsequent changes after installation. Most firestop putties are intumescent products meaning they will expand with heat or flames to help seal off combustible cabling jackets to prevent the spread of fire through fire barriers. Firestop pillows are “ready to install out of the box” products that will rebound after being compressed to tightly fill and seal all void areas. This category consists of non-curing products installed within openings that just as the name denotes, resemble pillows, bags or blocks/bricks. Firestop pillows are simply intumescent cushions that can be compressed and stuffed into openings. Firestop bags are loose-fill products that resemble beanbags. Blocks or bricks are typically formed of foam impregnated with an intumescent. Firestop bags are the granddaddy of this product class. They were developed many years ago. These bags typically consist of a fiberglass bag with sewn seams, which is filled with a loose-fill product. While these bags look impressive and durable, there are some definite drawbacks to them, which have made these products obsolete with the advent of pillows and bricks. Much like a box of crackers, the loose fill is subject to compaction. Loose-fill bags do not rebound when compressed, which translates into difficulty in achieving a tight seal during the initial installation and even greater difficulties when retrofitting. Since these bags are stacked atop each other and compacted down, individual bags at the cable interface cannot be removed without all of the other bags being loosened. Thus, in terms of retrofit, the bags must be removed down to cable level and then re-installed after each cable change has been made. Firestop bricks or blocks are foam sponges that are stacked into an opening in a brick-like fashion. While they would appear to be relatively simple to install, they can present some significant challenges to the installer. The foam blocks have a very high co-efficient of friction. This makes them increasingly difficult to install as the opening closes down around the penetrants and up against the sides of the opening. The blocks also violate our basic tenet concerning ready to install out of the box in that some cutting of the blocks may be necessary in order to install them tightly around the penetrants. Foams also have a tendency to fuse together over time making removal or retrofitting a tougher chore. Be careful with foam polymer blocks that take a compression set when cooled. Some products will do this even at very moderate temperatures meaning that they may not re-install in an opening if the layout has changed in any way. Firestop pillows were conceived to address the specific needs and challenges found in cabling applications. The concept was simple; if the product were easy to install, it would be easy to retrofit. This class of products meets our ready to install out of the box requirements in that no cutting, fastening or compression tools are required. These products typically consist of a fibrous core material encapsulated in an intumescent coating protected by a poly bag. The fibrous core material is resilient. It will rebound after being compressed to tightly fill and seal all void areas. The poly bag is slip-finished to allow for easy insertion and removal. In cabling applications, retrofit is achieved by simply removing a single pillow at the cable interface. Due to the slip-finish and compressible nature of the product, the same pillow can be re-installed without disturbing the rest of the firestop system. In the event of a fire, the product expands to form a hard-packed monolithic char that impedes the passage of fire, smoke and combustion byproducts. Many early UL® Systems utilizing pillows required that they be secured into the opening using a wire mesh. This requirement has been removed from many systems but may still be a wise choice in situations where the firestop is located in an exposed area subject to potential tampering. High quality pillows win our Time is Money award by being the easiest and fastest product to install as well as the easiest to retrofit. Retrofittable products can be a bit pricey in applications where the openings are vastly over-sized. In these cases, we often recommend reducing the size of the opening using acceptable construction materials or a combination of firestopping products. Openings through gypsum wallboard that are excessively large can often be framed down using studs and gypsum board in a manner that matches the existing wall construction. In concrete or masonry walls or floors, several UL Classified Systems for cable trays allow for the openings to be closed down using firestop mortar and just the area within and around the tray sealed with firestopping pillows. This design takes advantage of the economy of firestopping mortar and combines it with the retrofittable characteristics of pillows to give the firestop installer the best of both worlds. Of course, designing openings to be the proper size in the first place makes the job easier and less expensive. Since firestopping is a system, planning to seal the opening as you plan to make it is the most effective way to do the job. The purpose of this article is to provide guidance and information, not dictate a specific method. Having said that, when considering UL® Systems for cabling application one of the most important concepts to keep in mind is installed life-cycle cost. The odds are you’ll be back in that cable bundle, and probably sooner than you planned. The UL® System that makes it the easiest and the most cost-effective is the one you’ll come to like best over time.
mine was a little dog. the sound of her sleeping. This entry was posted in blog on September 30, 2017 by admin. critical. some things are not for sale. the home, the black chair. This entry was posted in blog on September 28, 2017 by admin. those who kill your sisters. liking cheeses he served them to his guest. six types, some from caves and ewes. tasted. was good, with spiced oranges. their guest said little, ate the peel. bless thee and paste the words. your rantings, protestations.; words continue. while we pick out the remains. My thanks to James Stephen for his input on this work. A Poetry Circle conversation..poetry circle. came from gloddfa ganol….quarry in blaenau. we had hoped to live there, osea. they sold the place to those who sold the place to those. then those sold it too, to them, who passed it on to those. we could not live there then. This entry was posted in blog on September 23, 2017 by admin. it is a habit, looking at old buildings. This entry was posted in blog on September 22, 2017 by admin. while all around is flying. i have bought a bucket. This entry was posted in blog on September 21, 2017 by admin.
// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // proprietary rights in and to this software and related documentation and // any modifications thereto. Any use, reproduction, disclosure, or // distribution of this software and related documentation without an express // license agreement from NVIDIA Corporation is strictly prohibited. // // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. // // Information and code furnished is believed to be accurate and reliable. // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such // information or for any infringement of patents or other rights of third parties that may // result from its use. No license is granted by implication or otherwise under any patent // or patent rights of NVIDIA Corporation. Details are subject to change without notice. // This code supersedes and replaces all information previously supplied. // NVIDIA Corporation products are not authorized for use as critical // components in life support devices or systems without express written approval of // NVIDIA Corporation. // // Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved. // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved. // Copyright (c) 2001-2004 NovodeX AG. All rights reserved. #include "task/PxTask.h" #include "ExtCpuWorkerThread.h" #include "ExtDefaultCpuDispatcher.h" #include "ExtTaskQueueHelper.h" #include "PsFPU.h" using namespace physx; Ext::CpuWorkerThread::CpuWorkerThread() : mQueueEntryPool(EXT_TASK_QUEUE_ENTRY_POOL_SIZE), mThreadId(0) { } Ext::CpuWorkerThread::~CpuWorkerThread() { } void Ext::CpuWorkerThread::initialize(DefaultCpuDispatcher* ownerDispatcher) { mOwner = ownerDispatcher; } bool Ext::CpuWorkerThread::tryAcceptJobToLocalQueue(PxBaseTask& task, Ps::Thread::Id taskSubmitionThread) { if(taskSubmitionThread == mThreadId) { SharedQueueEntry* entry = mQueueEntryPool.getEntry(&task); if (entry) { mLocalJobList.push(*entry); return true; } else return false; } return false; } PxBaseTask* Ext::CpuWorkerThread::giveUpJob() { return TaskQueueHelper::fetchTask(mLocalJobList, mQueueEntryPool); } void Ext::CpuWorkerThread::execute() { mThreadId = getId(); while (!quitIsSignalled()) { mOwner->resetWakeSignal(); PxBaseTask* task = TaskQueueHelper::fetchTask(mLocalJobList, mQueueEntryPool); if(!task) task = mOwner->fetchNextTask(); if (task) { mOwner->runTask(*task); task->release(); } else { mOwner->waitForWork(); } } quit(); }
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The KingCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef KINGCOIN_WALLET_H #define KINGCOIN_WALLET_H #include <string> #include <vector> #include <stdlib.h> #include "main.h" #include "key.h" #include "keystore.h" #include "script.h" #include "ui_interface.h" #include "util.h" #include "walletdb.h" extern bool fWalletUnlockMintOnly; class CAccountingEntry; class CWalletTx; class CReserveKey; class COutput; class CCoinControl; /** (client) version numbers for particular wallet features */ enum WalletFeature { FEATURE_BASE = 10500, // the earliest version new wallets supports (only useful for getinfo's clientversion output) FEATURE_WALLETCRYPT = 40000, // wallet encryption FEATURE_COMPRPUBKEY = 60000, // compressed public keys FEATURE_LATEST = 60000 }; /** A key pool entry */ class CKeyPool { public: int64 nTime; CPubKey vchPubKey; CKeyPool() { nTime = GetTime(); } CKeyPool(const CPubKey& vchPubKeyIn) { nTime = GetTime(); vchPubKey = vchPubKeyIn; } IMPLEMENT_SERIALIZE ( if (!(nType & SER_GETHASH)) READWRITE(nVersion); READWRITE(nTime); READWRITE(vchPubKey); ) }; /** A CWallet is an extension of a keystore, which also maintains a set of transactions and balances, * and provides the ability to create new transactions. */ class CWallet : public CCryptoKeyStore { private: bool SelectCoins(int64 nTargetValue, unsigned int nSpendTime, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet, const CCoinControl *coinControl=NULL) const; CWalletDB *pwalletdbEncryption; // the current wallet version: clients below this version are not able to load the wallet int nWalletVersion; // the maximum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded int nWalletMaxVersion; public: mutable CCriticalSection cs_wallet; bool fFileBacked; std::string strWalletFile; std::set<int64> setKeyPool; typedef std::map<unsigned int, CMasterKey> MasterKeyMap; MasterKeyMap mapMasterKeys; unsigned int nMasterKeyMaxID; CWallet() { nWalletVersion = FEATURE_BASE; nWalletMaxVersion = FEATURE_BASE; fFileBacked = false; nMasterKeyMaxID = 0; pwalletdbEncryption = NULL; nOrderPosNext = 0; } CWallet(std::string strWalletFileIn) { nWalletVersion = FEATURE_BASE; nWalletMaxVersion = FEATURE_BASE; strWalletFile = strWalletFileIn; fFileBacked = true; nMasterKeyMaxID = 0; pwalletdbEncryption = NULL; nOrderPosNext = 0; } std::map<uint256, CWalletTx> mapWallet; int64 nOrderPosNext; std::map<uint256, int> mapRequestCount; std::map<CTxDestination, std::string> mapAddressBook; CPubKey vchDefaultKey; // check whether we are allowed to upgrade (or already support) to the named feature bool CanSupportFeature(enum WalletFeature wf) { return nWalletMaxVersion >= wf; } void AvailableCoins(std::vector<COutput>& vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl=NULL) const; bool SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, int nConfMine, int nConfTheirs, std::vector<COutput> vCoins, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet) const; // keystore implementation // Generate a new key CPubKey GenerateNewKey(); // Adds a key to the store, and saves it to disk. bool AddKey(const CKey& key); // Adds a key to the store, without saving it to disk (used by LoadWallet) bool LoadKey(const CKey& key) { return CCryptoKeyStore::AddKey(key); } bool LoadMinVersion(int nVersion) { nWalletVersion = nVersion; nWalletMaxVersion = std::max(nWalletMaxVersion, nVersion); return true; } // Adds an encrypted key to the store, and saves it to disk. bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret); // Adds an encrypted key to the store, without saving it to disk (used by LoadWallet) bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret) { SetMinVersion(FEATURE_WALLETCRYPT); return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret); } bool AddCScript(const CScript& redeemScript); bool LoadCScript(const CScript& redeemScript) { return CCryptoKeyStore::AddCScript(redeemScript); } bool Unlock(const SecureString& strWalletPassphrase); bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase); bool EncryptWallet(const SecureString& strWalletPassphrase); /** Increment the next transaction order id @return next transaction order id */ int64 IncOrderPosNext(CWalletDB *pwalletdb = NULL); typedef std::pair<CWalletTx*, CAccountingEntry*> TxPair; typedef std::multimap<int64, TxPair > TxItems; /** Get the wallet's activity log @return multimap of ordered transactions and accounting entries @warning Returned pointers are *only* valid within the scope of passed acentries */ TxItems OrderedTxItems(std::list<CAccountingEntry>& acentries, std::string strAccount = ""); void MarkDirty(); bool AddToWallet(const CWalletTx& wtxIn); bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate = false, bool fFindBlock = false); bool EraseFromWallet(uint256 hash); void WalletUpdateSpent(const CTransaction& prevout); int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false); int ScanForWalletTransaction(const uint256& hashTx); void ReacceptWalletTransactions(); void ResendWalletTransactions(); int64 GetBalance() const; int64 GetUnconfirmedBalance() const; int64 GetImmatureBalance() const; int64 GetStake() const; int64 GetNewMint() const; bool CreateTransaction(const std::vector<std::pair<CScript, int64> >& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet, const CCoinControl *coinControl=NULL); bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet, const CCoinControl *coinControl=NULL); bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey); bool CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64 nSearchInterval, CTransaction& txNew); std::string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false); std::string SendMoneyToDestination(const CTxDestination &address, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false); bool NewKeyPool(); bool TopUpKeyPool(); int64 AddReserveKey(const CKeyPool& keypool); void ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool); void KeepKey(int64 nIndex); void ReturnKey(int64 nIndex); bool GetKeyFromPool(CPubKey &key, bool fAllowReuse=true); int64 GetOldestKeyPoolTime(); void GetAllReserveKeys(std::set<CKeyID>& setAddress); std::set< std::set<CTxDestination> > GetAddressGroupings(); std::map<CTxDestination, int64> GetAddressBalances(); bool IsMine(const CTxIn& txin) const; int64 GetDebit(const CTxIn& txin) const; bool IsMine(const CTxOut& txout) const { return ::IsMine(*this, txout.scriptPubKey); } int64 GetCredit(const CTxOut& txout) const { if (!MoneyRange(txout.nValue)) throw std::runtime_error("CWallet::GetCredit() : value out of range"); return (IsMine(txout) ? txout.nValue : 0); } bool IsChange(const CTxOut& txout) const; int64 GetChange(const CTxOut& txout) const { if (!MoneyRange(txout.nValue)) throw std::runtime_error("CWallet::GetChange() : value out of range"); return (IsChange(txout) ? txout.nValue : 0); } bool IsMine(const CTransaction& tx) const { BOOST_FOREACH(const CTxOut& txout, tx.vout) if (IsMine(txout)) return true; return false; } bool IsFromMe(const CTransaction& tx) const { return (GetDebit(tx) > 0); } int64 GetDebit(const CTransaction& tx) const { int64 nDebit = 0; BOOST_FOREACH(const CTxIn& txin, tx.vin) { nDebit += GetDebit(txin); if (!MoneyRange(nDebit)) throw std::runtime_error("CWallet::GetDebit() : value out of range"); } return nDebit; } int64 GetCredit(const CTransaction& tx) const { int64 nCredit = 0; BOOST_FOREACH(const CTxOut& txout, tx.vout) { nCredit += GetCredit(txout); if (!MoneyRange(nCredit)) throw std::runtime_error("CWallet::GetCredit() : value out of range"); } return nCredit; } int64 GetChange(const CTransaction& tx) const { int64 nChange = 0; BOOST_FOREACH(const CTxOut& txout, tx.vout) { nChange += GetChange(txout); if (!MoneyRange(nChange)) throw std::runtime_error("CWallet::GetChange() : value out of range"); } return nChange; } void SetBestChain(const CBlockLocator& loc); DBErrors LoadWallet(bool& fFirstRunRet); bool SetAddressBookName(const CTxDestination& address, const std::string& strName); bool DelAddressBookName(const CTxDestination& address); void UpdatedTransaction(const uint256 &hashTx); void PrintWallet(const CBlock& block); void Inventory(const uint256 &hash) { { LOCK(cs_wallet); std::map<uint256, int>::iterator mi = mapRequestCount.find(hash); if (mi != mapRequestCount.end()) (*mi).second++; } } int GetKeyPoolSize() { return setKeyPool.size(); } bool GetTransaction(const uint256 &hashTx, CWalletTx& wtx); bool SetDefaultKey(const CPubKey &vchPubKey); // signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVersion if those are lower bool SetMinVersion(enum WalletFeature, CWalletDB* pwalletdbIn = NULL, bool fExplicit = false); // change which version we're allowed to upgrade to (note that this does not immediately imply upgrading to that format) bool SetMaxVersion(int nVersion); // get the current wallet format (the oldest client version guaranteed to understand this wallet) int GetVersion() { return nWalletVersion; } void FixSpentCoins(int& nMismatchSpent, int64& nBalanceInQuestion, bool fCheckOnly = false); void DisableTransaction(const CTransaction &tx); /** Address book entry changed. * @note called with lock cs_wallet held. */ boost::signals2::signal<void (CWallet *wallet, const CTxDestination &address, const std::string &label, bool isMine, ChangeType status)> NotifyAddressBookChanged; /** Wallet transaction added, removed or updated. * @note called with lock cs_wallet held. */ boost::signals2::signal<void (CWallet *wallet, const uint256 &hashTx, ChangeType status)> NotifyTransactionChanged; }; /** A key allocated from the key pool. */ class CReserveKey { protected: CWallet* pwallet; int64 nIndex; CPubKey vchPubKey; public: CReserveKey(CWallet* pwalletIn) { nIndex = -1; pwallet = pwalletIn; } ~CReserveKey() { if (!fShutdown) ReturnKey(); } void ReturnKey(); CPubKey GetReservedKey(); void KeepKey(); }; typedef std::map<std::string, std::string> mapValue_t; static void ReadOrderPos(int64& nOrderPos, mapValue_t& mapValue) { if (!mapValue.count("n")) { nOrderPos = -1; // TODO: calculate elsewhere return; } nOrderPos = atoi64(mapValue["n"].c_str()); } static void WriteOrderPos(const int64& nOrderPos, mapValue_t& mapValue) { if (nOrderPos == -1) return; mapValue["n"] = i64tostr(nOrderPos); } /** A transaction with a bunch of additional info that only the owner cares about. * It includes any unrecorded transactions needed to link it back to the block chain. */ class CWalletTx : public CMerkleTx { private: const CWallet* pwallet; public: std::vector<CMerkleTx> vtxPrev; mapValue_t mapValue; std::vector<std::pair<std::string, std::string> > vOrderForm; unsigned int fTimeReceivedIsTxTime; unsigned int nTimeReceived; // time received by this node unsigned int nTimeSmart; char fFromMe; std::string strFromAccount; std::vector<char> vfSpent; // which outputs are already spent int64 nOrderPos; // position in ordered transaction list // memory only mutable bool fDebitCached; mutable bool fCreditCached; mutable bool fAvailableCreditCached; mutable bool fChangeCached; mutable int64 nDebitCached; mutable int64 nCreditCached; mutable int64 nAvailableCreditCached; mutable int64 nChangeCached; CWalletTx() { Init(NULL); } CWalletTx(const CWallet* pwalletIn) { Init(pwalletIn); } CWalletTx(const CWallet* pwalletIn, const CMerkleTx& txIn) : CMerkleTx(txIn) { Init(pwalletIn); } CWalletTx(const CWallet* pwalletIn, const CTransaction& txIn) : CMerkleTx(txIn) { Init(pwalletIn); } void Init(const CWallet* pwalletIn) { pwallet = pwalletIn; vtxPrev.clear(); mapValue.clear(); vOrderForm.clear(); fTimeReceivedIsTxTime = false; nTimeReceived = 0; nTimeSmart = 0; fFromMe = false; strFromAccount.clear(); vfSpent.clear(); fDebitCached = false; fCreditCached = false; fAvailableCreditCached = false; fChangeCached = false; nDebitCached = 0; nCreditCached = 0; nAvailableCreditCached = 0; nChangeCached = 0; nOrderPos = -1; } IMPLEMENT_SERIALIZE ( CWalletTx* pthis = const_cast<CWalletTx*>(this); if (fRead) pthis->Init(NULL); char fSpent = false; if (!fRead) { pthis->mapValue["fromaccount"] = pthis->strFromAccount; std::string str; BOOST_FOREACH(char f, vfSpent) { str += (f ? '1' : '0'); if (f) fSpent = true; } pthis->mapValue["spent"] = str; WriteOrderPos(pthis->nOrderPos, pthis->mapValue); if (nTimeSmart) pthis->mapValue["timesmart"] = strprintf("%u", nTimeSmart); } nSerSize += SerReadWrite(s, *(CMerkleTx*)this, nType, nVersion,ser_action); READWRITE(vtxPrev); READWRITE(mapValue); READWRITE(vOrderForm); READWRITE(fTimeReceivedIsTxTime); READWRITE(nTimeReceived); READWRITE(fFromMe); READWRITE(fSpent); if (fRead) { pthis->strFromAccount = pthis->mapValue["fromaccount"]; if (mapValue.count("spent")) BOOST_FOREACH(char c, pthis->mapValue["spent"]) pthis->vfSpent.push_back(c != '0'); else pthis->vfSpent.assign(vout.size(), fSpent); ReadOrderPos(pthis->nOrderPos, pthis->mapValue); pthis->nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(pthis->mapValue["timesmart"]) : 0; } pthis->mapValue.erase("fromaccount"); pthis->mapValue.erase("version"); pthis->mapValue.erase("spent"); pthis->mapValue.erase("n"); pthis->mapValue.erase("timesmart"); ) // marks certain txout's as spent // returns true if any update took place bool UpdateSpent(const std::vector<char>& vfNewSpent) { bool fReturn = false; for (unsigned int i = 0; i < vfNewSpent.size(); i++) { if (i == vfSpent.size()) break; if (vfNewSpent[i] && !vfSpent[i]) { vfSpent[i] = true; fReturn = true; fAvailableCreditCached = false; } } return fReturn; } // make sure balances are recalculated void MarkDirty() { fCreditCached = false; fAvailableCreditCached = false; fDebitCached = false; fChangeCached = false; } void BindWallet(CWallet *pwalletIn) { pwallet = pwalletIn; MarkDirty(); } void MarkSpent(unsigned int nOut) { if (nOut >= vout.size()) throw std::runtime_error("CWalletTx::MarkSpent() : nOut out of range"); vfSpent.resize(vout.size()); if (!vfSpent[nOut]) { vfSpent[nOut] = true; fAvailableCreditCached = false; } } void MarkUnspent(unsigned int nOut) { if (nOut >= vout.size()) throw std::runtime_error("CWalletTx::MarkUnspent() : nOut out of range"); vfSpent.resize(vout.size()); if (vfSpent[nOut]) { vfSpent[nOut] = false; fAvailableCreditCached = false; } } bool IsSpent(unsigned int nOut) const { if (nOut >= vout.size()) throw std::runtime_error("CWalletTx::IsSpent() : nOut out of range"); if (nOut >= vfSpent.size()) return false; return (!!vfSpent[nOut]); } int64 GetDebit() const { if (vin.empty()) return 0; if (fDebitCached) return nDebitCached; nDebitCached = pwallet->GetDebit(*this); fDebitCached = true; return nDebitCached; } int64 GetCredit(bool fUseCache=true) const { // Must wait until coinbase is safely deep enough in the chain before valuing it if ((IsCoinBase() || IsCoinStake()) && GetBlocksToMaturity() > 0) return 0; // GetBalance can assume transactions in mapWallet won't change if (fUseCache && fCreditCached) return nCreditCached; nCreditCached = pwallet->GetCredit(*this); fCreditCached = true; return nCreditCached; } int64 GetAvailableCredit(bool fUseCache=true) const { // Must wait until coinbase is safely deep enough in the chain before valuing it if ((IsCoinBase() || IsCoinStake()) && GetBlocksToMaturity() > 0) return 0; if (fUseCache && fAvailableCreditCached) return nAvailableCreditCached; int64 nCredit = 0; for (unsigned int i = 0; i < vout.size(); i++) { if (!IsSpent(i)) { const CTxOut &txout = vout[i]; nCredit += pwallet->GetCredit(txout); if (!MoneyRange(nCredit)) throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range"); } } nAvailableCreditCached = nCredit; fAvailableCreditCached = true; return nCredit; } int64 GetChange() const { if (fChangeCached) return nChangeCached; nChangeCached = pwallet->GetChange(*this); fChangeCached = true; return nChangeCached; } void GetAmounts(int64& nGeneratedImmature, int64& nGeneratedMature, std::list<std::pair<CTxDestination, int64> >& listReceived, std::list<std::pair<CTxDestination, int64> >& listSent, int64& nFee, std::string& strSentAccount) const; void GetAccountAmounts(const std::string& strAccount, int64& nGenerated, int64& nReceived, int64& nSent, int64& nFee) const; bool IsFromMe() const { return (GetDebit() > 0); } bool IsConfirmed() const { // Quick answer in most cases if (!IsFinal()) return false; if (GetDepthInMainChain() >= 1) return true; if (!IsFromMe()) // using wtx's cached debit return false; // If no confirmations but it's from us, we can still // consider it confirmed if all dependencies are confirmed std::map<uint256, const CMerkleTx*> mapPrev; std::vector<const CMerkleTx*> vWorkQueue; vWorkQueue.reserve(vtxPrev.size()+1); vWorkQueue.push_back(this); for (unsigned int i = 0; i < vWorkQueue.size(); i++) { const CMerkleTx* ptx = vWorkQueue[i]; if (!ptx->IsFinal()) return false; if (ptx->GetDepthInMainChain() >= 1) continue; if (!pwallet->IsFromMe(*ptx)) return false; if (mapPrev.empty()) { BOOST_FOREACH(const CMerkleTx& tx, vtxPrev) mapPrev[tx.GetHash()] = &tx; } BOOST_FOREACH(const CTxIn& txin, ptx->vin) { if (!mapPrev.count(txin.prevout.hash)) return false; vWorkQueue.push_back(mapPrev[txin.prevout.hash]); } } return true; } bool WriteToDisk(); int64 GetTxTime() const; int GetRequestCount() const; void AddSupportingTransactions(CTxDB& txdb); bool AcceptWalletTransaction(CTxDB& txdb, bool fCheckInputs=true); bool AcceptWalletTransaction(); void RelayWalletTransaction(CTxDB& txdb); void RelayWalletTransaction(); }; class COutput { public: const CWalletTx *tx; int i; int nDepth; COutput(const CWalletTx *txIn, int iIn, int nDepthIn) { tx = txIn; i = iIn; nDepth = nDepthIn; } std::string ToString() const { return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString().substr(0,10).c_str(), i, nDepth, FormatMoney(tx->vout[i].nValue).c_str()); } void print() const { printf("%s\n", ToString().c_str()); } }; /** Private key that includes an expiration date in case it never gets used. */ class CWalletKey { public: CPrivKey vchPrivKey; int64 nTimeCreated; int64 nTimeExpires; std::string strComment; //// todo: add something to note what created it (user, getnewaddress, change) //// maybe should have a map<string, string> property map CWalletKey(int64 nExpires=0) { nTimeCreated = (nExpires ? GetTime() : 0); nTimeExpires = nExpires; } IMPLEMENT_SERIALIZE ( if (!(nType & SER_GETHASH)) READWRITE(nVersion); READWRITE(vchPrivKey); READWRITE(nTimeCreated); READWRITE(nTimeExpires); READWRITE(strComment); ) }; /** Account information. * Stored in wallet with key "acc"+string account name. */ class CAccount { public: CPubKey vchPubKey; CAccount() { SetNull(); } void SetNull() { vchPubKey = CPubKey(); } IMPLEMENT_SERIALIZE ( if (!(nType & SER_GETHASH)) READWRITE(nVersion); READWRITE(vchPubKey); ) }; /** Internal transfers. * Database key is acentry<account><counter>. */ class CAccountingEntry { public: std::string strAccount; int64 nCreditDebit; int64 nTime; std::string strOtherAccount; std::string strComment; mapValue_t mapValue; int64 nOrderPos; // position in ordered transaction list uint64 nEntryNo; CAccountingEntry() { SetNull(); } void SetNull() { nCreditDebit = 0; nTime = 0; strAccount.clear(); strOtherAccount.clear(); strComment.clear(); nOrderPos = -1; } IMPLEMENT_SERIALIZE ( CAccountingEntry& me = *const_cast<CAccountingEntry*>(this); if (!(nType & SER_GETHASH)) READWRITE(nVersion); // Note: strAccount is serialized as part of the key, not here. READWRITE(nCreditDebit); READWRITE(nTime); READWRITE(strOtherAccount); if (!fRead) { WriteOrderPos(nOrderPos, me.mapValue); if (!(mapValue.empty() && _ssExtra.empty())) { CDataStream ss(nType, nVersion); ss.insert(ss.begin(), '\0'); ss << mapValue; ss.insert(ss.end(), _ssExtra.begin(), _ssExtra.end()); me.strComment.append(ss.str()); } } READWRITE(strComment); size_t nSepPos = strComment.find("\0", 0, 1); if (fRead) { me.mapValue.clear(); if (std::string::npos != nSepPos) { CDataStream ss(std::vector<char>(strComment.begin() + nSepPos + 1, strComment.end()), nType, nVersion); ss >> me.mapValue; me._ssExtra = std::vector<char>(ss.begin(), ss.end()); } ReadOrderPos(me.nOrderPos, me.mapValue); } if (std::string::npos != nSepPos) me.strComment.erase(nSepPos); me.mapValue.erase("n"); ) private: std::vector<char> _ssExtra; }; bool GetWalletFile(CWallet* pwallet, std::string &strWalletFileOut); #endif
Have you ever thought about what makes God smile? Granted, this is somewhat of a deeper, all-conclusive thought being that God, being all-knowing, purely holy…fully God…having emotions…well, to me, its a deep thought. But seriously…what makes our Father look at us and smile? When was the last time you smiled…and remembered it? …And this past Friday night, he did. I was holding him in my arms. Steve was watching tv and studying while Josh (finally) was asleep. I was gazing at my son, smiling saying, “Caden, can’t you please just crack a smirk at mommy!” And his lip quivered and moved and his face lit up…and so did mine! The more I smiled, the more his face got brighter and just joyful. He was happy. He recognized that I was happy. I was content because I knew my son was well…he knew what I did for him. So the next hour was filled taking video, getting pictures…daddy even got his time in…and I remember feeling tears run down my cheeks…and I remember thinking, “Why is this making me cry? I can’t use the ol I’m pregnant and the hormones are still out of wack excuse…so what is up?” Ah, it was obvious…I was elated to see my son smile at me, with me…because of me. I think sometimes as Christians we live our lives forgetting to smile. Seriously…even at church we trudge in after a rough morning with the kids, see that we are too late for the coffee, the music is too loud, the sermon was too long and don’t even get me started on the parking….(Hmmm…hitting any bells here?). I think too many Christians have lost their real joy…the reason they have to “rejoice in the day that the Lord has made…” (Isaiah 25:9) God has chosen YOU for such a time as this. It was with great pleasure and passion that He called YOU forth…YOU were chosen as a royal priesthood, a holy nation. Yet, we walk around, counting the hours left in our day until we can go home, flip on the tv and relax. I see God smiling when I give high fives to the kids at our preschool. I see Him smiling through praying with worried parents not sure about their kids first day at school. I see Him smile when I buy two drinks at Starbucks…one for me and the other for just a random person on the street. I see Him smile when I witness a family come to Christ for the first time. I love seeing Him smile. I love being excited about God…doing things that may seem out of the norm…but why not? You only get this one day…so today is August 24th…who are YOU going to make smile? Is God smiling at you today?
namespace Nito.AsyncEx.Interop { /// <summary> /// Arguments passed to a .NET event that follows the standard <c>sender, arguments</c> event pattern. /// </summary> /// <typeparam name="TSender">The type of the sender of the event. This is commonly <see cref="object"/>.</typeparam> /// <typeparam name="TEventArgs">The type of the event arguments. This is commonly <see cref="EventArgs"/> or a derived type.</typeparam> #pragma warning disable CA1815 // Override equals and operator equals on value types public struct EventArguments<TSender, TEventArgs> #pragma warning restore CA1815 // Override equals and operator equals on value types { /// <summary> /// The sender of the event. /// </summary> public TSender Sender { get; set; } /// <summary> /// The event arguments. /// </summary> public TEventArgs EventArgs { get; set; } } }
@CHARSET "UTF-8"; .autoMargin{ margin-left: auto; margin-right: auto; } .standardData{ border-radius : 10px; border-style: solid; } .displayTable{ display: table; } .displayRow{ display: table-row; } .displayRow:first-child .displayCell{ padding-top: 10px; } .displayRow:last-child .displayCell{ padding-right: 10px; } .displayRow:nth-child(odd){ background-color: LightGrey; } .displayCell{ padding: 5px; display: table-cell; }
It adheres to your tenet "Honest, industrious, enterprising, innovative" to produce new solutions constantly. It regards consumers, success as its own success. Let us develop prosperous future hand in hand for Acrylic Plate Stands , Acrylic Dart Stand , Acrylic Pendant Stand , We're hunting forward to functioning with partners/clients to create good results together. That has a positive and progressive attitude to customer's fascination, our enterprise constantly improves our merchandise high quality to meet the demands of customers and further focuses on safety, reliability, environmental requirements, and innovation of Acrylic Plate Stands , Acrylic Dart Stand , Acrylic Pendant Stand , We will supply much better products with diversified designs and professional services. We sincerely welcome friends from over the world to visit our company and cooperate with us on the basis of long-term and mutual benefits.
//===-- llvm-ar.cpp - LLVM archive librarian utility ----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // Builds up (relatively) standard unix archive files (.a) containing LLVM // bitcode or other files. // //===----------------------------------------------------------------------===// #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/ADT/Triple.h" #include "llvm/BinaryFormat/Magic.h" #include "llvm/IR/LLVMContext.h" #include "llvm/Object/Archive.h" #include "llvm/Object/ArchiveWriter.h" #include "llvm/Object/IRObjectFile.h" #include "llvm/Object/MachO.h" #include "llvm/Object/ObjectFile.h" #include "llvm/Object/SymbolicFile.h" #include "llvm/Support/Chrono.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/Errc.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Format.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/Host.h" #include "llvm/Support/InitLLVM.h" #include "llvm/Support/LineIterator.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/Process.h" #include "llvm/Support/StringSaver.h" #include "llvm/Support/TargetSelect.h" #include "llvm/Support/ToolOutputFile.h" #include "llvm/Support/WithColor.h" #include "llvm/Support/raw_ostream.h" #include "llvm/ToolDrivers/llvm-dlltool/DlltoolDriver.h" #include "llvm/ToolDrivers/llvm-lib/LibDriver.h" #if !defined(_MSC_VER) && !defined(__MINGW32__) #include <unistd.h> #else #include <io.h> #endif #ifdef _WIN32 #include "llvm/Support/Windows/WindowsSupport.h" #endif using namespace llvm; // The name this program was invoked as. static StringRef ToolName; // The basename of this program. static StringRef Stem; const char RanlibHelp[] = R"(OVERVIEW: LLVM Ranlib (llvm-ranlib) This program generates an index to speed access to archives USAGE: llvm-ranlib <archive-file> OPTIONS: -h --help - Display available options -v --version - Display the version of this program -D - Use zero for timestamps and uids/gids (default) -U - Use actual timestamps and uids/gids )"; const char ArHelp[] = R"(OVERVIEW: LLVM Archiver USAGE: llvm-ar [options] [-]<operation>[modifiers] [relpos] [count] <archive> [files] llvm-ar -M [<mri-script] OPTIONS: --format - archive format to create =default - default =gnu - gnu =darwin - darwin =bsd - bsd --plugin=<string> - ignored for compatibility -h --help - display this help and exit --rsp-quoting - quoting style for response files =posix - posix =windows - windows --version - print the version and exit @<file> - read options from <file> OPERATIONS: d - delete [files] from the archive m - move [files] in the archive p - print [files] found in the archive q - quick append [files] to the archive r - replace or insert [files] into the archive s - act as ranlib t - display contents of archive x - extract [files] from the archive MODIFIERS: [a] - put [files] after [relpos] [b] - put [files] before [relpos] (same as [i]) [c] - do not warn if archive had to be created [D] - use zero for timestamps and uids/gids (default) [h] - display this help and exit [i] - put [files] before [relpos] (same as [b]) [l] - ignored for compatibility [L] - add archive's contents [N] - use instance [count] of name [o] - preserve original dates [O] - display member offsets [P] - use full names when matching (implied for thin archives) [s] - create an archive index (cf. ranlib) [S] - do not build a symbol table [T] - create a thin archive [u] - update only [files] newer than archive contents [U] - use actual timestamps and uids/gids [v] - be verbose about actions taken [V] - display the version and exit )"; void printHelpMessage() { if (Stem.contains_lower("ranlib")) outs() << RanlibHelp; else if (Stem.contains_lower("ar")) outs() << ArHelp; } static unsigned MRILineNumber; static bool ParsingMRIScript; // Show the error plus the usage message, and exit. LLVM_ATTRIBUTE_NORETURN static void badUsage(Twine Error) { WithColor::error(errs(), ToolName) << Error << "\n"; printHelpMessage(); exit(1); } // Show the error message and exit. LLVM_ATTRIBUTE_NORETURN static void fail(Twine Error) { if (ParsingMRIScript) { WithColor::error(errs(), ToolName) << "script line " << MRILineNumber << ": " << Error << "\n"; } else { WithColor::error(errs(), ToolName) << Error << "\n"; } exit(1); } static void failIfError(std::error_code EC, Twine Context = "") { if (!EC) return; std::string ContextStr = Context.str(); if (ContextStr.empty()) fail(EC.message()); fail(Context + ": " + EC.message()); } static void failIfError(Error E, Twine Context = "") { if (!E) return; handleAllErrors(std::move(E), [&](const llvm::ErrorInfoBase &EIB) { std::string ContextStr = Context.str(); if (ContextStr.empty()) fail(EIB.message()); fail(Context + ": " + EIB.message()); }); } static SmallVector<const char *, 256> PositionalArgs; static bool MRI; namespace { enum Format { Default, GNU, BSD, DARWIN, Unknown }; } static Format FormatType = Default; static std::string Options; // This enumeration delineates the kinds of operations on an archive // that are permitted. enum ArchiveOperation { Print, ///< Print the contents of the archive Delete, ///< Delete the specified members Move, ///< Move members to end or as given by {a,b,i} modifiers QuickAppend, ///< Quickly append to end of archive ReplaceOrInsert, ///< Replace or Insert members DisplayTable, ///< Display the table of contents Extract, ///< Extract files back to file system CreateSymTab ///< Create a symbol table in an existing archive }; // Modifiers to follow operation to vary behavior static bool AddAfter = false; ///< 'a' modifier static bool AddBefore = false; ///< 'b' modifier static bool Create = false; ///< 'c' modifier static bool OriginalDates = false; ///< 'o' modifier static bool DisplayMemberOffsets = false; ///< 'O' modifier static bool CompareFullPath = false; ///< 'P' modifier static bool OnlyUpdate = false; ///< 'u' modifier static bool Verbose = false; ///< 'v' modifier static bool Symtab = true; ///< 's' modifier static bool Deterministic = true; ///< 'D' and 'U' modifiers static bool Thin = false; ///< 'T' modifier static bool AddLibrary = false; ///< 'L' modifier // Relative Positional Argument (for insert/move). This variable holds // the name of the archive member to which the 'a', 'b' or 'i' modifier // refers. Only one of 'a', 'b' or 'i' can be specified so we only need // one variable. static std::string RelPos; // Count parameter for 'N' modifier. This variable specifies which file should // match for extract/delete operations when there are multiple matches. This is // 1-indexed. A value of 0 is invalid, and implies 'N' is not used. static int CountParam = 0; // This variable holds the name of the archive file as given on the // command line. static std::string ArchiveName; static std::vector<std::unique_ptr<MemoryBuffer>> ArchiveBuffers; static std::vector<std::unique_ptr<object::Archive>> Archives; // This variable holds the list of member files to proecess, as given // on the command line. static std::vector<StringRef> Members; // Static buffer to hold StringRefs. static BumpPtrAllocator Alloc; // Extract the member filename from the command line for the [relpos] argument // associated with a, b, and i modifiers static void getRelPos() { if (PositionalArgs.empty()) fail("expected [relpos] for 'a', 'b', or 'i' modifier"); RelPos = PositionalArgs[0]; PositionalArgs.erase(PositionalArgs.begin()); } // Extract the parameter from the command line for the [count] argument // associated with the N modifier static void getCountParam() { if (PositionalArgs.empty()) badUsage("expected [count] for 'N' modifier"); auto CountParamArg = StringRef(PositionalArgs[0]); if (CountParamArg.getAsInteger(10, CountParam)) badUsage("value for [count] must be numeric, got: " + CountParamArg); if (CountParam < 1) badUsage("value for [count] must be positive, got: " + CountParamArg); PositionalArgs.erase(PositionalArgs.begin()); } // Get the archive file name from the command line static void getArchive() { if (PositionalArgs.empty()) badUsage("an archive name must be specified"); ArchiveName = PositionalArgs[0]; PositionalArgs.erase(PositionalArgs.begin()); } static object::Archive &readLibrary(const Twine &Library) { auto BufOrErr = MemoryBuffer::getFile(Library, -1, false); failIfError(BufOrErr.getError(), "could not open library " + Library); ArchiveBuffers.push_back(std::move(*BufOrErr)); auto LibOrErr = object::Archive::create(ArchiveBuffers.back()->getMemBufferRef()); failIfError(errorToErrorCode(LibOrErr.takeError()), "could not parse library"); Archives.push_back(std::move(*LibOrErr)); return *Archives.back(); } static void runMRIScript(); // Parse the command line options as presented and return the operation // specified. Process all modifiers and check to make sure that constraints on // modifier/operation pairs have not been violated. static ArchiveOperation parseCommandLine() { if (MRI) { if (!PositionalArgs.empty() || !Options.empty()) badUsage("cannot mix -M and other options"); runMRIScript(); } // Keep track of number of operations. We can only specify one // per execution. unsigned NumOperations = 0; // Keep track of the number of positional modifiers (a,b,i). Only // one can be specified. unsigned NumPositional = 0; // Keep track of which operation was requested ArchiveOperation Operation; bool MaybeJustCreateSymTab = false; for (unsigned i = 0; i < Options.size(); ++i) { switch (Options[i]) { case 'd': ++NumOperations; Operation = Delete; break; case 'm': ++NumOperations; Operation = Move; break; case 'p': ++NumOperations; Operation = Print; break; case 'q': ++NumOperations; Operation = QuickAppend; break; case 'r': ++NumOperations; Operation = ReplaceOrInsert; break; case 't': ++NumOperations; Operation = DisplayTable; break; case 'x': ++NumOperations; Operation = Extract; break; case 'c': Create = true; break; case 'l': /* accepted but unused */ break; case 'o': OriginalDates = true; break; case 'O': DisplayMemberOffsets = true; break; case 'P': CompareFullPath = true; break; case 's': Symtab = true; MaybeJustCreateSymTab = true; break; case 'S': Symtab = false; break; case 'u': OnlyUpdate = true; break; case 'v': Verbose = true; break; case 'a': getRelPos(); AddAfter = true; NumPositional++; break; case 'b': getRelPos(); AddBefore = true; NumPositional++; break; case 'i': getRelPos(); AddBefore = true; NumPositional++; break; case 'D': Deterministic = true; break; case 'U': Deterministic = false; break; case 'N': getCountParam(); break; case 'T': Thin = true; // Thin archives store path names, so P should be forced. CompareFullPath = true; break; case 'L': AddLibrary = true; break; case 'V': cl::PrintVersionMessage(); exit(0); case 'h': printHelpMessage(); exit(0); default: badUsage(std::string("unknown option ") + Options[i]); } } // At this point, the next thing on the command line must be // the archive name. getArchive(); // Everything on the command line at this point is a member. Members.assign(PositionalArgs.begin(), PositionalArgs.end()); if (NumOperations == 0 && MaybeJustCreateSymTab) { NumOperations = 1; Operation = CreateSymTab; if (!Members.empty()) badUsage("the 's' operation takes only an archive as argument"); } // Perform various checks on the operation/modifier specification // to make sure we are dealing with a legal request. if (NumOperations == 0) badUsage("you must specify at least one of the operations"); if (NumOperations > 1) badUsage("only one operation may be specified"); if (NumPositional > 1) badUsage("you may only specify one of 'a', 'b', and 'i' modifiers"); if (AddAfter || AddBefore) if (Operation != Move && Operation != ReplaceOrInsert) badUsage("the 'a', 'b' and 'i' modifiers can only be specified with " "the 'm' or 'r' operations"); if (CountParam) if (Operation != Extract && Operation != Delete) badUsage("the 'N' modifier can only be specified with the 'x' or 'd' " "operations"); if (OriginalDates && Operation != Extract) badUsage("the 'o' modifier is only applicable to the 'x' operation"); if (OnlyUpdate && Operation != ReplaceOrInsert) badUsage("the 'u' modifier is only applicable to the 'r' operation"); if (AddLibrary && Operation != QuickAppend) badUsage("the 'L' modifier is only applicable to the 'q' operation"); // Return the parsed operation to the caller return Operation; } // Implements the 'p' operation. This function traverses the archive // looking for members that match the path list. static void doPrint(StringRef Name, const object::Archive::Child &C) { if (Verbose) outs() << "Printing " << Name << "\n"; Expected<StringRef> DataOrErr = C.getBuffer(); failIfError(DataOrErr.takeError()); StringRef Data = *DataOrErr; outs().write(Data.data(), Data.size()); } // Utility function for printing out the file mode when the 't' operation is in // verbose mode. static void printMode(unsigned mode) { outs() << ((mode & 004) ? "r" : "-"); outs() << ((mode & 002) ? "w" : "-"); outs() << ((mode & 001) ? "x" : "-"); } // Implement the 't' operation. This function prints out just // the file names of each of the members. However, if verbose mode is requested // ('v' modifier) then the file type, permission mode, user, group, size, and // modification time are also printed. static void doDisplayTable(StringRef Name, const object::Archive::Child &C) { if (Verbose) { Expected<sys::fs::perms> ModeOrErr = C.getAccessMode(); failIfError(ModeOrErr.takeError()); sys::fs::perms Mode = ModeOrErr.get(); printMode((Mode >> 6) & 007); printMode((Mode >> 3) & 007); printMode(Mode & 007); Expected<unsigned> UIDOrErr = C.getUID(); failIfError(UIDOrErr.takeError()); outs() << ' ' << UIDOrErr.get(); Expected<unsigned> GIDOrErr = C.getGID(); failIfError(GIDOrErr.takeError()); outs() << '/' << GIDOrErr.get(); Expected<uint64_t> Size = C.getSize(); failIfError(Size.takeError()); outs() << ' ' << format("%6llu", Size.get()); auto ModTimeOrErr = C.getLastModified(); failIfError(ModTimeOrErr.takeError()); // Note: formatv() only handles the default TimePoint<>, which is in // nanoseconds. // TODO: fix format_provider<TimePoint<>> to allow other units. sys::TimePoint<> ModTimeInNs = ModTimeOrErr.get(); outs() << ' ' << formatv("{0:%b %e %H:%M %Y}", ModTimeInNs); outs() << ' '; } if (C.getParent()->isThin()) { if (!sys::path::is_absolute(Name)) { StringRef ParentDir = sys::path::parent_path(ArchiveName); if (!ParentDir.empty()) outs() << sys::path::convert_to_slash(ParentDir) << '/'; } outs() << Name; } else { outs() << Name; if (DisplayMemberOffsets) outs() << " 0x" << utohexstr(C.getDataOffset(), true); } outs() << '\n'; } static std::string normalizePath(StringRef Path) { return CompareFullPath ? sys::path::convert_to_slash(Path) : std::string(sys::path::filename(Path)); } static bool comparePaths(StringRef Path1, StringRef Path2) { // When on Windows this function calls CompareStringOrdinal // as Windows file paths are case-insensitive. // CompareStringOrdinal compares two Unicode strings for // binary equivalence and allows for case insensitivity. #ifdef _WIN32 SmallVector<wchar_t, 128> WPath1, WPath2; failIfError(sys::windows::UTF8ToUTF16(normalizePath(Path1), WPath1)); failIfError(sys::windows::UTF8ToUTF16(normalizePath(Path2), WPath2)); return CompareStringOrdinal(WPath1.data(), WPath1.size(), WPath2.data(), WPath2.size(), true) == CSTR_EQUAL; #else return normalizePath(Path1) == normalizePath(Path2); #endif } // Implement the 'x' operation. This function extracts files back to the file // system. static void doExtract(StringRef Name, const object::Archive::Child &C) { // Retain the original mode. Expected<sys::fs::perms> ModeOrErr = C.getAccessMode(); failIfError(ModeOrErr.takeError()); sys::fs::perms Mode = ModeOrErr.get(); llvm::StringRef outputFilePath = sys::path::filename(Name); if (Verbose) outs() << "x - " << outputFilePath << '\n'; int FD; failIfError(sys::fs::openFileForWrite(outputFilePath, FD, sys::fs::CD_CreateAlways, sys::fs::OF_None, Mode), Name); { raw_fd_ostream file(FD, false); // Get the data and its length Expected<StringRef> BufOrErr = C.getBuffer(); failIfError(BufOrErr.takeError()); StringRef Data = BufOrErr.get(); // Write the data. file.write(Data.data(), Data.size()); } // If we're supposed to retain the original modification times, etc. do so // now. if (OriginalDates) { auto ModTimeOrErr = C.getLastModified(); failIfError(ModTimeOrErr.takeError()); failIfError( sys::fs::setLastAccessAndModificationTime(FD, ModTimeOrErr.get())); } if (close(FD)) fail("Could not close the file"); } static bool shouldCreateArchive(ArchiveOperation Op) { switch (Op) { case Print: case Delete: case Move: case DisplayTable: case Extract: case CreateSymTab: return false; case QuickAppend: case ReplaceOrInsert: return true; } llvm_unreachable("Missing entry in covered switch."); } static void performReadOperation(ArchiveOperation Operation, object::Archive *OldArchive) { if (Operation == Extract && OldArchive->isThin()) fail("extracting from a thin archive is not supported"); bool Filter = !Members.empty(); StringMap<int> MemberCount; { Error Err = Error::success(); for (auto &C : OldArchive->children(Err)) { Expected<StringRef> NameOrErr = C.getName(); failIfError(NameOrErr.takeError()); StringRef Name = NameOrErr.get(); if (Filter) { auto I = find_if(Members, [Name](StringRef Path) { return comparePaths(Name, Path); }); if (I == Members.end()) continue; if (CountParam && ++MemberCount[Name] != CountParam) continue; Members.erase(I); } switch (Operation) { default: llvm_unreachable("Not a read operation"); case Print: doPrint(Name, C); break; case DisplayTable: doDisplayTable(Name, C); break; case Extract: doExtract(Name, C); break; } } failIfError(std::move(Err)); } if (Members.empty()) return; for (StringRef Name : Members) WithColor::error(errs(), ToolName) << "'" << Name << "' was not found\n"; exit(1); } static void addChildMember(std::vector<NewArchiveMember> &Members, const object::Archive::Child &M, bool FlattenArchive = false) { if (Thin && !M.getParent()->isThin()) fail("cannot convert a regular archive to a thin one"); Expected<NewArchiveMember> NMOrErr = NewArchiveMember::getOldMember(M, Deterministic); failIfError(NMOrErr.takeError()); // If the child member we're trying to add is thin, use the path relative to // the archive it's in, so the file resolves correctly. if (Thin && FlattenArchive) { StringSaver Saver(Alloc); Expected<std::string> FileNameOrErr(M.getName()); failIfError(FileNameOrErr.takeError()); if (sys::path::is_absolute(*FileNameOrErr)) { NMOrErr->MemberName = Saver.save(sys::path::convert_to_slash(*FileNameOrErr)); } else { FileNameOrErr = M.getFullName(); failIfError(FileNameOrErr.takeError()); Expected<std::string> PathOrErr = computeArchiveRelativePath(ArchiveName, *FileNameOrErr); NMOrErr->MemberName = Saver.save( PathOrErr ? *PathOrErr : sys::path::convert_to_slash(*FileNameOrErr)); } } if (FlattenArchive && identify_magic(NMOrErr->Buf->getBuffer()) == file_magic::archive) { Expected<std::string> FileNameOrErr = M.getFullName(); failIfError(FileNameOrErr.takeError()); object::Archive &Lib = readLibrary(*FileNameOrErr); // When creating thin archives, only flatten if the member is also thin. if (!Thin || Lib.isThin()) { Error Err = Error::success(); // Only Thin archives are recursively flattened. for (auto &Child : Lib.children(Err)) addChildMember(Members, Child, /*FlattenArchive=*/Thin); failIfError(std::move(Err)); return; } } Members.push_back(std::move(*NMOrErr)); } static void addMember(std::vector<NewArchiveMember> &Members, StringRef FileName, bool FlattenArchive = false) { Expected<NewArchiveMember> NMOrErr = NewArchiveMember::getFile(FileName, Deterministic); failIfError(NMOrErr.takeError(), FileName); StringSaver Saver(Alloc); // For regular archives, use the basename of the object path for the member // name. For thin archives, use the full relative paths so the file resolves // correctly. if (!Thin) { NMOrErr->MemberName = sys::path::filename(NMOrErr->MemberName); } else { if (sys::path::is_absolute(FileName)) NMOrErr->MemberName = Saver.save(sys::path::convert_to_slash(FileName)); else { Expected<std::string> PathOrErr = computeArchiveRelativePath(ArchiveName, FileName); NMOrErr->MemberName = Saver.save( PathOrErr ? *PathOrErr : sys::path::convert_to_slash(FileName)); } } if (FlattenArchive && identify_magic(NMOrErr->Buf->getBuffer()) == file_magic::archive) { object::Archive &Lib = readLibrary(FileName); // When creating thin archives, only flatten if the member is also thin. if (!Thin || Lib.isThin()) { Error Err = Error::success(); // Only Thin archives are recursively flattened. for (auto &Child : Lib.children(Err)) addChildMember(Members, Child, /*FlattenArchive=*/Thin); failIfError(std::move(Err)); return; } } Members.push_back(std::move(*NMOrErr)); } enum InsertAction { IA_AddOldMember, IA_AddNewMember, IA_Delete, IA_MoveOldMember, IA_MoveNewMember }; static InsertAction computeInsertAction(ArchiveOperation Operation, const object::Archive::Child &Member, StringRef Name, std::vector<StringRef>::iterator &Pos, StringMap<int> &MemberCount) { if (Operation == QuickAppend || Members.empty()) return IA_AddOldMember; auto MI = find_if( Members, [Name](StringRef Path) { return comparePaths(Name, Path); }); if (MI == Members.end()) return IA_AddOldMember; Pos = MI; if (Operation == Delete) { if (CountParam && ++MemberCount[Name] != CountParam) return IA_AddOldMember; return IA_Delete; } if (Operation == Move) return IA_MoveOldMember; if (Operation == ReplaceOrInsert) { if (!OnlyUpdate) { if (RelPos.empty()) return IA_AddNewMember; return IA_MoveNewMember; } // We could try to optimize this to a fstat, but it is not a common // operation. sys::fs::file_status Status; failIfError(sys::fs::status(*MI, Status), *MI); auto ModTimeOrErr = Member.getLastModified(); failIfError(ModTimeOrErr.takeError()); if (Status.getLastModificationTime() < ModTimeOrErr.get()) { if (RelPos.empty()) return IA_AddOldMember; return IA_MoveOldMember; } if (RelPos.empty()) return IA_AddNewMember; return IA_MoveNewMember; } llvm_unreachable("No such operation"); } // We have to walk this twice and computing it is not trivial, so creating an // explicit std::vector is actually fairly efficient. static std::vector<NewArchiveMember> computeNewArchiveMembers(ArchiveOperation Operation, object::Archive *OldArchive) { std::vector<NewArchiveMember> Ret; std::vector<NewArchiveMember> Moved; int InsertPos = -1; if (OldArchive) { Error Err = Error::success(); StringMap<int> MemberCount; for (auto &Child : OldArchive->children(Err)) { int Pos = Ret.size(); Expected<StringRef> NameOrErr = Child.getName(); failIfError(NameOrErr.takeError()); std::string Name = std::string(NameOrErr.get()); if (comparePaths(Name, RelPos)) { assert(AddAfter || AddBefore); if (AddBefore) InsertPos = Pos; else InsertPos = Pos + 1; } std::vector<StringRef>::iterator MemberI = Members.end(); InsertAction Action = computeInsertAction(Operation, Child, Name, MemberI, MemberCount); switch (Action) { case IA_AddOldMember: addChildMember(Ret, Child, /*FlattenArchive=*/Thin); break; case IA_AddNewMember: addMember(Ret, *MemberI); break; case IA_Delete: break; case IA_MoveOldMember: addChildMember(Moved, Child, /*FlattenArchive=*/Thin); break; case IA_MoveNewMember: addMember(Moved, *MemberI); break; } // When processing elements with the count param, we need to preserve the // full members list when iterating over all archive members. For // instance, "llvm-ar dN 2 archive.a member.o" should delete the second // file named member.o it sees; we are not done with member.o the first // time we see it in the archive. if (MemberI != Members.end() && !CountParam) Members.erase(MemberI); } failIfError(std::move(Err)); } if (Operation == Delete) return Ret; if (!RelPos.empty() && InsertPos == -1) fail("insertion point not found"); if (RelPos.empty()) InsertPos = Ret.size(); assert(unsigned(InsertPos) <= Ret.size()); int Pos = InsertPos; for (auto &M : Moved) { Ret.insert(Ret.begin() + Pos, std::move(M)); ++Pos; } if (AddLibrary) { assert(Operation == QuickAppend); for (auto &Member : Members) addMember(Ret, Member, /*FlattenArchive=*/true); return Ret; } std::vector<NewArchiveMember> NewMembers; for (auto &Member : Members) addMember(NewMembers, Member, /*FlattenArchive=*/Thin); Ret.reserve(Ret.size() + NewMembers.size()); std::move(NewMembers.begin(), NewMembers.end(), std::inserter(Ret, std::next(Ret.begin(), InsertPos))); return Ret; } static object::Archive::Kind getDefaultForHost() { return Triple(sys::getProcessTriple()).isOSDarwin() ? object::Archive::K_DARWIN : object::Archive::K_GNU; } static object::Archive::Kind getKindFromMember(const NewArchiveMember &Member) { auto MemBufferRef = Member.Buf->getMemBufferRef(); Expected<std::unique_ptr<object::ObjectFile>> OptionalObject = object::ObjectFile::createObjectFile(MemBufferRef); if (OptionalObject) return isa<object::MachOObjectFile>(**OptionalObject) ? object::Archive::K_DARWIN : object::Archive::K_GNU; // squelch the error in case we had a non-object file consumeError(OptionalObject.takeError()); // If we're adding a bitcode file to the archive, detect the Archive kind // based on the target triple. LLVMContext Context; if (identify_magic(MemBufferRef.getBuffer()) == file_magic::bitcode) { if (auto ObjOrErr = object::SymbolicFile::createSymbolicFile( MemBufferRef, file_magic::bitcode, &Context)) { auto &IRObject = cast<object::IRObjectFile>(**ObjOrErr); return Triple(IRObject.getTargetTriple()).isOSDarwin() ? object::Archive::K_DARWIN : object::Archive::K_GNU; } else { // Squelch the error in case this was not a SymbolicFile. consumeError(ObjOrErr.takeError()); } } return getDefaultForHost(); } static void performWriteOperation(ArchiveOperation Operation, object::Archive *OldArchive, std::unique_ptr<MemoryBuffer> OldArchiveBuf, std::vector<NewArchiveMember> *NewMembersP) { std::vector<NewArchiveMember> NewMembers; if (!NewMembersP) NewMembers = computeNewArchiveMembers(Operation, OldArchive); object::Archive::Kind Kind; switch (FormatType) { case Default: if (Thin) Kind = object::Archive::K_GNU; else if (OldArchive) Kind = OldArchive->kind(); else if (NewMembersP) Kind = !NewMembersP->empty() ? getKindFromMember(NewMembersP->front()) : getDefaultForHost(); else Kind = !NewMembers.empty() ? getKindFromMember(NewMembers.front()) : getDefaultForHost(); break; case GNU: Kind = object::Archive::K_GNU; break; case BSD: if (Thin) fail("only the gnu format has a thin mode"); Kind = object::Archive::K_BSD; break; case DARWIN: if (Thin) fail("only the gnu format has a thin mode"); Kind = object::Archive::K_DARWIN; break; case Unknown: llvm_unreachable(""); } Error E = writeArchive(ArchiveName, NewMembersP ? *NewMembersP : NewMembers, Symtab, Kind, Deterministic, Thin, std::move(OldArchiveBuf)); failIfError(std::move(E), ArchiveName); } static void createSymbolTable(object::Archive *OldArchive) { // When an archive is created or modified, if the s option is given, the // resulting archive will have a current symbol table. If the S option // is given, it will have no symbol table. // In summary, we only need to update the symbol table if we have none. // This is actually very common because of broken build systems that think // they have to run ranlib. if (OldArchive->hasSymbolTable()) return; performWriteOperation(CreateSymTab, OldArchive, nullptr, nullptr); } static void performOperation(ArchiveOperation Operation, object::Archive *OldArchive, std::unique_ptr<MemoryBuffer> OldArchiveBuf, std::vector<NewArchiveMember> *NewMembers) { switch (Operation) { case Print: case DisplayTable: case Extract: performReadOperation(Operation, OldArchive); return; case Delete: case Move: case QuickAppend: case ReplaceOrInsert: performWriteOperation(Operation, OldArchive, std::move(OldArchiveBuf), NewMembers); return; case CreateSymTab: createSymbolTable(OldArchive); return; } llvm_unreachable("Unknown operation."); } static int performOperation(ArchiveOperation Operation, std::vector<NewArchiveMember> *NewMembers) { // Create or open the archive object. ErrorOr<std::unique_ptr<MemoryBuffer>> Buf = MemoryBuffer::getFile(ArchiveName, -1, false); std::error_code EC = Buf.getError(); if (EC && EC != errc::no_such_file_or_directory) fail("unable to open '" + ArchiveName + "': " + EC.message()); if (!EC) { Error Err = Error::success(); object::Archive Archive(Buf.get()->getMemBufferRef(), Err); failIfError(std::move(Err), "unable to load '" + ArchiveName + "'"); if (Archive.isThin()) CompareFullPath = true; performOperation(Operation, &Archive, std::move(Buf.get()), NewMembers); return 0; } assert(EC == errc::no_such_file_or_directory); if (!shouldCreateArchive(Operation)) { failIfError(EC, Twine("unable to load '") + ArchiveName + "'"); } else { if (!Create) { // Produce a warning if we should and we're creating the archive WithColor::warning(errs(), ToolName) << "creating " << ArchiveName << "\n"; } } performOperation(Operation, nullptr, nullptr, NewMembers); return 0; } static void runMRIScript() { enum class MRICommand { AddLib, AddMod, Create, CreateThin, Delete, Save, End, Invalid }; ErrorOr<std::unique_ptr<MemoryBuffer>> Buf = MemoryBuffer::getSTDIN(); failIfError(Buf.getError()); const MemoryBuffer &Ref = *Buf.get(); bool Saved = false; std::vector<NewArchiveMember> NewMembers; ParsingMRIScript = true; for (line_iterator I(Ref, /*SkipBlanks*/ false), E; I != E; ++I) { ++MRILineNumber; StringRef Line = *I; Line = Line.split(';').first; Line = Line.split('*').first; Line = Line.trim(); if (Line.empty()) continue; StringRef CommandStr, Rest; std::tie(CommandStr, Rest) = Line.split(' '); Rest = Rest.trim(); if (!Rest.empty() && Rest.front() == '"' && Rest.back() == '"') Rest = Rest.drop_front().drop_back(); auto Command = StringSwitch<MRICommand>(CommandStr.lower()) .Case("addlib", MRICommand::AddLib) .Case("addmod", MRICommand::AddMod) .Case("create", MRICommand::Create) .Case("createthin", MRICommand::CreateThin) .Case("delete", MRICommand::Delete) .Case("save", MRICommand::Save) .Case("end", MRICommand::End) .Default(MRICommand::Invalid); switch (Command) { case MRICommand::AddLib: { object::Archive &Lib = readLibrary(Rest); { Error Err = Error::success(); for (auto &Member : Lib.children(Err)) addChildMember(NewMembers, Member, /*FlattenArchive=*/Thin); failIfError(std::move(Err)); } break; } case MRICommand::AddMod: addMember(NewMembers, Rest); break; case MRICommand::CreateThin: Thin = true; LLVM_FALLTHROUGH; case MRICommand::Create: Create = true; if (!ArchiveName.empty()) fail("editing multiple archives not supported"); if (Saved) fail("file already saved"); ArchiveName = std::string(Rest); break; case MRICommand::Delete: { llvm::erase_if(NewMembers, [=](NewArchiveMember &M) { return comparePaths(M.MemberName, Rest); }); break; } case MRICommand::Save: Saved = true; break; case MRICommand::End: break; case MRICommand::Invalid: fail("unknown command: " + CommandStr); } } ParsingMRIScript = false; // Nothing to do if not saved. if (Saved) performOperation(ReplaceOrInsert, &NewMembers); exit(0); } static bool handleGenericOption(StringRef arg) { if (arg == "-help" || arg == "--help" || arg == "-h") { printHelpMessage(); return true; } if (arg == "-version" || arg == "--version") { cl::PrintVersionMessage(); return true; } return false; } static const char *matchFlagWithArg(StringRef Expected, ArrayRef<const char *>::iterator &ArgIt, ArrayRef<const char *> Args) { StringRef Arg = *ArgIt; if (Arg.startswith("--")) Arg = Arg.substr(2); else if (Arg.startswith("-")) Arg = Arg.substr(1); size_t len = Expected.size(); if (Arg == Expected) { if (++ArgIt == Args.end()) fail(std::string(Expected) + " requires an argument"); return *ArgIt; } if (Arg.startswith(Expected) && Arg.size() > len && Arg[len] == '=') return Arg.data() + len + 1; return nullptr; } static cl::TokenizerCallback getRspQuoting(ArrayRef<const char *> ArgsArr) { cl::TokenizerCallback Ret = Triple(sys::getProcessTriple()).getOS() == Triple::Win32 ? cl::TokenizeWindowsCommandLine : cl::TokenizeGNUCommandLine; for (ArrayRef<const char *>::iterator ArgIt = ArgsArr.begin(); ArgIt != ArgsArr.end(); ++ArgIt) { if (const char *Match = matchFlagWithArg("rsp-quoting", ArgIt, ArgsArr)) { StringRef MatchRef = Match; if (MatchRef == "posix") Ret = cl::TokenizeGNUCommandLine; else if (MatchRef == "windows") Ret = cl::TokenizeWindowsCommandLine; else fail(std::string("Invalid response file quoting style ") + Match); } } return Ret; } static int ar_main(int argc, char **argv) { SmallVector<const char *, 0> Argv(argv + 1, argv + argc); StringSaver Saver(Alloc); cl::ExpandResponseFiles(Saver, getRspQuoting(makeArrayRef(argv, argc)), Argv); for (ArrayRef<const char *>::iterator ArgIt = Argv.begin(); ArgIt != Argv.end(); ++ArgIt) { const char *Match = nullptr; if (handleGenericOption(*ArgIt)) return 0; if (strcmp(*ArgIt, "--") == 0) { ++ArgIt; for (; ArgIt != Argv.end(); ++ArgIt) PositionalArgs.push_back(*ArgIt); break; } if (*ArgIt[0] != '-') { if (Options.empty()) Options += *ArgIt; else PositionalArgs.push_back(*ArgIt); continue; } if (strcmp(*ArgIt, "-M") == 0) { MRI = true; continue; } Match = matchFlagWithArg("format", ArgIt, Argv); if (Match) { FormatType = StringSwitch<Format>(Match) .Case("default", Default) .Case("gnu", GNU) .Case("darwin", DARWIN) .Case("bsd", BSD) .Default(Unknown); if (FormatType == Unknown) fail(std::string("Invalid format ") + Match); continue; } if (matchFlagWithArg("plugin", ArgIt, Argv) || matchFlagWithArg("rsp-quoting", ArgIt, Argv)) continue; Options += *ArgIt + 1; } ArchiveOperation Operation = parseCommandLine(); return performOperation(Operation, nullptr); } static int ranlib_main(int argc, char **argv) { bool ArchiveSpecified = false; for (int i = 1; i < argc; ++i) { StringRef arg(argv[i]); if (handleGenericOption(arg)) { return 0; } else if (arg.consume_front("-")) { // Handle the -D/-U flag while (!arg.empty()) { if (arg.front() == 'D') { Deterministic = true; } else if (arg.front() == 'U') { Deterministic = false; } else if (arg.front() == 'h') { printHelpMessage(); return 0; } else if (arg.front() == 'v') { cl::PrintVersionMessage(); return 0; } else { // TODO: GNU ranlib also supports a -t flag fail("Invalid option: '-" + arg + "'"); } arg = arg.drop_front(1); } } else { if (ArchiveSpecified) fail("exactly one archive should be specified"); ArchiveSpecified = true; ArchiveName = arg.str(); } } if (!ArchiveSpecified) { badUsage("an archive name must be specified"); } return performOperation(CreateSymTab, nullptr); } int main(int argc, char **argv) { InitLLVM X(argc, argv); ToolName = argv[0]; llvm::InitializeAllTargetInfos(); llvm::InitializeAllTargetMCs(); llvm::InitializeAllAsmParsers(); Stem = sys::path::stem(ToolName); auto Is = [](StringRef Tool) { // We need to recognize the following filenames. // // Lib.exe -> lib (see D44808, MSBuild runs Lib.exe) // dlltool.exe -> dlltool // arm-pokymllib32-linux-gnueabi-llvm-ar-10 -> ar auto I = Stem.rfind_lower(Tool); return I != StringRef::npos && (I + Tool.size() == Stem.size() || !isAlnum(Stem[I + Tool.size()])); }; if (Is("dlltool")) return dlltoolDriverMain(makeArrayRef(argv, argc)); if (Is("ranlib")) return ranlib_main(argc, argv); if (Is("lib")) return libDriverMain(makeArrayRef(argv, argc)); if (Is("ar")) return ar_main(argc, argv); fail("not ranlib, ar, lib or dlltool"); }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Keep Coding , Keep Fit"> <meta name="keywords" content="gitKong, gitKong Blog, gitKong的博客, 孔凡列, iOS, Swift, Objective-C, 小程序"> <meta name="theme-color" content="#000000"> <title>gitKong | gitKong的博客</title> <!-- Web App Manifest --> <link rel="manifest" href="/pwa/manifest.json"> <!-- Favicon --> <link rel="shortcut icon" href="/img/favicon.ico"> <!-- Canonical URL --> <link rel="canonical" href="http://localhost:4000/about/"> <!-- Bootstrap Core CSS --> <link rel="stylesheet" href="/css/bootstrap.min.css"> <!-- Custom CSS --> <link rel="stylesheet" href="/css/hux-blog.min.css"> <!-- Pygments Github CSS --> <link rel="stylesheet" href="/css/syntax.css"> <!-- Custom Fonts --> <!-- <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> --> <!-- Hux change font-awesome CDN to qiniu --> <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <!-- Hux Delete, sad but pending in China <link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/ css'> --> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <!-- ga & ba script hoook --> <script></script> </head> <!-- hack iOS CSS :active style --> <body ontouchstart=""> <!-- Navigation --> <nav class="navbar navbar-default navbar-custom navbar-fixed-top"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header page-scroll"> <button type="button" class="navbar-toggle"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="/">gitKong</a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div id="huxblog_navbar"> <div class="navbar-collapse"> <ul class="nav navbar-nav navbar-right"> <li> <a href="/">Home</a> </li> <li> <a href="/about/">About</a> </li> <!-- <li> <a href="/tags/">Tags</a> </li> --> </ul> </div> </div> <!-- /.navbar-collapse --> </div> <!-- /.container --> </nav> <script> // Drop Bootstarp low-performance Navbar // Use customize navbar with high-quality material design animation // in high-perf jank-free CSS3 implementation var $body = document.body; var $toggle = document.querySelector('.navbar-toggle'); var $navbar = document.querySelector('#huxblog_navbar'); var $collapse = document.querySelector('.navbar-collapse'); var __HuxNav__ = { close: function(){ $navbar.className = " "; // wait until animation end. setTimeout(function(){ // prevent frequently toggle if($navbar.className.indexOf('in') < 0) { $collapse.style.height = "0px" } },400) }, open: function(){ $collapse.style.height = "auto" $navbar.className += " in"; } } // Bind Event $toggle.addEventListener('click', function(e){ if ($navbar.className.indexOf('in') > 0) { __HuxNav__.close() }else{ __HuxNav__.open() } }) /** * Since Fastclick is used to delegate 'touchstart' globally * to hack 300ms delay in iOS by performing a fake 'click', * Using 'e.stopPropagation' to stop 'touchstart' event from * $toggle/$collapse will break global delegation. * * Instead, we use a 'e.target' filter to prevent handler * added to document close HuxNav. * * Also, we use 'click' instead of 'touchstart' as compromise */ document.addEventListener('click', function(e){ if(e.target == $toggle) return; if(e.target.className == 'icon-bar') return; __HuxNav__.close(); }) </script> <!-- Page Header --> <header class="intro-header" style="background-image: url('/img/home-bg-o.jpg')"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 "> <div class="site-heading"> <h1>About</h1> <!--<hr class="small">--> <span class="subheading">Hey, this is BY Qiu.</span> </div> </div> </div> </div> </header> <!-- Main Content --> <div class="container"> <div class="row"> <!-- USE SIDEBAR --> <!-- PostList Container --> <div class=" col-lg-8 col-lg-offset-1 col-md-8 col-md-offset-1 col-sm-12 col-xs-12 postlist-container "> <!-- Language Selector --> <!-- <select class="sel-lang" onchange= "onLanChange(this.options[this.options.selectedIndex].value)"> <option value="0" selected> 中文 Chinese </option> <option value="1"> 英文 English </option> </select> --> <!-- Chinese Version --> <div class="zh post-container"> <!--copied from markdown --> <!-- <blockquote><p>冰冻三尺 非一日之寒,<br> 积土成山 非斯须之作</p></blockquote> --> <p>Hey,我是<strong>孔凡列</strong></p> <!-- <p>这是我的利用 <a href="https://pages.github.com/">GitHub Pages</a> 与 <a href="http://jekyll.com.cn/">Jekyll</a> 搭建的 个人博客。我在GitHub主页<a href="https://github.com/qiubaiying">👉GitHub·BY</a> 与 简书主页<a href="https://http://www.jianshu.com/u/e71990ada2fd">👉BY</a>。</p> --> <p>coding</p> <h5>Talks</h5> <!-- <ul> --> <!-- <li><a href="https://github.com">GitHub</a></li> <li><a href="http://jekyll.com.cn/">jekyll</a></li> <li><a href="https://pages.github.com/">GitHub Pages</a></li> <li><a href="https://qiubaiying.github.io">BY</a></li> </ul> --> </div> <!-- English Version --> <!-- <div class="en post-container"> <blockquote><p>Yet another iOS Developer. <br> Yet another Life-long Student.</p></blockquote> <p>Hi, I am <strong>Baiying Qiu(邱柏荧)</strong>,you can call me <strong>BY</strong>. I'm an iOS Developer.I now working in Xiamen Supermo Intelligent Logistics Technology Co., Ltd.</p> <p>This is my personal blog, through making Github Pages and Jekyll.My GitHub 👉 <a href="http://github.com/qiubaiying">Github·BY</a>.</p> <p>I am a sports enthusiast, I like fitness, running and tae kwon do, sports is my full of vitality.</p> <h5>Talks</h5> <ul> <li><a href="https://github.com">GitHub</a></li> <li><a href="http://jekyll.com.cn/">jekyll</a></li> <li><a href="https://pages.github.com/">GitHub Pages</a></li> <li><a href="https://qiubaiying.github.io">BY</a></li> </ul> </div> --> <!-- Handle Language Change --> <script type="text/javascript"> // get nodes var $zh = document.querySelector(".zh"); var $en = document.querySelector(".en"); var $select = document.querySelector("select"); // bind hashchange event window.addEventListener('hashchange', _render); // handle render function _render(){ var _hash = window.location.hash; // en if(_hash == "#en"){ $select.selectedIndex = 1; $en.style.display = "block"; $zh.style.display = "none"; // zh by default }else{ // not trigger onChange, otherwise cause a loop call. $select.selectedIndex = 0; $zh.style.display = "block"; $en.style.display = "none"; } } // handle select change function onLanChange(index){ if(index == 0){ window.location.hash = "#zh" }else{ window.location.hash = "#en" } } // init _render(); </script> <!-- 多说评论框 start --> <!-- <div class="comment"> <div class="ds-thread" data-thread-id="0ee040117ec56f17aa7e2523d1eae19b" data-title="About" data-url="http://localhost:4000/about/"></div> </div> --> <!-- 多说评论框 end --> <!-- 多说公共JS代码 start (一个网页只需插入一次) --> <script type="text/javascript"> // dynamic User hacking by Hux var _user = 'qiubaiying'; // duoshuo comment query. var duoshuoQuery = {short_name: _user }; (function() { var ds = document.createElement('script'); ds.type = 'text/javascript';ds.async = true; ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js'; ds.charset = 'UTF-8'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds); })(); </script> <!-- 多说公共JS代码 end --> </div> <!-- Sidebar Container --> <div class=" col-lg-3 col-lg-offset-0 col-md-3 col-md-offset-0 col-sm-12 col-xs-12 sidebar-container "> <!-- Featured Tags --> <section> <hr class="hidden-sm hidden-xs"> <h5><a href="/tags/">FEATURED TAGS</a></h5> <div class="tags"> </div> </section> <!-- Short About --> <section class="visible-md visible-lg"> <hr><h5><a href="/about/">ABOUT ME</a></h5> <div class="short-about"> <img src="img/avatar-by.JPG" /> <p>It takes a great man <br> to be a good instener</p> <!-- SNS Link --> <ul class="list-inline"> <li> <a target="_blank" href="https://www.zhihu.com/people/qiubaiying"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-stack-1x fa-inverse">知</i> </span> </a> </li> <li> <a target="_blank" href="http://weibo.com/qiubaiying"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-weibo fa-stack-1x fa-inverse"></i> </span> </a> </li> <li> <a target="_blank" href="https://www.facebook.com/baiying.qiu.7"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-facebook fa-stack-1x fa-inverse"></i> </span> </a> </li> <li> <a target="_blank" href="https://github.com/qiubaiying"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-github fa-stack-1x fa-inverse"></i> </span> </a> </li> </ul> </div> </section> <!-- Friends Blog --> <hr> <h5>FRIENDS</h5> <ul class="list-inline"> <li><a href="http://www.jianshu.com/u/e71990ada2fd">简书·BY</a></li> <li><a href="https://apple.com">Apple</a></li> <li><a href="https://developer.apple.com/">Apple Developer</a></li> </ul> </div> </div> </div> <!-- Footer --> <footer> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <ul class="list-inline text-center"> <!-- add Weibo, Zhihu by Hux, add target = "_blank" to <a> by Hux --> <li> <a target="_blank" href="https://www.zhihu.com/people/qiubaiying"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-stack-1x fa-inverse">知</i> </span> </a> </li> <li> <a target="_blank" href="http://weibo.com/qiubaiying"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-weibo fa-stack-1x fa-inverse"></i> </span> </a> </li> <li> <a target="_blank" href="https://www.facebook.com/baiying.qiu.7"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-facebook fa-stack-1x fa-inverse"></i> </span> </a> </li> <li> <a target="_blank" href="https://github.com/qiubaiying"> <span class="fa-stack fa-lg"> <i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-github fa-stack-1x fa-inverse"></i> </span> </a> </li> </ul> <p class="copyright text-muted"> Copyright &copy; BY Blog 2017 <br> Theme by <a href="http://huangxuan.me">Hux</a> | <iframe style="margin-left: 2px; margin-bottom:-5px;" frameborder="0" scrolling="0" width="100px" height="20px" src="https://ghbtns.com/github-btn.html?user=huxpro&repo=huxpro.github.io&type=star&count=true" > </iframe> </p> </div> </div> </div> </footer> <!-- jQuery --> <script src="/js/jquery.min.js "></script> <!-- Bootstrap Core JavaScript --> <script src="/js/bootstrap.min.js "></script> <!-- Custom Theme JavaScript --> <script src="/js/hux-blog.min.js "></script> <!-- Service Worker --> <script type="text/javascript"> if(navigator.serviceWorker){ // For security reasons, a service worker can only control the pages that are in the same directory level or below it. That's why we put sw.js at ROOT level. navigator.serviceWorker .register('/sw.js') .then((registration) => {console.log('Service Worker Registered. ', registration)}) .catch((error) => {console.log('ServiceWorker registration failed: ', error)}) } </script> <!-- async load function --> <script> function async(u, c) { var d = document, t = 'script', o = d.createElement(t), s = d.getElementsByTagName(t)[0]; o.src = u; if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); } s.parentNode.insertBefore(o, s); } </script> <!-- Because of the native support for backtick-style fenced code blocks right within the Markdown is landed in Github Pages, From V1.6, There is no need for Highlight.js, so Huxblog drops it officially. - https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0 - https://help.github.com/articles/creating-and-highlighting-code-blocks/ - https://github.com/jneen/rouge/wiki/list-of-supported-languages-and-lexers --> <!-- <script> async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){ hljs.initHighlightingOnLoad(); }) </script> <link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet"> --> <!-- jquery.tagcloud.js --> <script> // only load tagcloud.js in tag.html if($('#tag_cloud').length !== 0){ async('/js/jquery.tagcloud.js',function(){ $.fn.tagcloud.defaults = { //size: {start: 1, end: 1, unit: 'em'}, color: {start: '#bbbbee', end: '#0085a1'}, }; $('#tag_cloud a').tagcloud(); }) } </script> <!--fastClick.js --> <script> async("//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js", function(){ var $nav = document.querySelector("nav"); if($nav) FastClick.attach($nav); }) </script> <!-- Google Analytics --> <script> // dynamic User by Hux var _gaId = 'UA-90855596-1'; var _gaDomain = 'auto'; // Originial (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', _gaId, _gaDomain); ga('send', 'pageview'); </script> <!-- Baidu Tongji --> <script> // dynamic User by Hux var _baId = 'b50bf2b12b5338a1845e33832976fd68'; // Originial var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "//hm.baidu.com/hm.js?" + _baId; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <!-- Side Catalog --> <!-- Image to hack wechat --> <img src="/img/icon_wechat.png" width="0" height="0" /> <!-- Migrate from head to bottom, no longer block render and still work --> </body> </html>
/////////////////////////////////////////////////////////////////////////////// // Name: wx/window.h // Purpose: wxWindowBase class - the interface of wxWindow // Author: Vadim Zeitlin // Modified by: Ron Lee // Created: 01/02/97 // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_WINDOW_H_BASE_ #define _WX_WINDOW_H_BASE_ // ---------------------------------------------------------------------------- // headers which we must include here // ---------------------------------------------------------------------------- #include "wx/event.h" // the base class #include "wx/list.h" // defines wxWindowList #include "wx/cursor.h" // we have member variables of these classes #include "wx/font.h" // so we can't do without them #include "wx/colour.h" #include "wx/region.h" #include "wx/utils.h" #include "wx/intl.h" #include "wx/validate.h" // for wxDefaultValidator (always include it) #if wxUSE_PALETTE #include "wx/palette.h" #endif // wxUSE_PALETTE #if wxUSE_ACCEL #include "wx/accel.h" #endif // wxUSE_ACCEL #if wxUSE_ACCESSIBILITY #include "wx/access.h" #endif // when building wxUniv/Foo we don't want the code for native menu use to be // compiled in - it should only be used when building real wxFoo #ifdef __WXUNIVERSAL__ #define wxUSE_MENUS_NATIVE 0 #else // !__WXUNIVERSAL__ #define wxUSE_MENUS_NATIVE wxUSE_MENUS #endif // __WXUNIVERSAL__/!__WXUNIVERSAL__ // Define this macro if the corresponding operating system handles the state // of children windows automatically when the parent is enabled/disabled. // Otherwise wx itself must ensure that when the parent is disabled its // children are disabled too, and their initial state is restored when the // parent is enabled back. #if defined(__WXMSW__) || defined(__WXPM__) // must do everything ourselves #undef wxHAS_NATIVE_ENABLED_MANAGEMENT #else #define wxHAS_NATIVE_ENABLED_MANAGEMENT #endif // ---------------------------------------------------------------------------- // forward declarations // ---------------------------------------------------------------------------- class WXDLLIMPEXP_FWD_CORE wxCaret; class WXDLLIMPEXP_FWD_CORE wxControl; class WXDLLIMPEXP_FWD_CORE wxCursor; class WXDLLIMPEXP_FWD_CORE wxDC; class WXDLLIMPEXP_FWD_CORE wxDropTarget; class WXDLLIMPEXP_FWD_CORE wxLayoutConstraints; class WXDLLIMPEXP_FWD_CORE wxSizer; class WXDLLIMPEXP_FWD_CORE wxToolTip; class WXDLLIMPEXP_FWD_CORE wxWindowBase; class WXDLLIMPEXP_FWD_CORE wxWindow; class WXDLLIMPEXP_FWD_CORE wxScrollHelper; #if wxUSE_ACCESSIBILITY class WXDLLIMPEXP_FWD_CORE wxAccessible; #endif // ---------------------------------------------------------------------------- // helper stuff used by wxWindow // ---------------------------------------------------------------------------- // struct containing all the visual attributes of a control struct WXDLLIMPEXP_CORE wxVisualAttributes { // the font used for control label/text inside it wxFont font; // the foreground colour wxColour colFg; // the background colour, may be wxNullColour if the controls background // colour is not solid wxColour colBg; }; // different window variants, on platforms like eg mac uses different // rendering sizes enum wxWindowVariant { wxWINDOW_VARIANT_NORMAL, // Normal size wxWINDOW_VARIANT_SMALL, // Smaller size (about 25 % smaller than normal) wxWINDOW_VARIANT_MINI, // Mini size (about 33 % smaller than normal) wxWINDOW_VARIANT_LARGE, // Large size (about 25 % larger than normal) wxWINDOW_VARIANT_MAX }; #if wxUSE_SYSTEM_OPTIONS #define wxWINDOW_DEFAULT_VARIANT wxT("window-default-variant") #endif // valid values for Show/HideWithEffect() enum wxShowEffect { wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_ROLL_TO_LEFT, wxSHOW_EFFECT_ROLL_TO_RIGHT, wxSHOW_EFFECT_ROLL_TO_TOP, wxSHOW_EFFECT_ROLL_TO_BOTTOM, wxSHOW_EFFECT_SLIDE_TO_LEFT, wxSHOW_EFFECT_SLIDE_TO_RIGHT, wxSHOW_EFFECT_SLIDE_TO_TOP, wxSHOW_EFFECT_SLIDE_TO_BOTTOM, wxSHOW_EFFECT_BLEND, wxSHOW_EFFECT_EXPAND, wxSHOW_EFFECT_MAX }; // flags for SendSizeEvent() enum { wxSEND_EVENT_POST = 1 }; // ---------------------------------------------------------------------------- // (pseudo)template list classes // ---------------------------------------------------------------------------- WX_DECLARE_LIST_3(wxWindow, wxWindowBase, wxWindowList, wxWindowListNode, class WXDLLIMPEXP_CORE); // ---------------------------------------------------------------------------- // global variables // ---------------------------------------------------------------------------- extern WXDLLIMPEXP_DATA_CORE(wxWindowList) wxTopLevelWindows; // declared here for compatibility only, main declaration is in wx/app.h extern WXDLLIMPEXP_DATA_BASE(wxList) wxPendingDelete; // ---------------------------------------------------------------------------- // wxWindowBase is the base class for all GUI controls/widgets, this is the public // interface of this class. // // Event handler: windows have themselves as their event handlers by default, // but their event handlers could be set to another object entirely. This // separation can reduce the amount of derivation required, and allow // alteration of a window's functionality (e.g. by a resource editor that // temporarily switches event handlers). // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxWindowBase : public wxEvtHandler { public: // creating the window // ------------------- // default ctor, initializes everything which can be initialized before // Create() wxWindowBase() ; virtual ~wxWindowBase(); // deleting the window // ------------------- // ask the window to close itself, return true if the event handler // honoured our request bool Close( bool force = false ); // the following functions delete the C++ objects (the window itself // or its children) as well as the GUI windows and normally should // never be used directly // delete window unconditionally (dangerous!), returns true if ok virtual bool Destroy(); // delete all children of this window, returns true if ok bool DestroyChildren(); // is the window being deleted? bool IsBeingDeleted() const; // window attributes // ----------------- // label is just the same as the title (but for, e.g., buttons it // makes more sense to speak about labels), title access // is available from wxTLW classes only (frames, dialogs) virtual void SetLabel(const wxString& label) = 0; virtual wxString GetLabel() const = 0; // the window name is used for ressource setting in X, it is not the // same as the window title/label virtual void SetName( const wxString &name ) { m_windowName = name; } virtual wxString GetName() const { return m_windowName; } // sets the window variant, calls internally DoSetVariant if variant // has changed void SetWindowVariant(wxWindowVariant variant); wxWindowVariant GetWindowVariant() const { return m_windowVariant; } // get or change the layout direction (LTR or RTL) for this window, // wxLayout_Default is returned if layout direction is not supported virtual wxLayoutDirection GetLayoutDirection() const { return wxLayout_Default; } virtual void SetLayoutDirection(wxLayoutDirection WXUNUSED(dir)) { } // mirror coordinates for RTL layout if this window uses it and if the // mirroring is not done automatically like Win32 virtual wxCoord AdjustForLayoutDirection(wxCoord x, wxCoord width, wxCoord widthTotal) const; // window id uniquely identifies the window among its siblings unless // it is wxID_ANY which means "don't care" void SetId( wxWindowID winid ) { m_windowId = winid; } wxWindowID GetId() const { return m_windowId; } // generate a unique id (or count of them consecutively), returns a // valid id in the auto-id range or wxID_NONE if failed. If using // autoid management, it will mark the id as reserved until it is // used (by assigning it to a wxWindowIDRef) or unreserved. static wxWindowID NewControlId(int count = 1) { return wxIdManager::ReserveId(count); } // If an ID generated from NewControlId is not assigned to a wxWindowIDRef, // it must be unreserved static void UnreserveControlId(wxWindowID id, int count = 1) { wxIdManager::UnreserveId(id, count); } // moving/resizing // --------------- // set the window size and/or position void SetSize( int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO ) { DoSetSize(x, y, width, height, sizeFlags); } void SetSize( int width, int height ) { DoSetSize( wxDefaultCoord, wxDefaultCoord, width, height, wxSIZE_USE_EXISTING ); } void SetSize( const wxSize& size ) { SetSize( size.x, size.y); } void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO) { DoSetSize(rect.x, rect.y, rect.width, rect.height, sizeFlags); } void Move(int x, int y, int flags = wxSIZE_USE_EXISTING) { DoSetSize(x, y, wxDefaultCoord, wxDefaultCoord, flags); } void Move(const wxPoint& pt, int flags = wxSIZE_USE_EXISTING) { Move(pt.x, pt.y, flags); } void SetPosition(const wxPoint& pt) { Move(pt); } // Z-order virtual void Raise() = 0; virtual void Lower() = 0; // client size is the size of area available for subwindows void SetClientSize( int width, int height ) { DoSetClientSize(width, height); } void SetClientSize( const wxSize& size ) { DoSetClientSize(size.x, size.y); } void SetClientSize(const wxRect& rect) { SetClientSize( rect.width, rect.height ); } // get the window position (pointers may be NULL): notice that it is in // client coordinates for child windows and screen coordinates for the // top level ones, use GetScreenPosition() if you need screen // coordinates for all kinds of windows void GetPosition( int *x, int *y ) const { DoGetPosition(x, y); } wxPoint GetPosition() const { int x, y; DoGetPosition(&x, &y); return wxPoint(x, y); } // get the window position in screen coordinates void GetScreenPosition(int *x, int *y) const { DoGetScreenPosition(x, y); } wxPoint GetScreenPosition() const { int x, y; DoGetScreenPosition(&x, &y); return wxPoint(x, y); } // get the window size (pointers may be NULL) void GetSize( int *w, int *h ) const { DoGetSize(w, h); } wxSize GetSize() const { int w, h; DoGetSize(& w, & h); return wxSize(w, h); } void GetClientSize( int *w, int *h ) const { DoGetClientSize(w, h); } wxSize GetClientSize() const { int w, h; DoGetClientSize(&w, &h); return wxSize(w, h); } // get the position and size at once wxRect GetRect() const { int x, y, w, h; GetPosition(&x, &y); GetSize(&w, &h); return wxRect(x, y, w, h); } wxRect GetScreenRect() const { int x, y, w, h; GetScreenPosition(&x, &y); GetSize(&w, &h); return wxRect(x, y, w, h); } // get the origin of the client area of the window relative to the // window top left corner (the client area may be shifted because of // the borders, scrollbars, other decorations...) virtual wxPoint GetClientAreaOrigin() const; // get the client rectangle in window (i.e. client) coordinates wxRect GetClientRect() const { return wxRect(GetClientAreaOrigin(), GetClientSize()); } // client<->window size conversion virtual wxSize ClientToWindowSize(const wxSize& size) const; virtual wxSize WindowToClientSize(const wxSize& size) const; // get the size best suited for the window (in fact, minimal // acceptable size using which it will still look "nice" in // most situations) wxSize GetBestSize() const; void GetBestSize(int *w, int *h) const { wxSize s = GetBestSize(); if ( w ) *w = s.x; if ( h ) *h = s.y; } // Determine the best size in the other direction if one of them is // fixed. This is used with windows that can wrap their contents and // returns input-independent best size for the others. int GetBestHeight(int width) const; int GetBestWidth(int height) const; void SetScrollHelper( wxScrollHelper *sh ) { m_scrollHelper = sh; } wxScrollHelper *GetScrollHelper() { return m_scrollHelper; } // reset the cached best size value so it will be recalculated the // next time it is needed. void InvalidateBestSize(); void CacheBestSize(const wxSize& size) const { wxConstCast(this, wxWindowBase)->m_bestSizeCache = size; } // This function will merge the window's best size into the window's // minimum size, giving priority to the min size components, and // returns the results. virtual wxSize GetEffectiveMinSize() const; wxDEPRECATED_MSG("use GetEffectiveMinSize() instead") wxSize GetBestFittingSize() const; wxDEPRECATED_MSG("use GetEffectiveMinSize() instead") wxSize GetAdjustedMinSize() const; // A 'Smart' SetSize that will fill in default size values with 'best' // size. Sets the minsize to what was passed in. void SetInitialSize(const wxSize& size=wxDefaultSize); wxDEPRECATED_MSG("use SetInitialSize() instead") void SetBestFittingSize(const wxSize& size=wxDefaultSize); // the generic centre function - centers the window on parent by` // default or on screen if it doesn't have parent or // wxCENTER_ON_SCREEN flag is given void Centre(int dir = wxBOTH) { DoCentre(dir); } void Center(int dir = wxBOTH) { DoCentre(dir); } // centre with respect to the parent window void CentreOnParent(int dir = wxBOTH) { DoCentre(dir); } void CenterOnParent(int dir = wxBOTH) { CentreOnParent(dir); } // set window size to wrap around its children virtual void Fit(); // set virtual size to satisfy children virtual void FitInside(); // SetSizeHints is actually for setting the size hints // for the wxTLW for a Window Manager - hence the name - // and it is therefore overridden in wxTLW to do that. // In wxWindow(Base), it has (unfortunately) been abused // to mean the same as SetMinSize() and SetMaxSize(). virtual void SetSizeHints( int minW, int minH, int maxW = wxDefaultCoord, int maxH = wxDefaultCoord, int incW = wxDefaultCoord, int incH = wxDefaultCoord ) { DoSetSizeHints(minW, minH, maxW, maxH, incW, incH); } void SetSizeHints( const wxSize& minSize, const wxSize& maxSize=wxDefaultSize, const wxSize& incSize=wxDefaultSize) { DoSetSizeHints(minSize.x, minSize.y, maxSize.x, maxSize.y, incSize.x, incSize.y); } #if WXWIN_COMPATIBILITY_2_8 // these are useless and do nothing since wxWidgets 2.9 wxDEPRECATED( virtual void SetVirtualSizeHints( int minW, int minH, int maxW = wxDefaultCoord, int maxH = wxDefaultCoord ) ); wxDEPRECATED( void SetVirtualSizeHints( const wxSize& minSize, const wxSize& maxSize=wxDefaultSize) ); #endif // WXWIN_COMPATIBILITY_2_8 // Call these to override what GetBestSize() returns. This // method is only virtual because it is overridden in wxTLW // as a different API for SetSizeHints(). virtual void SetMinSize(const wxSize& minSize); virtual void SetMaxSize(const wxSize& maxSize); // Like Set*Size, but for client, not window, size virtual void SetMinClientSize(const wxSize& size) { SetMinSize(ClientToWindowSize(size)); } virtual void SetMaxClientSize(const wxSize& size) { SetMaxSize(ClientToWindowSize(size)); } // Override these methods to impose restrictions on min/max size. // The easier way is to call SetMinSize() and SetMaxSize() which // will have the same effect. Doing both is non-sense. virtual wxSize GetMinSize() const { return wxSize(m_minWidth, m_minHeight); } virtual wxSize GetMaxSize() const { return wxSize(m_maxWidth, m_maxHeight); } // Like Get*Size, but for client, not window, size virtual wxSize GetMinClientSize() const { return WindowToClientSize(GetMinSize()); } virtual wxSize GetMaxClientSize() const { return WindowToClientSize(GetMaxSize()); } // Get the min and max values one by one int GetMinWidth() const { return GetMinSize().x; } int GetMinHeight() const { return GetMinSize().y; } int GetMaxWidth() const { return GetMaxSize().x; } int GetMaxHeight() const { return GetMaxSize().y; } // Methods for accessing the virtual size of a window. For most // windows this is just the client area of the window, but for // some like scrolled windows it is more or less independent of // the screen window size. You may override the DoXXXVirtual // methods below for classes where that is the case. void SetVirtualSize( const wxSize &size ) { DoSetVirtualSize( size.x, size.y ); } void SetVirtualSize( int x, int y ) { DoSetVirtualSize( x, y ); } wxSize GetVirtualSize() const { return DoGetVirtualSize(); } void GetVirtualSize( int *x, int *y ) const { wxSize s( DoGetVirtualSize() ); if( x ) *x = s.GetWidth(); if( y ) *y = s.GetHeight(); } // Override these methods for windows that have a virtual size // independent of their client size. eg. the virtual area of a // wxScrolledWindow. virtual void DoSetVirtualSize( int x, int y ); virtual wxSize DoGetVirtualSize() const; // Return the largest of ClientSize and BestSize (as determined // by a sizer, interior children, or other means) virtual wxSize GetBestVirtualSize() const { wxSize client( GetClientSize() ); wxSize best( GetBestSize() ); return wxSize( wxMax( client.x, best.x ), wxMax( client.y, best.y ) ); } // returns the magnification of the content of this window // eg 2.0 for a window on a retina screen virtual double GetContentScaleFactor() const { return 1.0; } // return the size of the left/right and top/bottom borders in x and y // components of the result respectively virtual wxSize GetWindowBorderSize() const; // wxSizer and friends use this to give a chance to a component to recalc // its min size once one of the final size components is known. Override // this function when that is useful (such as for wxStaticText which can // stretch over several lines). Parameter availableOtherDir // tells the item how much more space there is available in the opposite // direction (-1 if unknown). virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); // sends a size event to the window using its current size -- this has an // effect of refreshing the window layout // // by default the event is sent, i.e. processed immediately, but if flags // value includes wxSEND_EVENT_POST then it's posted, i.e. only schedule // for later processing virtual void SendSizeEvent(int flags = 0); // this is a safe wrapper for GetParent()->SendSizeEvent(): it checks that // we have a parent window and it's not in process of being deleted // // this is used by controls such as tool/status bars changes to which must // also result in parent re-layout void SendSizeEventToParent(int flags = 0); // this is a more readable synonym for SendSizeEvent(wxSEND_EVENT_POST) void PostSizeEvent() { SendSizeEvent(wxSEND_EVENT_POST); } // this is the same as SendSizeEventToParent() but using PostSizeEvent() void PostSizeEventToParent() { SendSizeEventToParent(wxSEND_EVENT_POST); } // These functions should be used before repositioning the children of // this window to reduce flicker or, in MSW case, even avoid display // corruption in some situations (so they're more than just optimization). // // EndRepositioningChildren() should be called if and only if // BeginRepositioningChildren() returns true. To ensure that this is always // done automatically, use ChildrenRepositioningGuard class below. virtual bool BeginRepositioningChildren() { return false; } virtual void EndRepositioningChildren() { } // A simple helper which ensures that EndRepositioningChildren() is called // from its dtor if and only if calling BeginRepositioningChildren() from // the ctor returned true. class ChildrenRepositioningGuard { public: // Notice that window can be NULL here, for convenience. In this case // this class simply doesn't do anything. wxEXPLICIT ChildrenRepositioningGuard(wxWindowBase* win) : m_win(win), m_callEnd(win && win->BeginRepositioningChildren()) { } ~ChildrenRepositioningGuard() { if ( m_callEnd ) m_win->EndRepositioningChildren(); } private: wxWindowBase* const m_win; const bool m_callEnd; wxDECLARE_NO_COPY_CLASS(ChildrenRepositioningGuard); }; // window state // ------------ // returns true if window was shown/hidden, false if the nothing was // done (window was already shown/hidden) virtual bool Show( bool show = true ); bool Hide() { return Show(false); } // show or hide the window with a special effect, not implemented on // most platforms (where it is the same as Show()/Hide() respectively) // // timeout specifies how long the animation should take, in ms, the // default value of 0 means to use the default (system-dependent) value virtual bool ShowWithEffect(wxShowEffect WXUNUSED(effect), unsigned WXUNUSED(timeout) = 0) { return Show(); } virtual bool HideWithEffect(wxShowEffect WXUNUSED(effect), unsigned WXUNUSED(timeout) = 0) { return Hide(); } // returns true if window was enabled/disabled, false if nothing done virtual bool Enable( bool enable = true ); bool Disable() { return Enable(false); } virtual bool IsShown() const { return m_isShown; } // returns true if the window is really enabled and false otherwise, // whether because it had been explicitly disabled itself or because // its parent is currently disabled -- then this method returns false // whatever is the intrinsic state of this window, use IsThisEnabled(0 // to retrieve it. In other words, this relation always holds: // // IsEnabled() == IsThisEnabled() && parent.IsEnabled() // bool IsEnabled() const; // returns the internal window state independently of the parent(s) // state, i.e. the state in which the window would be if all its // parents were enabled (use IsEnabled() above to get the effective // window state) bool IsThisEnabled() const { return m_isEnabled; } // returns true if the window is visible, i.e. IsShown() returns true // if called on it and all its parents up to the first TLW virtual bool IsShownOnScreen() const; // get/set window style (setting style won't update the window and so // is only useful for internal usage) virtual void SetWindowStyleFlag( long style ) { m_windowStyle = style; } virtual long GetWindowStyleFlag() const { return m_windowStyle; } // just some (somewhat shorter) synonyms void SetWindowStyle( long style ) { SetWindowStyleFlag(style); } long GetWindowStyle() const { return GetWindowStyleFlag(); } // check if the flag is set bool HasFlag(int flag) const { return (m_windowStyle & flag) != 0; } virtual bool IsRetained() const { return HasFlag(wxRETAINED); } // turn the flag on if it had been turned off before and vice versa, // return true if the flag is currently turned on bool ToggleWindowStyle(int flag); // extra style: the less often used style bits which can't be set with // SetWindowStyleFlag() virtual void SetExtraStyle(long exStyle) { m_exStyle = exStyle; } long GetExtraStyle() const { return m_exStyle; } bool HasExtraStyle(int exFlag) const { return (m_exStyle & exFlag) != 0; } #if WXWIN_COMPATIBILITY_2_8 // make the window modal (all other windows unresponsive) wxDEPRECATED( virtual void MakeModal(bool modal = true) ); #endif // (primitive) theming support // --------------------------- virtual void SetThemeEnabled(bool enableTheme) { m_themeEnabled = enableTheme; } virtual bool GetThemeEnabled() const { return m_themeEnabled; } // focus and keyboard handling // --------------------------- // set focus to this window virtual void SetFocus() = 0; // set focus to this window as the result of a keyboard action virtual void SetFocusFromKbd() { SetFocus(); } // return the window which currently has the focus or NULL static wxWindow *FindFocus(); static wxWindow *DoFindFocus() /* = 0: implement in derived classes */; // return true if the window has focus (handles composite windows // correctly - returns true if GetMainWindowOfCompositeControl() // has focus) virtual bool HasFocus() const; // can this window have focus in principle? // // the difference between AcceptsFocus[FromKeyboard]() and CanAcceptFocus // [FromKeyboard]() is that the former functions are meant to be // overridden in the derived classes to simply return false if the // control can't have focus, while the latter are meant to be used by // this class clients and take into account the current window state virtual bool AcceptsFocus() const { return true; } // can this window or one of its children accept focus? // // usually it's the same as AcceptsFocus() but is overridden for // container windows virtual bool AcceptsFocusRecursively() const { return AcceptsFocus(); } // can this window be given focus by keyboard navigation? if not, the // only way to give it focus (provided it accepts it at all) is to // click it virtual bool AcceptsFocusFromKeyboard() const { return AcceptsFocus(); } // Can this window be focused right now, in its current state? This // shouldn't be called at all if AcceptsFocus() returns false. // // It is a convenient helper for the various functions using it below // but also a hook allowing to override the default logic for some rare // cases (currently just wxRadioBox in wxMSW) when it's inappropriate. virtual bool CanBeFocused() const { return IsShown() && IsEnabled(); } // can this window itself have focus? bool IsFocusable() const { return AcceptsFocus() && CanBeFocused(); } // can this window have focus right now? // // if this method returns true, it means that calling SetFocus() will // put focus either to this window or one of its children, if you need // to know whether this window accepts focus itself, use IsFocusable() bool CanAcceptFocus() const { return AcceptsFocusRecursively() && CanBeFocused(); } // can this window be assigned focus from keyboard right now? bool CanAcceptFocusFromKeyboard() const { return AcceptsFocusFromKeyboard() && CanBeFocused(); } // call this when the return value of AcceptsFocus() changes virtual void SetCanFocus(bool WXUNUSED(canFocus)) { } // navigates inside this window bool NavigateIn(int flags = wxNavigationKeyEvent::IsForward) { return DoNavigateIn(flags); } // navigates in the specified direction from this window, this is // equivalent to GetParent()->NavigateIn() bool Navigate(int flags = wxNavigationKeyEvent::IsForward) { return m_parent && ((wxWindowBase *)m_parent)->DoNavigateIn(flags); } // this function will generate the appropriate call to Navigate() if the // key event is one normally used for keyboard navigation and return true // in this case bool HandleAsNavigationKey(const wxKeyEvent& event); // move this window just before/after the specified one in tab order // (the other window must be our sibling!) void MoveBeforeInTabOrder(wxWindow *win) { DoMoveInTabOrder(win, OrderBefore); } void MoveAfterInTabOrder(wxWindow *win) { DoMoveInTabOrder(win, OrderAfter); } // parent/children relations // ------------------------- // get the list of children const wxWindowList& GetChildren() const { return m_children; } wxWindowList& GetChildren() { return m_children; } // needed just for extended runtime const wxWindowList& GetWindowChildren() const { return GetChildren() ; } // get the window before/after this one in the parents children list, // returns NULL if this is the first/last window wxWindow *GetPrevSibling() const { return DoGetSibling(OrderBefore); } wxWindow *GetNextSibling() const { return DoGetSibling(OrderAfter); } // get the parent or the parent of the parent wxWindow *GetParent() const { return m_parent; } inline wxWindow *GetGrandParent() const; // is this window a top level one? virtual bool IsTopLevel() const; // is this window a child or grand child of this one (inside the same // TLW)? bool IsDescendant(wxWindowBase* win) const; // it doesn't really change parent, use Reparent() instead void SetParent( wxWindowBase *parent ); // change the real parent of this window, return true if the parent // was changed, false otherwise (error or newParent == oldParent) virtual bool Reparent( wxWindowBase *newParent ); // implementation mostly virtual void AddChild( wxWindowBase *child ); virtual void RemoveChild( wxWindowBase *child ); // returns true if the child is in the client area of the window, i.e. is // not scrollbar, toolbar etc. virtual bool IsClientAreaChild(const wxWindow *WXUNUSED(child)) const { return true; } // looking for windows // ------------------- // find window among the descendants of this one either by id or by // name (return NULL if not found) wxWindow *FindWindow(long winid) const; wxWindow *FindWindow(const wxString& name) const; // Find a window among any window (all return NULL if not found) static wxWindow *FindWindowById( long winid, const wxWindow *parent = NULL ); static wxWindow *FindWindowByName( const wxString& name, const wxWindow *parent = NULL ); static wxWindow *FindWindowByLabel( const wxString& label, const wxWindow *parent = NULL ); // event handler stuff // ------------------- // get the current event handler wxEvtHandler *GetEventHandler() const { return m_eventHandler; } // replace the event handler (allows to completely subclass the // window) void SetEventHandler( wxEvtHandler *handler ); // push/pop event handler: allows to chain a custom event handler to // alreasy existing ones void PushEventHandler( wxEvtHandler *handler ); wxEvtHandler *PopEventHandler( bool deleteHandler = false ); // find the given handler in the event handler chain and remove (but // not delete) it from the event handler chain, return true if it was // found and false otherwise (this also results in an assert failure so // this function should only be called when the handler is supposed to // be there) bool RemoveEventHandler(wxEvtHandler *handler); // Process an event by calling GetEventHandler()->ProcessEvent(): this // is a straightforward replacement for ProcessEvent() itself which // shouldn't be used directly with windows as it doesn't take into // account any event handlers associated with the window bool ProcessWindowEvent(wxEvent& event) { return GetEventHandler()->ProcessEvent(event); } // Call GetEventHandler()->ProcessEventLocally(): this should be used // instead of calling ProcessEventLocally() directly on the window // itself as this wouldn't take any pushed event handlers into account // correctly bool ProcessWindowEventLocally(wxEvent& event) { return GetEventHandler()->ProcessEventLocally(event); } // Process an event by calling GetEventHandler()->ProcessEvent() and // handling any exceptions thrown by event handlers. It's mostly useful // when processing wx events when called from C code (e.g. in GTK+ // callback) when the exception wouldn't correctly propagate to // wxEventLoop. bool HandleWindowEvent(wxEvent& event) const; // disable wxEvtHandler double-linked list mechanism: virtual void SetNextHandler(wxEvtHandler *handler); virtual void SetPreviousHandler(wxEvtHandler *handler); // Watcom doesn't allow reducing access with using access declaration, see // #10749 #ifndef __WATCOMC__ protected: // NOTE: we change the access specifier of the following wxEvtHandler functions // so that the user won't be able to call them directly. // Calling wxWindow::ProcessEvent in fact only works when there are NO // event handlers pushed on the window. // To ensure correct operation, instead of wxWindow::ProcessEvent // you must always call wxWindow::GetEventHandler()->ProcessEvent() // or HandleWindowEvent(). // The same holds for all other wxEvtHandler functions. using wxEvtHandler::ProcessEvent; using wxEvtHandler::ProcessEventLocally; #if wxUSE_THREADS using wxEvtHandler::ProcessThreadEvent; #endif using wxEvtHandler::SafelyProcessEvent; using wxEvtHandler::ProcessPendingEvents; using wxEvtHandler::AddPendingEvent; using wxEvtHandler::QueueEvent; #endif // __WATCOMC__ public: // validators // ---------- #if wxUSE_VALIDATORS // a window may have an associated validator which is used to control // user input virtual void SetValidator( const wxValidator &validator ); virtual wxValidator *GetValidator() { return m_windowValidator; } #endif // wxUSE_VALIDATORS // dialog oriented functions // ------------------------- // validate the correctness of input, return true if ok virtual bool Validate(); // transfer data between internal and GUI representations virtual bool TransferDataToWindow(); virtual bool TransferDataFromWindow(); virtual void InitDialog(); #if wxUSE_ACCEL // accelerators // ------------ virtual void SetAcceleratorTable( const wxAcceleratorTable& accel ) { m_acceleratorTable = accel; } wxAcceleratorTable *GetAcceleratorTable() { return &m_acceleratorTable; } #endif // wxUSE_ACCEL #if wxUSE_HOTKEY // hot keys (system wide accelerators) // ----------------------------------- virtual bool RegisterHotKey(int hotkeyId, int modifiers, int keycode); virtual bool UnregisterHotKey(int hotkeyId); #endif // wxUSE_HOTKEY // dialog units translations // ------------------------- wxPoint ConvertPixelsToDialog( const wxPoint& pt ) const; wxPoint ConvertDialogToPixels( const wxPoint& pt ) const; wxSize ConvertPixelsToDialog( const wxSize& sz ) const { wxPoint pt(ConvertPixelsToDialog(wxPoint(sz.x, sz.y))); return wxSize(pt.x, pt.y); } wxSize ConvertDialogToPixels( const wxSize& sz ) const { wxPoint pt(ConvertDialogToPixels(wxPoint(sz.x, sz.y))); return wxSize(pt.x, pt.y); } // mouse functions // --------------- // move the mouse to the specified position virtual void WarpPointer(int x, int y) = 0; // start or end mouse capture, these functions maintain the stack of // windows having captured the mouse and after calling ReleaseMouse() // the mouse is not released but returns to the window which had had // captured it previously (if any) void CaptureMouse(); void ReleaseMouse(); // get the window which currently captures the mouse or NULL static wxWindow *GetCapture(); // does this window have the capture? virtual bool HasCapture() const { return (wxWindow *)this == GetCapture(); } // painting the window // ------------------- // mark the specified rectangle (or the whole window) as "dirty" so it // will be repainted virtual void Refresh( bool eraseBackground = true, const wxRect *rect = (const wxRect *) NULL ) = 0; // a less awkward wrapper for Refresh void RefreshRect(const wxRect& rect, bool eraseBackground = true) { Refresh(eraseBackground, &rect); } // repaint all invalid areas of the window immediately virtual void Update() { } // clear the window background virtual void ClearBackground(); // freeze the window: don't redraw it until it is thawed void Freeze(); // thaw the window: redraw it after it had been frozen void Thaw(); // return true if window had been frozen and not unthawed yet bool IsFrozen() const { return m_freezeCount != 0; } // adjust DC for drawing on this window virtual void PrepareDC( wxDC & WXUNUSED(dc) ) { } // return true if the window contents is double buffered by the system virtual bool IsDoubleBuffered() const { return false; } // the update region of the window contains the areas which must be // repainted by the program const wxRegion& GetUpdateRegion() const { return m_updateRegion; } wxRegion& GetUpdateRegion() { return m_updateRegion; } // get the update rectangleregion bounding box in client coords wxRect GetUpdateClientRect() const; // these functions verify whether the given point/rectangle belongs to // (or at least intersects with) the update region virtual bool DoIsExposed( int x, int y ) const; virtual bool DoIsExposed( int x, int y, int w, int h ) const; bool IsExposed( int x, int y ) const { return DoIsExposed(x, y); } bool IsExposed( int x, int y, int w, int h ) const { return DoIsExposed(x, y, w, h); } bool IsExposed( const wxPoint& pt ) const { return DoIsExposed(pt.x, pt.y); } bool IsExposed( const wxRect& rect ) const { return DoIsExposed(rect.x, rect.y, rect.width, rect.height); } // colours, fonts and cursors // -------------------------- // get the default attributes for the controls of this class: we // provide a virtual function which can be used to query the default // attributes of an existing control and a static function which can // be used even when no existing object of the given class is // available, but which won't return any styles specific to this // particular control, of course (e.g. "Ok" button might have // different -- bold for example -- font) virtual wxVisualAttributes GetDefaultAttributes() const { return GetClassDefaultAttributes(GetWindowVariant()); } static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); // set/retrieve the window colours (system defaults are used by // default): SetXXX() functions return true if colour was changed, // SetDefaultXXX() reset the "m_inheritXXX" flag after setting the // value to prevent it from being inherited by our children virtual bool SetBackgroundColour(const wxColour& colour); void SetOwnBackgroundColour(const wxColour& colour) { if ( SetBackgroundColour(colour) ) m_inheritBgCol = false; } wxColour GetBackgroundColour() const; bool InheritsBackgroundColour() const { return m_inheritBgCol; } bool UseBgCol() const { return m_hasBgCol; } virtual bool SetForegroundColour(const wxColour& colour); void SetOwnForegroundColour(const wxColour& colour) { if ( SetForegroundColour(colour) ) m_inheritFgCol = false; } wxColour GetForegroundColour() const; // Set/get the background style. virtual bool SetBackgroundStyle(wxBackgroundStyle style); wxBackgroundStyle GetBackgroundStyle() const { return m_backgroundStyle; } // returns true if the control has "transparent" areas such as a // wxStaticText and wxCheckBox and the background should be adapted // from a parent window virtual bool HasTransparentBackground() { return false; } // Returns true if background transparency is supported for this // window, i.e. if calling SetBackgroundStyle(wxBG_STYLE_TRANSPARENT) // has a chance of succeeding. If reason argument is non-NULL, returns a // user-readable explanation of why it isn't supported if the return // value is false. virtual bool IsTransparentBackgroundSupported(wxString* reason = NULL) const; // set/retrieve the font for the window (SetFont() returns true if the // font really changed) virtual bool SetFont(const wxFont& font) = 0; void SetOwnFont(const wxFont& font) { if ( SetFont(font) ) m_inheritFont = false; } wxFont GetFont() const; // set/retrieve the cursor for this window (SetCursor() returns true // if the cursor was really changed) virtual bool SetCursor( const wxCursor &cursor ); const wxCursor& GetCursor() const { return m_cursor; } #if wxUSE_CARET // associate a caret with the window void SetCaret(wxCaret *caret); // get the current caret (may be NULL) wxCaret *GetCaret() const { return m_caret; } #endif // wxUSE_CARET // get the (average) character size for the current font virtual int GetCharHeight() const = 0; virtual int GetCharWidth() const = 0; // get the width/height/... of the text using current or specified // font void GetTextExtent(const wxString& string, int *x, int *y, int *descent = NULL, int *externalLeading = NULL, const wxFont *font = NULL) const { DoGetTextExtent(string, x, y, descent, externalLeading, font); } wxSize GetTextExtent(const wxString& string) const { wxCoord w, h; GetTextExtent(string, &w, &h); return wxSize(w, h); } // client <-> screen coords // ------------------------ // translate to/from screen/client coordinates (pointers may be NULL) void ClientToScreen( int *x, int *y ) const { DoClientToScreen(x, y); } void ScreenToClient( int *x, int *y ) const { DoScreenToClient(x, y); } // wxPoint interface to do the same thing wxPoint ClientToScreen(const wxPoint& pt) const { int x = pt.x, y = pt.y; DoClientToScreen(&x, &y); return wxPoint(x, y); } wxPoint ScreenToClient(const wxPoint& pt) const { int x = pt.x, y = pt.y; DoScreenToClient(&x, &y); return wxPoint(x, y); } // test where the given (in client coords) point lies wxHitTest HitTest(wxCoord x, wxCoord y) const { return DoHitTest(x, y); } wxHitTest HitTest(const wxPoint& pt) const { return DoHitTest(pt.x, pt.y); } // misc // ---- // get the window border style from the given flags: this is different from // simply doing flags & wxBORDER_MASK because it uses GetDefaultBorder() to // translate wxBORDER_DEFAULT to something reasonable wxBorder GetBorder(long flags) const; // get border for the flags of this window wxBorder GetBorder() const { return GetBorder(GetWindowStyleFlag()); } // send wxUpdateUIEvents to this window, and children if recurse is true virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE); // do the window-specific processing after processing the update event virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ; #if wxUSE_MENUS // show popup menu at the given position, generate events for the items // selected in it bool PopupMenu(wxMenu *menu, const wxPoint& pos = wxDefaultPosition) { return PopupMenu(menu, pos.x, pos.y); } bool PopupMenu(wxMenu *menu, int x, int y); // simply return the id of the selected item or wxID_NONE without // generating any events int GetPopupMenuSelectionFromUser(wxMenu& menu, const wxPoint& pos = wxDefaultPosition) { return DoGetPopupMenuSelectionFromUser(menu, pos.x, pos.y); } int GetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y) { return DoGetPopupMenuSelectionFromUser(menu, x, y); } #endif // wxUSE_MENUS // override this method to return true for controls having multiple pages virtual bool HasMultiplePages() const { return false; } // scrollbars // ---------- // can the window have the scrollbar in this orientation? virtual bool CanScroll(int orient) const; // does the window have the scrollbar in this orientation? bool HasScrollbar(int orient) const; // configure the window scrollbars virtual void SetScrollbar( int orient, int pos, int thumbvisible, int range, bool refresh = true ) = 0; virtual void SetScrollPos( int orient, int pos, bool refresh = true ) = 0; virtual int GetScrollPos( int orient ) const = 0; virtual int GetScrollThumb( int orient ) const = 0; virtual int GetScrollRange( int orient ) const = 0; // scroll window to the specified position virtual void ScrollWindow( int dx, int dy, const wxRect* rect = NULL ) = 0; // scrolls window by line/page: note that not all controls support this // // return true if the position changed, false otherwise virtual bool ScrollLines(int WXUNUSED(lines)) { return false; } virtual bool ScrollPages(int WXUNUSED(pages)) { return false; } // convenient wrappers for ScrollLines/Pages bool LineUp() { return ScrollLines(-1); } bool LineDown() { return ScrollLines(1); } bool PageUp() { return ScrollPages(-1); } bool PageDown() { return ScrollPages(1); } // call this to always show one or both scrollbars, even if the window // is big enough to not require them virtual void AlwaysShowScrollbars(bool WXUNUSED(horz) = true, bool WXUNUSED(vert) = true) { } // return true if AlwaysShowScrollbars() had been called before for the // corresponding orientation virtual bool IsScrollbarAlwaysShown(int WXUNUSED(orient)) const { return false; } // context-sensitive help // ---------------------- // these are the convenience functions wrapping wxHelpProvider methods #if wxUSE_HELP // associate this help text with this window void SetHelpText(const wxString& text); #if WXWIN_COMPATIBILITY_2_8 // Associate this help text with all windows with the same id as this one. // Don't use this, do wxHelpProvider::Get()->AddHelp(id, text); wxDEPRECATED( void SetHelpTextForId(const wxString& text) ); #endif // WXWIN_COMPATIBILITY_2_8 // get the help string associated with the given position in this window // // notice that pt may be invalid if event origin is keyboard or unknown // and this method should return the global window help text then virtual wxString GetHelpTextAtPoint(const wxPoint& pt, wxHelpEvent::Origin origin) const; // returns the position-independent help text wxString GetHelpText() const { return GetHelpTextAtPoint(wxDefaultPosition, wxHelpEvent::Origin_Unknown); } #else // !wxUSE_HELP // silently ignore SetHelpText() calls void SetHelpText(const wxString& WXUNUSED(text)) { } void SetHelpTextForId(const wxString& WXUNUSED(text)) { } #endif // wxUSE_HELP // tooltips // -------- #if wxUSE_TOOLTIPS // the easiest way to set a tooltip for a window is to use this method void SetToolTip( const wxString &tip ); // attach a tooltip to the window, pointer can be NULL to remove // existing tooltip void SetToolTip( wxToolTip *tip ) { DoSetToolTip(tip); } // more readable synonym for SetToolTip(NULL) void UnsetToolTip() { SetToolTip(NULL); } // get the associated tooltip or NULL if none wxToolTip* GetToolTip() const { return m_tooltip; } wxString GetToolTipText() const; // Use the same tool tip as the given one (which can be NULL to indicate // that no tooltip should be used) for this window. This is currently only // used by wxCompositeWindow::DoSetToolTip() implementation and is not part // of the public wx API. // // Returns true if tip was valid and we copied it or false if it was NULL // and we reset our own tooltip too. bool CopyToolTip(wxToolTip *tip); #else // !wxUSE_TOOLTIPS // make it much easier to compile apps in an environment // that doesn't support tooltips, such as PocketPC void SetToolTip(const wxString & WXUNUSED(tip)) { } void UnsetToolTip() { } #endif // wxUSE_TOOLTIPS/!wxUSE_TOOLTIPS // drag and drop // ------------- #if wxUSE_DRAG_AND_DROP // set/retrieve the drop target associated with this window (may be // NULL; it's owned by the window and will be deleted by it) virtual void SetDropTarget( wxDropTarget *dropTarget ) = 0; virtual wxDropTarget *GetDropTarget() const { return m_dropTarget; } // Accept files for dragging virtual void DragAcceptFiles(bool accept) #ifdef __WXMSW__ // it does have common implementation but not for MSW which has its own // native version of it = 0 #endif // __WXMSW__ ; #endif // wxUSE_DRAG_AND_DROP // constraints and sizers // ---------------------- #if wxUSE_CONSTRAINTS // set the constraints for this window or retrieve them (may be NULL) void SetConstraints( wxLayoutConstraints *constraints ); wxLayoutConstraints *GetConstraints() const { return m_constraints; } // implementation only void UnsetConstraints(wxLayoutConstraints *c); wxWindowList *GetConstraintsInvolvedIn() const { return m_constraintsInvolvedIn; } void AddConstraintReference(wxWindowBase *otherWin); void RemoveConstraintReference(wxWindowBase *otherWin); void DeleteRelatedConstraints(); void ResetConstraints(); // these methods may be overridden for special layout algorithms virtual void SetConstraintSizes(bool recurse = true); virtual bool LayoutPhase1(int *noChanges); virtual bool LayoutPhase2(int *noChanges); virtual bool DoPhase(int phase); // these methods are virtual but normally won't be overridden virtual void SetSizeConstraint(int x, int y, int w, int h); virtual void MoveConstraint(int x, int y); virtual void GetSizeConstraint(int *w, int *h) const ; virtual void GetClientSizeConstraint(int *w, int *h) const ; virtual void GetPositionConstraint(int *x, int *y) const ; #endif // wxUSE_CONSTRAINTS // when using constraints or sizers, it makes sense to update // children positions automatically whenever the window is resized // - this is done if autoLayout is on void SetAutoLayout( bool autoLayout ) { m_autoLayout = autoLayout; } bool GetAutoLayout() const { return m_autoLayout; } // lay out the window and its children virtual bool Layout(); // sizers void SetSizer(wxSizer *sizer, bool deleteOld = true ); void SetSizerAndFit( wxSizer *sizer, bool deleteOld = true ); wxSizer *GetSizer() const { return m_windowSizer; } // Track if this window is a member of a sizer void SetContainingSizer(wxSizer* sizer); wxSizer *GetContainingSizer() const { return m_containingSizer; } // accessibility // ---------------------- #if wxUSE_ACCESSIBILITY // Override to create a specific accessible object. virtual wxAccessible* CreateAccessible(); // Sets the accessible object. void SetAccessible(wxAccessible* accessible) ; // Returns the accessible object. wxAccessible* GetAccessible() { return m_accessible; } // Returns the accessible object, creating if necessary. wxAccessible* GetOrCreateAccessible() ; #endif // Set window transparency if the platform supports it virtual bool SetTransparent(wxByte WXUNUSED(alpha)) { return false; } virtual bool CanSetTransparent() { return false; } // implementation // -------------- // event handlers void OnSysColourChanged( wxSysColourChangedEvent& event ); void OnInitDialog( wxInitDialogEvent &event ); void OnMiddleClick( wxMouseEvent& event ); #if wxUSE_HELP void OnHelp(wxHelpEvent& event); #endif // wxUSE_HELP // virtual function for implementing internal idle // behaviour virtual void OnInternalIdle(); // Send idle event to window and all subwindows // Returns true if more idle time is requested. virtual bool SendIdleEvents(wxIdleEvent& event); // get the handle of the window for the underlying window system: this // is only used for wxWin itself or for user code which wants to call // platform-specific APIs virtual WXWidget GetHandle() const = 0; // associate the window with a new native handle virtual void AssociateHandle(WXWidget WXUNUSED(handle)) { } // dissociate the current native handle from the window virtual void DissociateHandle() { } #if wxUSE_PALETTE // Store the palette used by DCs in wxWindow so that the dcs can share // a palette. And we can respond to palette messages. wxPalette GetPalette() const { return m_palette; } // When palette is changed tell the DC to set the system palette to the // new one. void SetPalette(const wxPalette& pal); // return true if we have a specific palette bool HasCustomPalette() const { return m_hasCustomPalette; } // return the first parent window with a custom palette or NULL wxWindow *GetAncestorWithCustomPalette() const; #endif // wxUSE_PALETTE // inherit the parents visual attributes if they had been explicitly set // by the user (i.e. we don't inherit default attributes) and if we don't // have our own explicitly set virtual void InheritAttributes(); // returns false from here if this window doesn't want to inherit the // parents colours even if InheritAttributes() would normally do it // // this just provides a simple way to customize InheritAttributes() // behaviour in the most common case virtual bool ShouldInheritColours() const { return false; } // returns true if the window can be positioned outside of parent's client // area (normal windows can't, but e.g. menubar or statusbar can): virtual bool CanBeOutsideClientArea() const { return false; } // returns true if the platform should explicitly apply a theme border. Currently // used only by Windows virtual bool CanApplyThemeBorder() const { return true; } // returns the main window of composite control; this is the window // that FindFocus returns if the focus is in one of composite control's // windows virtual wxWindow *GetMainWindowOfCompositeControl() { return (wxWindow*)this; } // If this function returns true, keyboard navigation events shouldn't // escape from it. A typical example of such "navigation domain" is a top // level window because pressing TAB in one of them must not transfer focus // to a different top level window. But it's not limited to them, e.g. MDI // children frames are not top level windows (and their IsTopLevel() // returns false) but still are self-contained navigation domains as well. virtual bool IsTopNavigationDomain() const { return false; } protected: // helper for the derived class Create() methods: the first overload, with // validator parameter, should be used for child windows while the second // one is used for top level ones bool CreateBase(wxWindowBase *parent, wxWindowID winid, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPanelNameStr); bool CreateBase(wxWindowBase *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long style, const wxString& name); // event handling specific to wxWindow virtual bool TryBefore(wxEvent& event); virtual bool TryAfter(wxEvent& event); enum WindowOrder { OrderBefore, // insert before the given window OrderAfter // insert after the given window }; // common part of GetPrev/NextSibling() wxWindow *DoGetSibling(WindowOrder order) const; // common part of MoveBefore/AfterInTabOrder() virtual void DoMoveInTabOrder(wxWindow *win, WindowOrder move); // implementation of Navigate() and NavigateIn() virtual bool DoNavigateIn(int flags); #if wxUSE_CONSTRAINTS // satisfy the constraints for the windows but don't set the window sizes void SatisfyConstraints(); #endif // wxUSE_CONSTRAINTS // Send the wxWindowDestroyEvent if not done yet and sets m_isBeingDeleted // to true void SendDestroyEvent(); // this method should be implemented to use operating system specific code // to really enable/disable the widget, it will only be called when we // really need to enable/disable window and so no additional checks on the // widgets state are necessary virtual void DoEnable(bool WXUNUSED(enable)) { } // the window id - a number which uniquely identifies a window among // its siblings unless it is wxID_ANY wxWindowIDRef m_windowId; // the parent window of this window (or NULL) and the list of the children // of this window wxWindow *m_parent; wxWindowList m_children; // the minimal allowed size for the window (no minimal size if variable(s) // contain(s) wxDefaultCoord) int m_minWidth, m_minHeight, m_maxWidth, m_maxHeight; // event handler for this window: usually is just 'this' but may be // changed with SetEventHandler() wxEvtHandler *m_eventHandler; #if wxUSE_VALIDATORS // associated validator or NULL if none wxValidator *m_windowValidator; #endif // wxUSE_VALIDATORS #if wxUSE_DRAG_AND_DROP wxDropTarget *m_dropTarget; #endif // wxUSE_DRAG_AND_DROP // visual window attributes wxCursor m_cursor; wxFont m_font; // see m_hasFont wxColour m_backgroundColour, // m_hasBgCol m_foregroundColour; // m_hasFgCol #if wxUSE_CARET wxCaret *m_caret; #endif // wxUSE_CARET // the region which should be repainted in response to paint event wxRegion m_updateRegion; #if wxUSE_ACCEL // the accelerator table for the window which translates key strokes into // command events wxAcceleratorTable m_acceleratorTable; #endif // wxUSE_ACCEL // the tooltip for this window (may be NULL) #if wxUSE_TOOLTIPS wxToolTip *m_tooltip; #endif // wxUSE_TOOLTIPS // constraints and sizers #if wxUSE_CONSTRAINTS // the constraints for this window or NULL wxLayoutConstraints *m_constraints; // constraints this window is involved in wxWindowList *m_constraintsInvolvedIn; #endif // wxUSE_CONSTRAINTS // this window's sizer wxSizer *m_windowSizer; // The sizer this window is a member of, if any wxSizer *m_containingSizer; // Layout() window automatically when its size changes? bool m_autoLayout:1; // window state bool m_isShown:1; bool m_isEnabled:1; bool m_isBeingDeleted:1; // was the window colours/font explicitly changed by user? bool m_hasBgCol:1; bool m_hasFgCol:1; bool m_hasFont:1; // and should it be inherited by children? bool m_inheritBgCol:1; bool m_inheritFgCol:1; bool m_inheritFont:1; // window attributes long m_windowStyle, m_exStyle; wxString m_windowName; bool m_themeEnabled; wxBackgroundStyle m_backgroundStyle; #if wxUSE_PALETTE wxPalette m_palette; bool m_hasCustomPalette; #endif // wxUSE_PALETTE #if wxUSE_ACCESSIBILITY wxAccessible* m_accessible; #endif // Virtual size (scrolling) wxSize m_virtualSize; wxScrollHelper *m_scrollHelper; wxWindowVariant m_windowVariant ; // override this to change the default (i.e. used when no style is // specified) border for the window class virtual wxBorder GetDefaultBorder() const; // this allows you to implement standard control borders without // repeating the code in different classes that are not derived from // wxControl virtual wxBorder GetDefaultBorderForControl() const { return wxBORDER_THEME; } // Get the default size for the new window if no explicit size given. TLWs // have their own default size so this is just for non top-level windows. static int WidthDefault(int w) { return w == wxDefaultCoord ? 20 : w; } static int HeightDefault(int h) { return h == wxDefaultCoord ? 20 : h; } // Used to save the results of DoGetBestSize so it doesn't need to be // recalculated each time the value is needed. wxSize m_bestSizeCache; wxDEPRECATED_MSG("use SetInitialSize() instead.") void SetBestSize(const wxSize& size); wxDEPRECATED_MSG("use SetInitialSize() instead.") virtual void SetInitialBestSize(const wxSize& size); // more pure virtual functions // --------------------------- // NB: we must have DoSomething() function when Something() is an overloaded // method: indeed, we can't just have "virtual Something()" in case when // the function is overloaded because then we'd have to make virtual all // the variants (otherwise only the virtual function may be called on a // pointer to derived class according to C++ rules) which is, in // general, absolutely not needed. So instead we implement all // overloaded Something()s in terms of DoSomething() which will be the // only one to be virtual. // text extent virtual void DoGetTextExtent(const wxString& string, int *x, int *y, int *descent = NULL, int *externalLeading = NULL, const wxFont *font = NULL) const = 0; // coordinates translation virtual void DoClientToScreen( int *x, int *y ) const = 0; virtual void DoScreenToClient( int *x, int *y ) const = 0; virtual wxHitTest DoHitTest(wxCoord x, wxCoord y) const; // capture/release the mouse, used by Capture/ReleaseMouse() virtual void DoCaptureMouse() = 0; virtual void DoReleaseMouse() = 0; // retrieve the position/size of the window virtual void DoGetPosition(int *x, int *y) const = 0; virtual void DoGetScreenPosition(int *x, int *y) const; virtual void DoGetSize(int *width, int *height) const = 0; virtual void DoGetClientSize(int *width, int *height) const = 0; // get the size which best suits the window: for a control, it would be // the minimal size which doesn't truncate the control, for a panel - the // same size as it would have after a call to Fit() virtual wxSize DoGetBestSize() const; // this method can be overridden instead of DoGetBestSize() if it computes // the best size of the client area of the window only, excluding borders // (GetBorderSize() will be used to add them) virtual wxSize DoGetBestClientSize() const { return wxDefaultSize; } // These two methods can be overridden to implement intelligent // width-for-height and/or height-for-width best size determination for the // window. By default the fixed best size is used. virtual int DoGetBestClientHeight(int WXUNUSED(width)) const { return wxDefaultCoord; } virtual int DoGetBestClientWidth(int WXUNUSED(height)) const { return wxDefaultCoord; } // this is the virtual function to be overridden in any derived class which // wants to change how SetSize() or Move() works - it is called by all // versions of these functions in the base class virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO) = 0; // same as DoSetSize() for the client size virtual void DoSetClientSize(int width, int height) = 0; virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH ); // return the total size of the window borders, i.e. the sum of the widths // of the left and the right border in the x component of the returned size // and the sum of the heights of the top and bottom borders in the y one // // NB: this is currently only implemented properly for wxMSW, wxGTK and // wxUniv and doesn't behave correctly in the presence of scrollbars in // the other ports virtual wxSize DoGetBorderSize() const; // move the window to the specified location and resize it: this is called // from both DoSetSize() and DoSetClientSize() and would usually just // reposition this window except for composite controls which will want to // arrange themselves inside the given rectangle // // Important note: the coordinates passed to this method are in parent's // *window* coordinates and not parent's client coordinates (as the values // passed to DoSetSize and returned by DoGetPosition are)! virtual void DoMoveWindow(int x, int y, int width, int height) = 0; // centre the window in the specified direction on parent, note that // wxCENTRE_ON_SCREEN shouldn't be specified here, it only makes sense for // TLWs virtual void DoCentre(int dir); #if wxUSE_TOOLTIPS virtual void DoSetToolTip( wxToolTip *tip ); #endif // wxUSE_TOOLTIPS #if wxUSE_MENUS virtual bool DoPopupMenu(wxMenu *menu, int x, int y) = 0; #endif // wxUSE_MENUS // Makes an adjustment to the window position to make it relative to the // parents client area, e.g. if the parent is a frame with a toolbar, its // (0, 0) is just below the toolbar virtual void AdjustForParentClientOrigin(int& x, int& y, int sizeFlags = 0) const; // implements the window variants virtual void DoSetWindowVariant( wxWindowVariant variant ) ; // really freeze/thaw the window (should have port-specific implementation) virtual void DoFreeze() { } virtual void DoThaw() { } // Must be called when mouse capture is lost to send // wxMouseCaptureLostEvent to windows on capture stack. static void NotifyCaptureLost(); private: // recursively call our own and our children DoEnable() when the // enabled/disabled status changed because a parent window had been // enabled/disabled void NotifyWindowOnEnableChange(bool enabled); #if wxUSE_MENUS // temporary event handlers used by GetPopupMenuSelectionFromUser() void InternalOnPopupMenu(wxCommandEvent& event); void InternalOnPopupMenuUpdate(wxUpdateUIEvent& event); // implementation of the public GetPopupMenuSelectionFromUser() method int DoGetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y); #endif // wxUSE_MENUS // layout the window children when its size changes unless this was // explicitly disabled with SetAutoLayout(false) void InternalOnSize(wxSizeEvent& event); // base for dialog unit conversion, i.e. average character size wxSize GetDlgUnitBase() const; // number of Freeze() calls minus the number of Thaw() calls: we're frozen // (i.e. not being updated) if it is positive unsigned int m_freezeCount; DECLARE_ABSTRACT_CLASS(wxWindowBase) wxDECLARE_NO_COPY_CLASS(wxWindowBase); DECLARE_EVENT_TABLE() }; // Inlines for some deprecated methods inline wxSize wxWindowBase::GetBestFittingSize() const { return GetEffectiveMinSize(); } inline void wxWindowBase::SetBestFittingSize(const wxSize& size) { SetInitialSize(size); } inline void wxWindowBase::SetBestSize(const wxSize& size) { SetInitialSize(size); } inline void wxWindowBase::SetInitialBestSize(const wxSize& size) { SetInitialSize(size); } // ---------------------------------------------------------------------------- // now include the declaration of wxWindow class // ---------------------------------------------------------------------------- // include the declaration of the platform-specific class #if defined(__WXMSW__) #ifdef __WXUNIVERSAL__ #define wxWindowNative wxWindowMSW #else // !wxUniv #define wxWindowMSW wxWindow #endif // wxUniv/!wxUniv #include "wx/msw/window.h" #elif defined(__WXMOTIF__) #include "wx/motif/window.h" #elif defined(__WXGTK20__) #ifdef __WXUNIVERSAL__ #define wxWindowNative wxWindowGTK #else // !wxUniv #define wxWindowGTK wxWindow #endif // wxUniv #include "wx/gtk/window.h" #elif defined(__WXGTK__) #ifdef __WXUNIVERSAL__ #define wxWindowNative wxWindowGTK #else // !wxUniv #define wxWindowGTK wxWindow #endif // wxUniv #include "wx/gtk1/window.h" #elif defined(__WXX11__) #ifdef __WXUNIVERSAL__ #define wxWindowNative wxWindowX11 #else // !wxUniv #define wxWindowX11 wxWindow #endif // wxUniv #include "wx/x11/window.h" #elif defined(__WXDFB__) #define wxWindowNative wxWindowDFB #include "wx/dfb/window.h" #elif defined(__WXMAC__) #ifdef __WXUNIVERSAL__ #define wxWindowNative wxWindowMac #else // !wxUniv #define wxWindowMac wxWindow #endif // wxUniv #include "wx/osx/window.h" #elif defined(__WXCOCOA__) #ifdef __WXUNIVERSAL__ #define wxWindowNative wxWindowCocoa #else // !wxUniv #define wxWindowCocoa wxWindow #endif // wxUniv #include "wx/cocoa/window.h" #elif defined(__WXPM__) #ifdef __WXUNIVERSAL__ #define wxWindowNative wxWindowOS2 #else // !wxUniv #define wxWindowOS2 wxWindow #endif // wxUniv/!wxUniv #include "wx/os2/window.h" #endif // for wxUniversal, we now derive the real wxWindow from wxWindow<platform>, // for the native ports we already have defined it above #if defined(__WXUNIVERSAL__) #ifndef wxWindowNative #error "wxWindowNative must be defined above!" #endif #include "wx/univ/window.h" #endif // wxUniv // ---------------------------------------------------------------------------- // inline functions which couldn't be declared in the class body because of // forward dependencies // ---------------------------------------------------------------------------- inline wxWindow *wxWindowBase::GetGrandParent() const { return m_parent ? m_parent->GetParent() : NULL; } // ---------------------------------------------------------------------------- // global functions // ---------------------------------------------------------------------------- // Find the wxWindow at the current mouse position, also returning the mouse // position. extern WXDLLIMPEXP_CORE wxWindow* wxFindWindowAtPointer(wxPoint& pt); // Get the current mouse position. extern WXDLLIMPEXP_CORE wxPoint wxGetMousePosition(); // get the currently active window of this application or NULL extern WXDLLIMPEXP_CORE wxWindow *wxGetActiveWindow(); // get the (first) top level parent window WXDLLIMPEXP_CORE wxWindow* wxGetTopLevelParent(wxWindow *win); #if WXWIN_COMPATIBILITY_2_6 wxDEPRECATED_MSG("use wxWindow::NewControlId() instead") inline wxWindowID NewControlId() { return wxWindowBase::NewControlId(); } #endif // WXWIN_COMPATIBILITY_2_6 #if wxUSE_ACCESSIBILITY // ---------------------------------------------------------------------------- // accessible object for windows // ---------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxWindowAccessible: public wxAccessible { public: wxWindowAccessible(wxWindow* win): wxAccessible(win) { if (win) win->SetAccessible(this); } virtual ~wxWindowAccessible() {} // Overridables // Can return either a child object, or an integer // representing the child element, starting from 1. virtual wxAccStatus HitTest(const wxPoint& pt, int* childId, wxAccessible** childObject); // Returns the rectangle for this object (id = 0) or a child element (id > 0). virtual wxAccStatus GetLocation(wxRect& rect, int elementId); // Navigates from fromId to toId/toObject. virtual wxAccStatus Navigate(wxNavDir navDir, int fromId, int* toId, wxAccessible** toObject); // Gets the name of the specified object. virtual wxAccStatus GetName(int childId, wxString* name); // Gets the number of children. virtual wxAccStatus GetChildCount(int* childCount); // Gets the specified child (starting from 1). // If *child is NULL and return value is wxACC_OK, // this means that the child is a simple element and // not an accessible object. virtual wxAccStatus GetChild(int childId, wxAccessible** child); // Gets the parent, or NULL. virtual wxAccStatus GetParent(wxAccessible** parent); // Performs the default action. childId is 0 (the action for this object) // or > 0 (the action for a child). // Return wxACC_NOT_SUPPORTED if there is no default action for this // window (e.g. an edit control). virtual wxAccStatus DoDefaultAction(int childId); // Gets the default action for this object (0) or > 0 (the action for a child). // Return wxACC_OK even if there is no action. actionName is the action, or the empty // string if there is no action. // The retrieved string describes the action that is performed on an object, // not what the object does as a result. For example, a toolbar button that prints // a document has a default action of "Press" rather than "Prints the current document." virtual wxAccStatus GetDefaultAction(int childId, wxString* actionName); // Returns the description for this object or a child. virtual wxAccStatus GetDescription(int childId, wxString* description); // Returns help text for this object or a child, similar to tooltip text. virtual wxAccStatus GetHelpText(int childId, wxString* helpText); // Returns the keyboard shortcut for this object or child. // Return e.g. ALT+K virtual wxAccStatus GetKeyboardShortcut(int childId, wxString* shortcut); // Returns a role constant. virtual wxAccStatus GetRole(int childId, wxAccRole* role); // Returns a state constant. virtual wxAccStatus GetState(int childId, long* state); // Returns a localized string representing the value for the object // or child. virtual wxAccStatus GetValue(int childId, wxString* strValue); // Selects the object or child. virtual wxAccStatus Select(int childId, wxAccSelectionFlags selectFlags); // Gets the window with the keyboard focus. // If childId is 0 and child is NULL, no object in // this subhierarchy has the focus. // If this object has the focus, child should be 'this'. virtual wxAccStatus GetFocus(int* childId, wxAccessible** child); #if wxUSE_VARIANT // Gets a variant representing the selected children // of this object. // Acceptable values: // - a null variant (IsNull() returns true) // - a list variant (GetType() == wxT("list") // - an integer representing the selected child element, // or 0 if this object is selected (GetType() == wxT("long") // - a "void*" pointer to a wxAccessible child object virtual wxAccStatus GetSelections(wxVariant* selections); #endif // wxUSE_VARIANT }; #endif // wxUSE_ACCESSIBILITY #endif // _WX_WINDOW_H_BASE_
The Bank of England’s latest Quarterly Inflation report saw sterling push higher as Carney and the other members of the MPC amended forward guidance. So, with the Bank of England unable to meaningfully target unemployment for interest rate increases, it seems that “forward guidance” is now closer to “forward suggestion.” The plan remains in that rates will be kept low after the unemployment threshold has been hit – much like the Federal Reserve’s forward guidance has changed in the past few months as it has become clear that job increases have come on quicker than had been expected. The argument for not putting a de facto target in sand is obvious; just as much as they have met this 7.0% unemployment threshold in double-quick time that is not to say that another threshold would be met within the MPC’s timeframe. Unfortunately the inherent lack of a target with the Bank’s revised plans now leads to a different question; how are everyone from City economists to households and businesses expected to interpret this? Increased communications from the Bank of England will be the key. Carney is relying on the soft sell. This report also included some bullish news; the Bank of England is forecasting that the UK economy will grow at 3.4% in 2014. This figure is 0.6% higher than had been forecast in November and is double forecasts for German growth for the same period. 2015’s growth estimate has also been revised higher – from 2.3% to 2.7%. As a reminder, growth in the UK through 2013 has been initially estimated at 1.9%. The inflation picture is interesting however with CPI seen below target in 3yrs time; something that the Bank could lean on in the short term so as to guarantee lower rate expectations. The Bank of England is an inflation targeting body after all, despite all the bells and whistles of guidance. The recent strength of the pound will have helped that. Sterling is 10% higher on a trade weighted basis since last March, and while this will keep pressure on UK export focused companies, should allow inflation to be kept low, balanced recovery be damned. The overall picture is one of a recovery but a recovery that in the words of the Bank of England Governor ‘isn’t balanced or sustainable’ – growth is very contingent on consumption and housing spending this year. While that happens however, rates are not going anywhere anytime soon. Sterling moved higher across the board through the day while the yield on the 10yr gilt rose to 2.8189%, the highest since the Central Bank of the Republic of Turkey hiked rates amid the emerging market wobble in late Jan. Eurozone news took the single currency lower yesterday morning as another indicator disappointed. Industrial production fell by 0.7% in December against a -0.3% expected fall and, although we saw growth of 0.5% compared to this time last year, the momentum of any recovery may have disappeared. Comments from an ECB member also wobbled the single currency a tad. Benoit Coeure, the Bank of France Governor, said in a speech yesterday that the ECB is seriously considering a negative deposit rate at its next meeting. Coeure also commented on the German constitutional court’s decision to refer the legality of the ECB’s OMT decision to the European Courts of Justice by saying that “the status of the OMT is not changed. It is ready to be used but it is highly unlikely it would have to be used at the moment”. Euro volatility could be seen today in response to a meeting between Italian PM Letta and a challenger from his own party, Matteo Renzi. A vote of no confidence in the Letta government would throw Italian bonds back into the spotlight following months of mediocre economic expansion. The meeting takes place at 14.00 GMT. German inflation this morning has come out as expected, down by 0.6% on the month but 1.3% higher compared to this time last year. Today will be dominated by US retail sales at 13.30 GMT with the market looking for limited growth following a strong December. Of course, there is a lot to be said for the resistance of the retail sector but the polar vortex weather could have easily seen people stay indoors. Yellen also speaks again, this time in front of the Senate, but we expect limited vol from that.
<?php namespace App\System\Runtime; class Node { private $object; public function write($obj){ $this->setObject($obj); } /** * @return mixed */ public function getObject() { return $this->getObject(); } /** * @param mixed $object */ public function setObject($object) { $this->object = $object; } }
Wow, it’s so delightful and refreshing! I believe this is a Star magnolia. We have one at home in Ontario but it will not be out yet. When we get home in mid April I shall expect to see it start to bloom. I love them thanks for sharing this lovely photo. I’d believe you are that far behind us in warm weather. Thanks Anne. Amazing as usual, nice work to see Cee. Wow. Absolutely sunning. So expressive, like it is conducting a choir.
The executive committee is always looking for great new ideas and suggestions from our members. Please use our “open door” policy to make comments and suggestions for where you’d like the group to head. We are always looking for new committee members to help us plan and execute our events.
using System; using System.Collections.Generic; using System.Text; namespace KMLib.Abstract { public abstract class ATimePrimitive : AObject { } }
One of the key ambitions of the VN Futures project is to address the lack of career prospects and progression available to veterinary nurses, and work carried out by the Post-Registration Development Group arm of the VN Futures working parties has looked at how different career and qualification paths could be opened up for veterinary nurses. The proposed post-qualification framework outlined within the survey is the culmination of its work so far, and the project invites input from the profession. I have witnessed mixed reflection on this so far – both from friends and colleagues, and via social media. The veterinary nursing profession is at a difficult stage – we want to progress, we want to be better utilised and be offered a higher level of responsibility and autonomy – but will a post-graduate qualification help to achieve this, or is it just another exercise to further educate nurses who will still not see their skills used effectively in practice? Of course it is a positive thing that this is even been addressed and that projects such as VN Futures are investing time and resource into how we can move forward as a profession. Maybe though, we should be looking at the fundamentals first. The results of the Schedule 3 survey demonstrated – both on the part of vets and nurses – a staggering lack of understanding of the tasks that can be delegated to veterinary nurses. Do we need to be clear in the profession about what nurses ‘can’ and ‘can’t’ do under the current legislation, and offer nurses roles which actually allow them to perform this work, before moving forward with post-registration qualification? Besides Schedule 3, there are also many ‘nursing’ activities that so many nurses don’t get to perform in everyday practice. Hopefully over the coming weeks or months we will hear about work that will be carried out to help answer some of the shortfalls in understanding of Schedule 3, and in fact the RCVS have already shared some useful case studies, which you can access here. Then there’s the old battle of protection of the title ‘Veterinary Nurse’, progress of which seems to have stalled. We keep coming back to a review of the Veterinary Surgeon’s Act (yes, it is a FIFTY TWO year old piece of legislation) and my opinion is that we should consider having secondary legislation to this that specifically addresses veterinary nursing. Anyway, I’ve gone off piste I think. Development of advanced veterinary nurse practitioners was one of the topics I raised during a recent talk on ‘The Future of VN Consulting’, and many may feel that this is the only route that will provide the progression for vet nurses that is so desired. Will the framework suggested provide a route to this level of more autonomous nursing, or is advanced practitioner nursing a step too far for us at this stage of our profession? I am going to set myself aside some time to complete the survey over the next few days, and I hope you do too. It’s so important, at this pivotal stage of veterinary nursing, that our opinions are heard, and that can only happen if we contribute to such requests for feedback. To read the news story on the RCVS site, and access the survey, visit their website here.
/* ldb database library Copyright (C) Simo Sorce 2005-2008 Copyright (C) Andrew Bartlett <[email protected]> 2007-2008 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. 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. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * Name: ldb * * Component: ldb extended dn control module * * Description: this module interprets DNs of the form <SID=S-1-2-4456> into normal DNs. * * Authors: Simo Sorce * Andrew Bartlett */ #include "includes.h" #include <ldb.h> #include <ldb_errors.h> #include <ldb_module.h> #include "dsdb/samdb/samdb.h" #include "dsdb/samdb/ldb_modules/util.h" /* TODO: if relax is not set then we need to reject the fancy RMD_* and DELETED extended DN codes */ /* search */ struct extended_search_context { struct ldb_module *module; struct ldb_request *req; struct ldb_dn *basedn; struct ldb_dn *dn; char *wellknown_object; int extended_type; }; static const char *wkattr[] = { "wellKnownObjects", "otherWellKnownObjects", NULL }; static const struct ldb_module_ops ldb_extended_dn_in_openldap_module_ops; /* An extra layer of indirection because LDB does not allow the original request to be altered */ static int extended_final_callback(struct ldb_request *req, struct ldb_reply *ares) { int ret = LDB_ERR_OPERATIONS_ERROR; struct extended_search_context *ac; ac = talloc_get_type(req->context, struct extended_search_context); if (ares->error != LDB_SUCCESS) { ret = ldb_module_done(ac->req, ares->controls, ares->response, ares->error); } else { switch (ares->type) { case LDB_REPLY_ENTRY: ret = ldb_module_send_entry(ac->req, ares->message, ares->controls); break; case LDB_REPLY_REFERRAL: ret = ldb_module_send_referral(ac->req, ares->referral); break; case LDB_REPLY_DONE: ret = ldb_module_done(ac->req, ares->controls, ares->response, ares->error); break; } } return ret; } static int extended_base_callback(struct ldb_request *req, struct ldb_reply *ares) { struct extended_search_context *ac; struct ldb_request *down_req; struct ldb_message_element *el; int ret; unsigned int i, j; size_t wkn_len = 0; char *valstr = NULL; const char *found = NULL; ac = talloc_get_type(req->context, struct extended_search_context); if (!ares) { return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } if (ares->error != LDB_SUCCESS) { return ldb_module_done(ac->req, ares->controls, ares->response, ares->error); } switch (ares->type) { case LDB_REPLY_ENTRY: if (ac->basedn) { /* we have more than one match! This can happen as S-1-5-17 appears twice in a normal provision. We need to return NO_SUCH_OBJECT */ const char *str = talloc_asprintf(req, "Duplicate base-DN matches found for '%s'", ldb_dn_get_extended_linearized(req, ac->dn, 1)); ldb_set_errstring(ldb_module_get_ctx(ac->module), str); return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_NO_SUCH_OBJECT); } if (!ac->wellknown_object) { ac->basedn = talloc_steal(ac, ares->message->dn); break; } wkn_len = strlen(ac->wellknown_object); for (j=0; wkattr[j]; j++) { el = ldb_msg_find_element(ares->message, wkattr[j]); if (!el) { ac->basedn = NULL; continue; } for (i=0; i < el->num_values; i++) { valstr = talloc_strndup(ac, (const char *)el->values[i].data, el->values[i].length); if (!valstr) { ldb_oom(ldb_module_get_ctx(ac->module)); return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } if (strncasecmp(valstr, ac->wellknown_object, wkn_len) != 0) { talloc_free(valstr); continue; } found = &valstr[wkn_len]; break; } if (found) { break; } } if (!found) { break; } ac->basedn = ldb_dn_new(ac, ldb_module_get_ctx(ac->module), found); talloc_free(valstr); if (!ac->basedn) { ldb_oom(ldb_module_get_ctx(ac->module)); return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } break; case LDB_REPLY_REFERRAL: break; case LDB_REPLY_DONE: if (!ac->basedn) { const char *str = talloc_asprintf(req, "Base-DN '%s' not found", ldb_dn_get_extended_linearized(req, ac->dn, 1)); ldb_set_errstring(ldb_module_get_ctx(ac->module), str); return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_NO_SUCH_OBJECT); } switch (ac->req->operation) { case LDB_SEARCH: ret = ldb_build_search_req_ex(&down_req, ldb_module_get_ctx(ac->module), ac->req, ac->basedn, ac->req->op.search.scope, ac->req->op.search.tree, ac->req->op.search.attrs, ac->req->controls, ac, extended_final_callback, ac->req); LDB_REQ_SET_LOCATION(down_req); break; case LDB_ADD: { struct ldb_message *add_msg = ldb_msg_copy_shallow(ac, ac->req->op.add.message); if (!add_msg) { ldb_oom(ldb_module_get_ctx(ac->module)); return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } add_msg->dn = ac->basedn; ret = ldb_build_add_req(&down_req, ldb_module_get_ctx(ac->module), ac->req, add_msg, ac->req->controls, ac, extended_final_callback, ac->req); LDB_REQ_SET_LOCATION(down_req); break; } case LDB_MODIFY: { struct ldb_message *mod_msg = ldb_msg_copy_shallow(ac, ac->req->op.mod.message); if (!mod_msg) { ldb_oom(ldb_module_get_ctx(ac->module)); return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } mod_msg->dn = ac->basedn; ret = ldb_build_mod_req(&down_req, ldb_module_get_ctx(ac->module), ac->req, mod_msg, ac->req->controls, ac, extended_final_callback, ac->req); LDB_REQ_SET_LOCATION(down_req); break; } case LDB_DELETE: ret = ldb_build_del_req(&down_req, ldb_module_get_ctx(ac->module), ac->req, ac->basedn, ac->req->controls, ac, extended_final_callback, ac->req); LDB_REQ_SET_LOCATION(down_req); break; case LDB_RENAME: ret = ldb_build_rename_req(&down_req, ldb_module_get_ctx(ac->module), ac->req, ac->basedn, ac->req->op.rename.newdn, ac->req->controls, ac, extended_final_callback, ac->req); LDB_REQ_SET_LOCATION(down_req); break; default: return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } if (ret != LDB_SUCCESS) { return ldb_module_done(ac->req, NULL, NULL, ret); } return ldb_next_request(ac->module, down_req); } talloc_free(ares); return LDB_SUCCESS; } /* windows ldap searchs don't allow a baseDN with more than one extended component, or an extended component and a string DN We only enforce this over ldap, not for internal use, as there are just too many places where we internally want to use a DN that has come from a search with extended DN enabled, or comes from a DRS naming context. Enforcing this would also make debugging samba much harder, as we'd need to use ldb_dn_minimise() in a lot of places, and that would lose the DN string which is so useful for working out what a request is for */ static bool ldb_dn_match_allowed(struct ldb_dn *dn, struct ldb_request *req) { int num_components = ldb_dn_get_comp_num(dn); int num_ex_components = ldb_dn_get_extended_comp_num(dn); if (num_ex_components == 0) { return true; } if ((num_components != 0 || num_ex_components != 1) && ldb_req_is_untrusted(req)) { return false; } return true; } struct extended_dn_filter_ctx { bool test_only; bool matched; struct ldb_module *module; struct ldb_request *req; struct dsdb_schema *schema; }; /* create a always non-matching node from a equality node */ static void set_parse_tree_false(struct ldb_parse_tree *tree) { const char *attr = tree->u.equality.attr; struct ldb_val value = tree->u.equality.value; tree->operation = LDB_OP_EXTENDED; tree->u.extended.attr = attr; tree->u.extended.value = value; tree->u.extended.rule_id = SAMBA_LDAP_MATCH_ALWAYS_FALSE; tree->u.extended.dnAttributes = 0; } /* called on all nodes in the parse tree */ static int extended_dn_filter_callback(struct ldb_parse_tree *tree, void *private_context) { struct extended_dn_filter_ctx *filter_ctx; int ret; struct ldb_dn *dn; const struct ldb_val *sid_val, *guid_val; const char *no_attrs[] = { NULL }; struct ldb_result *res; const struct dsdb_attribute *attribute; bool has_extended_component; enum ldb_scope scope; struct ldb_dn *base_dn; const char *expression; uint32_t dsdb_flags; if (tree->operation != LDB_OP_EQUALITY) { return LDB_SUCCESS; } filter_ctx = talloc_get_type_abort(private_context, struct extended_dn_filter_ctx); if (filter_ctx->test_only && filter_ctx->matched) { /* the tree already matched */ return LDB_SUCCESS; } if (!filter_ctx->schema) { /* Schema not setup yet */ return LDB_SUCCESS; } attribute = dsdb_attribute_by_lDAPDisplayName(filter_ctx->schema, tree->u.equality.attr); if (attribute == NULL) { return LDB_SUCCESS; } if (attribute->dn_format != DSDB_NORMAL_DN) { return LDB_SUCCESS; } has_extended_component = (memchr(tree->u.equality.value.data, '<', tree->u.equality.value.length) != NULL); /* * Don't turn it into an extended DN if we're talking to OpenLDAP. * We just check the module_ops pointer instead of adding a private * pointer and a boolean to tell us the exact same thing. */ if (!has_extended_component) { if (!attribute->one_way_link || ldb_module_get_ops(filter_ctx->module) == &ldb_extended_dn_in_openldap_module_ops) return LDB_SUCCESS; } dn = ldb_dn_from_ldb_val(filter_ctx, ldb_module_get_ctx(filter_ctx->module), &tree->u.equality.value); if (dn == NULL) { /* testing against windows shows that we don't raise an error here */ return LDB_SUCCESS; } guid_val = ldb_dn_get_extended_component(dn, "GUID"); sid_val = ldb_dn_get_extended_component(dn, "SID"); if (!guid_val && !sid_val && (attribute->searchFlags & SEARCH_FLAG_ATTINDEX)) { /* if it is indexed, then fixing the string DN will do no good here, as we will not find the attribute in the index. So for now fall through to a standard DN component comparison */ return LDB_SUCCESS; } if (filter_ctx->test_only) { /* we need to copy the tree */ filter_ctx->matched = true; return LDB_SUCCESS; } if (!ldb_dn_match_allowed(dn, filter_ctx->req)) { /* we need to make this element of the filter always be false */ set_parse_tree_false(tree); return LDB_SUCCESS; } dsdb_flags = DSDB_FLAG_NEXT_MODULE | DSDB_FLAG_AS_SYSTEM | DSDB_SEARCH_SHOW_RECYCLED | DSDB_SEARCH_SHOW_EXTENDED_DN; if (guid_val) { expression = talloc_asprintf(filter_ctx, "objectGUID=%s", ldb_binary_encode(filter_ctx, *guid_val)); scope = LDB_SCOPE_SUBTREE; base_dn = NULL; dsdb_flags |= DSDB_SEARCH_SEARCH_ALL_PARTITIONS; } else if (sid_val) { expression = talloc_asprintf(filter_ctx, "objectSID=%s", ldb_binary_encode(filter_ctx, *sid_val)); scope = LDB_SCOPE_SUBTREE; base_dn = NULL; dsdb_flags |= DSDB_SEARCH_SEARCH_ALL_PARTITIONS; } else { /* fallback to searching using the string DN as the base DN */ expression = "objectClass=*"; base_dn = dn; scope = LDB_SCOPE_BASE; } ret = dsdb_module_search(filter_ctx->module, filter_ctx, &res, base_dn, scope, no_attrs, dsdb_flags, filter_ctx->req, "%s", expression); if (scope == LDB_SCOPE_BASE && ret == LDB_ERR_NO_SUCH_OBJECT) { /* note that this will need to change for multi-domain support */ set_parse_tree_false(tree); return LDB_SUCCESS; } if (ret != LDB_SUCCESS) { return LDB_SUCCESS; } if (res->count != 1) { return LDB_SUCCESS; } /* replace the search expression element with the matching DN */ tree->u.equality.value.data = (uint8_t *)talloc_strdup(tree, ldb_dn_get_extended_linearized(tree, res->msgs[0]->dn, 1)); if (tree->u.equality.value.data == NULL) { return ldb_oom(ldb_module_get_ctx(filter_ctx->module)); } tree->u.equality.value.length = strlen((const char *)tree->u.equality.value.data); talloc_free(res); filter_ctx->matched = true; return LDB_SUCCESS; } /* fix the parse tree to change any extended DN components to their caconical form */ static int extended_dn_fix_filter(struct ldb_module *module, struct ldb_request *req) { struct extended_dn_filter_ctx *filter_ctx; int ret; filter_ctx = talloc_zero(req, struct extended_dn_filter_ctx); if (filter_ctx == NULL) { return ldb_module_oom(module); } /* first pass through the existing tree to see if anything needs to be modified. Filtering DNs on the input side is rare, so this avoids copying the parse tree in most cases */ filter_ctx->test_only = true; filter_ctx->matched = false; filter_ctx->module = module; filter_ctx->req = req; filter_ctx->schema = dsdb_get_schema(ldb_module_get_ctx(module), filter_ctx); ret = ldb_parse_tree_walk(req->op.search.tree, extended_dn_filter_callback, filter_ctx); if (ret != LDB_SUCCESS) { talloc_free(filter_ctx); return ret; } if (!filter_ctx->matched) { /* nothing matched, no need for a new parse tree */ talloc_free(filter_ctx); return LDB_SUCCESS; } filter_ctx->test_only = false; filter_ctx->matched = false; req->op.search.tree = ldb_parse_tree_copy_shallow(req, req->op.search.tree); if (req->op.search.tree == NULL) { return ldb_oom(ldb_module_get_ctx(module)); } ret = ldb_parse_tree_walk(req->op.search.tree, extended_dn_filter_callback, filter_ctx); if (ret != LDB_SUCCESS) { talloc_free(filter_ctx); return ret; } talloc_free(filter_ctx); return LDB_SUCCESS; } /* fix DNs and filter expressions to cope with the semantics of extended DNs */ static int extended_dn_in_fix(struct ldb_module *module, struct ldb_request *req, struct ldb_dn *dn) { struct extended_search_context *ac; struct ldb_request *down_req; int ret; struct ldb_dn *base_dn = NULL; enum ldb_scope base_dn_scope = LDB_SCOPE_BASE; const char *base_dn_filter = NULL; const char * const *base_dn_attrs = NULL; char *wellknown_object = NULL; static const char *no_attr[] = { NULL }; bool all_partitions = false; if (req->operation == LDB_SEARCH) { ret = extended_dn_fix_filter(module, req); if (ret != LDB_SUCCESS) { return ret; } } if (!ldb_dn_has_extended(dn)) { /* Move along there isn't anything to see here */ return ldb_next_request(module, req); } else { /* It looks like we need to map the DN */ const struct ldb_val *sid_val, *guid_val, *wkguid_val; uint32_t dsdb_flags = 0; if (!ldb_dn_match_allowed(dn, req)) { return ldb_error(ldb_module_get_ctx(module), LDB_ERR_INVALID_DN_SYNTAX, "invalid number of DN components"); } sid_val = ldb_dn_get_extended_component(dn, "SID"); guid_val = ldb_dn_get_extended_component(dn, "GUID"); wkguid_val = ldb_dn_get_extended_component(dn, "WKGUID"); /* prioritise the GUID - we have had instances of duplicate SIDs in the database in the ForeignSecurityPrinciples due to provision errors */ if (guid_val) { all_partitions = true; base_dn = NULL; base_dn_filter = talloc_asprintf(req, "(objectGUID=%s)", ldb_binary_encode(req, *guid_val)); if (!base_dn_filter) { return ldb_oom(ldb_module_get_ctx(module)); } base_dn_scope = LDB_SCOPE_SUBTREE; base_dn_attrs = no_attr; } else if (sid_val) { all_partitions = true; base_dn = NULL; base_dn_filter = talloc_asprintf(req, "(objectSid=%s)", ldb_binary_encode(req, *sid_val)); if (!base_dn_filter) { return ldb_oom(ldb_module_get_ctx(module)); } base_dn_scope = LDB_SCOPE_SUBTREE; base_dn_attrs = no_attr; } else if (wkguid_val) { char *wkguid_dup; char *tail_str; char *p; wkguid_dup = talloc_strndup(req, (char *)wkguid_val->data, wkguid_val->length); p = strchr(wkguid_dup, ','); if (!p) { return ldb_error(ldb_module_get_ctx(module), LDB_ERR_INVALID_DN_SYNTAX, "Invalid WKGUID format"); } p[0] = '\0'; p++; wellknown_object = talloc_asprintf(req, "B:32:%s:", wkguid_dup); if (!wellknown_object) { return ldb_oom(ldb_module_get_ctx(module)); } tail_str = p; base_dn = ldb_dn_new(req, ldb_module_get_ctx(module), tail_str); talloc_free(wkguid_dup); if (!base_dn) { return ldb_oom(ldb_module_get_ctx(module)); } base_dn_filter = talloc_strdup(req, "(objectClass=*)"); if (!base_dn_filter) { return ldb_oom(ldb_module_get_ctx(module)); } base_dn_scope = LDB_SCOPE_BASE; base_dn_attrs = wkattr; } else { return ldb_error(ldb_module_get_ctx(module), LDB_ERR_INVALID_DN_SYNTAX, "Invalid extended DN component"); } ac = talloc_zero(req, struct extended_search_context); if (ac == NULL) { return ldb_oom(ldb_module_get_ctx(module)); } ac->module = module; ac->req = req; ac->dn = dn; ac->basedn = NULL; /* Filled in if the search finds the DN by SID/GUID etc */ ac->wellknown_object = wellknown_object; /* If the base DN was an extended DN (perhaps a well known * GUID) then search for that, so we can proceed with the original operation */ ret = ldb_build_search_req(&down_req, ldb_module_get_ctx(module), ac, base_dn, base_dn_scope, base_dn_filter, base_dn_attrs, NULL, ac, extended_base_callback, req); LDB_REQ_SET_LOCATION(down_req); if (ret != LDB_SUCCESS) { return ldb_operr(ldb_module_get_ctx(module)); } dsdb_flags = DSDB_FLAG_AS_SYSTEM | DSDB_SEARCH_SHOW_RECYCLED | DSDB_SEARCH_SHOW_EXTENDED_DN; if (all_partitions) { dsdb_flags |= DSDB_SEARCH_SEARCH_ALL_PARTITIONS; } ret = dsdb_request_add_controls(down_req, dsdb_flags); if (ret != LDB_SUCCESS) { return ret; } /* perform the search */ return ldb_next_request(module, down_req); } } static int extended_dn_in_search(struct ldb_module *module, struct ldb_request *req) { return extended_dn_in_fix(module, req, req->op.search.base); } static int extended_dn_in_modify(struct ldb_module *module, struct ldb_request *req) { return extended_dn_in_fix(module, req, req->op.mod.message->dn); } static int extended_dn_in_del(struct ldb_module *module, struct ldb_request *req) { return extended_dn_in_fix(module, req, req->op.del.dn); } static int extended_dn_in_rename(struct ldb_module *module, struct ldb_request *req) { return extended_dn_in_fix(module, req, req->op.rename.olddn); } static const struct ldb_module_ops ldb_extended_dn_in_module_ops = { .name = "extended_dn_in", .search = extended_dn_in_search, .modify = extended_dn_in_modify, .del = extended_dn_in_del, .rename = extended_dn_in_rename, }; static const struct ldb_module_ops ldb_extended_dn_in_openldap_module_ops = { .name = "extended_dn_in_openldap", .search = extended_dn_in_search, .modify = extended_dn_in_modify, .del = extended_dn_in_del, .rename = extended_dn_in_rename, }; int ldb_extended_dn_in_module_init(const char *version) { int ret; LDB_MODULE_CHECK_VERSION(version); ret = ldb_register_module(&ldb_extended_dn_in_openldap_module_ops); if (ret != LDB_SUCCESS) { return ret; } return ldb_register_module(&ldb_extended_dn_in_module_ops); }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>coq-in-coq: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.5.0~camlp4 / coq-in-coq - 8.6.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> coq-in-coq <small> 8.6.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-23 07:49:00 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-23 07:49:00 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp4 4.03+1 Camlp4 is a system for writing extensible parsers for programming languages conf-findutils 1 Virtual package relying on findutils conf-which 1 Virtual package relying on which coq 8.5.0~camlp4 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.03.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.03.0 Official 4.03.0 release ocaml-config 1 OCaml Switch Configuration ocamlbuild 0.14.0 OCamlbuild is a build system with builtin rules to easily build most OCaml projects. # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;[email protected]&quot; homepage: &quot;https://github.com/coq-contribs/coq-in-coq&quot; license: &quot;LGPL 2.1&quot; build: [make] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/CoqInCoq&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.6&quot; &amp; &lt; &quot;8.7~&quot;} ] tags: [ &quot;keyword: calculus of constructions&quot; &quot;category: Mathematics/Logic/Type theory&quot; &quot;category: Miscellaneous/Extracted Programs/Type checking unification and normalization&quot; ] authors: [ &quot;Bruno Barras&quot; ] bug-reports: &quot;https://github.com/coq-contribs/coq-in-coq/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/coq-in-coq.git&quot; synopsis: &quot;A formalisation of the Calculus of Construction&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/coq-in-coq/archive/v8.6.0.tar.gz&quot; checksum: &quot;md5=37b1cef052325be11dcff80f35424f58&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-coq-in-coq.8.6.0 coq.8.5.0~camlp4</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.5.0~camlp4). The following dependencies couldn&#39;t be met: - coq-coq-in-coq -&gt; coq &gt;= 8.6 -&gt; ocaml &gt;= 4.05.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-coq-in-coq.8.6.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
When you want a Amarillo cash advance or Amarillo payday loan, this website can be your answer. You'll find that an online cash advance loan from one of the web sites offered on this page is a fast and simple method to resolve your short term money shorfalls without it being necessary to look for a local pay day loan service in Amarillo, Texas. Why look for a local Amarillo, Texas cash advance loan, when it is so much easier and more convenient to apply for a fast cash loan on line! If you need a payday loan and don't know if you'll be able to repay it in a couple wekks, check out 100DayLoans.com. Most local lenders in Amarillo, Texas probably will not give you 100 days of freedom like you can get at 100 Day Loans. Plus it is very easy to apply online to get up to $1,000 in as little as 1 hour. It could take that long just to get a ride over to a local place in Amarillo, TX. So if you need emergency funding and don't want to travel across Texas to find a great deal, consider 100DayLoans for a faxless cash payday advance loan. If you want a fast cash advance with no fax hassles, take a look at SecureMoneyStore.com. This service is easy, since there are no paper hassles and no fax is required. In addition, it is easy to qualify, because no credit check is needed if you live in Texas. Apply online with a quick 5-step form for payday loans up to $1000. For Amarillo, Texas and across the USA, funds can be deposited in your account in 24 hours. TheCashStation.com was founded in 1997 and is one of the most established names in online lending. Visit this site for cash advance payday loans of up to $500 in 24 hours! Available for residents across the United States, including Amarillo, Texas. Apply online right now–It's Free!
It’s a little bit scary to think about it, but this year is my final year of university. I don’t know how I feel about this because while a part of me kind of wants to graduate, the other part of me kind of wants to stay for a while longer. One thing I do know is that with university getting closer and closer to the end, I’ve really needed to find casual work so that I can finish the year with some sense of support behind me. To be honest, I’ve been trying to find a job since I left high school in 2012, and it was no easy task. But now, I’ve finally been successful in this adventure and because these things helped me out a lot when it came to getting the position, I thought that I would share the advice with all of you. Make use of QUT’s resources — One of the many things that I love so much about QUT is that it’s always there to help in some way or another. I spent a long time trying to determine whether or not my resumes and cover letters were any good, so I was very excited when I recently stumbled upon this page, which gives excellent tips on writing resumes and cover letters. Better yet, QUT also provides resume feedback, which is a lifesaver if you can’t quite spot the spelling and grammatical errors that other people might see in your application. Look at ALL the employment websites — There’s always some place out there that’s hiring people for work, and it’s just a matter of looking in the right places to find them. I highly recommend making a habit out of checking employment websites at least once a day, so that you don’t end up missing out on any opportunities that you might want. My top three favourite places to search for jobs are the QUT Career Hub, SEEK, and SpotJobs. They’re all very easy to use, and you can filter your searches so that it’s easier to find what you want. Find volunteer work — Up until last year, I had never done any sort of volunteering, which made my resume look rather unimpressive. I never heard back after I sent in my job applications, and I think this may be to do with the fact I hadn’t done any sort of volunteering. Needless to say, I don’t think it’s just a coincidence that I’ve got work now that I’ve had two volunteering experiences. In other words, I highly recommend searching for volunteer work just as much as you look for paid work, especially if you want to build on your resume. Do some research — Many of the places you apply for will most likely have a website, and it’s definitely worthwhile to look at the website before you start working on your cover letter. By looking at a company’s website, you’ll be able to determine whether you’ve got the skills that they’re searching for, and you can tailor your cover letter to show that you fit that description. I have absolutely no doubt that the above points are what helped to land me a job in the end, and I’m sure that these tips will be helpful to other people out there who may be looking to find work. I plan to come back here in the very near future to post job interview advice but until then, if you have any other suggestions on finding work, feel free to leave them in the comments. Hi Sam. QUT offers a number of activities after O-Week with Week One being a “late orientation”, which you can see in the first link I’ve included. If you’d like to find out more about these events, there are contact details and plenty of helpful links provided on the Orientation page. The QUT website also includes maps of their campuses which you might like to use when you come to university. Best of luck with beginning your studies at QUT.
We weren’t named Computing's Best DevOps Recruitment Firm of 2017 for nothing. Our clients trust us to find the people they need and this means we have exclusive access to many of the best DevOps jobs on the exciting London market. If you apply for a DevOps role with Evolution, you will work with expertly trained consultants who not only operate solely within the DevOps market, but exclusively focus on London too. That means dealing with someone who is dedicated to you, your skillset and your location. We know that no two locations, disciplines or people are quite the same, and this understanding is what makes Evolution outstanding. We are a true consultancy to professionals and organisations, dedicated to and involved in IT communities across all our patches. We regularly work with DevOps engineers and tech businesses of all sizes in this sector, and there’s nowhere we do more of this than in London. DevOps is booming at the moment. More businesses are recognising its potential than ever, and when they look to grow and improve their teams they look to Evolution. So, if you’re looking for a new DevOps contract in London, you can see our current opportunities below. If we don’t have the right role right now or you would like to discuss your situation in detail, don’t hesitate to call us on 0207 248 9596 or send a message to [email protected].
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * 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. */ package org.apache.flume.node; import java.io.File; import java.util.List; import junit.framework.Assert; import org.apache.commons.io.FileUtils; import org.apache.flume.lifecycle.LifecycleController; import org.apache.flume.lifecycle.LifecycleState; import org.junit.After; import org.junit.Before; import org.junit.Test; import com.google.common.collect.Lists; import com.google.common.eventbus.EventBus; import com.google.common.eventbus.Subscribe; import com.google.common.io.Files; public class TestPollingPropertiesFileConfigurationProvider { private static final File TESTFILE = new File( TestPollingPropertiesFileConfigurationProvider.class.getClassLoader() .getResource("flume-conf.properties").getFile()); private PollingPropertiesFileConfigurationProvider provider; private File baseDir; private File configFile; private EventBus eventBus; @Before public void setUp() throws Exception { baseDir = Files.createTempDir(); configFile = new File(baseDir, TESTFILE.getName()); Files.copy(TESTFILE, configFile); eventBus = new EventBus("test"); provider = new PollingPropertiesFileConfigurationProvider("host1", configFile, eventBus, 1); provider.start(); LifecycleController.waitForOneOf(provider, LifecycleState.START_OR_ERROR); } @After public void tearDown() throws Exception { FileUtils.deleteDirectory(baseDir); provider.stop(); } @Test public void testPolling() throws Exception { // let first event fire Thread.sleep(2000L); final List<MaterializedConfiguration> events = Lists.newArrayList(); Object eventHandler = new Object() { @Subscribe public synchronized void handleConfigurationEvent(MaterializedConfiguration event) { events.add(event); } }; eventBus.register(eventHandler); configFile.setLastModified(System.currentTimeMillis()); // now wait for second event to fire Thread.sleep(2000L); Assert.assertEquals(String.valueOf(events), 1, events.size()); MaterializedConfiguration materializedConfiguration = events.remove(0); Assert.assertEquals(1, materializedConfiguration.getSourceRunners().size()); Assert.assertEquals(1, materializedConfiguration.getSinkRunners().size()); Assert.assertEquals(1, materializedConfiguration.getChannels().size()); } }
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("StudentsAndWorkers")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("StudentsAndWorkers")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("253a8b5e-c072-451e-98ce-d2b7bc692b9f")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
All four of your kiddos lines up neatly on your finger. This set of four birthstone name rings makes a statement about who you love. All four of your children neatly lined up on your finger. This set of four birthstone name rings makes a statement with just the right amount of sparkle. I love these rings. These are the second purchase with Nelle & Lizzy. I was disappointed when one of the stones fell out. I waited for a label to send it back and get fixed but I never did get it. A little drop of super glue and it has stayed it. I wear them every time I go out and thinking of getting another to be able to change it up. I ordered these rings as a gift for my wife. They are well made and very nice looking. The only issue is that I ordered size nine rings but these appear to be 9.5 maybe even 10.
<?php return array( 'custom_fields' => 'فیلدهای سفارشی', 'field' => 'فیلد', 'about_fieldsets_title' => 'درباره ی تنظیمات فیلد', 'about_fieldsets_text' => 'تنظیمات فیلد به شما امکان این را می دهد که گروه های فیلدهای سفارشی ایجاد کنید که مرتبا برای انواع مدل های دارایی خاص مورد استفاده ی مجدد قرار می گیرند.', 'fieldset' => 'تنظیمات فیلد', 'qty_fields' => 'فیلد های Qty', 'fieldsets' => 'تنظیمات فیلد', 'fieldset_name' => 'نام تنظیمات فیلد', 'field_name' => 'نام فیلد', 'field_element' => 'ایجاد یک عنصر', 'field_element_short' => 'عنصر', 'field_format' => 'شکل دادن', 'field_custom_format' => 'شکل دادن سفارشی', 'required' => 'نیازمندی', 'req' => 'نیازمندی', 'used_by_models' => 'استفاده شده توسط مدل ها', 'order' => 'سفارش', 'create_fieldset' => 'تنظیمات فیلد جدید', 'create_field' => 'فیلد سفارشی جدید', );
<?php /** Copyright 2012 Nick Korbel This file is part of phpScheduleIt. phpScheduleIt 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. phpScheduleIt 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. You should have received a copy of the GNU General Public License along with phpScheduleIt. If not, see <http://www.gnu.org/licenses/>. */ require_once(ROOT_DIR . 'Pages/Admin/ManageReservationsPage.php'); require_once(ROOT_DIR . 'Presenters/Admin/ManageReservationsPresenter.php'); class ScheduleAdminManageReservationsPage extends ManageReservationsPage { public function __construct() { parent::__construct(); $userRepository = new UserRepository(); $this->presenter = new ManageReservationsPresenter($this, new ScheduleAdminManageReservationsService(new ReservationViewRepository(), $userRepository), new ScheduleAdminScheduleRepository($userRepository, ServiceLocator::GetServer()->GetUserSession()), new ResourceAdminResourceRepository($userRepository, ServiceLocator::GetServer()->GetUserSession()), new AttributeService(new AttributeRepository())); } } ?>
So you want a bigger tax refund next year? Start tax planning now. So, you got your tax refund! Happy? Should it be bigger? Do you want a larger refund next year? If so, then start prepping for that tax year 2016 refund now! Actually, you should have started Jan 1st. With two-thirds of the calendar year left, you should be able to catch up with your planning. In my opinion, tax planning is learning how to incorporate your financial lifestyle into the IRS code. There are over 350 tax deductions and credits available. A tax deduction gets you your “tax bracket equivalent” back, while a tax credit gets you a dollar for dollar deduction. For example, if you are single, making $40,000, living in NYC, you will be in a Federal and State tax bracket of 40 percent. Good luck with that! It’s always changing ! Suggest to them, that you want to purchase 1 hour of their time. Your Tax preparer should already have a basic foundation of your financial lifestyle. Tell your Tax preparer that you want to learn how tax credits and deductions fit into your tax plan and financial lifestyle. Did I pay New York state and city income taxes or property taxes? Do I have a mortgage payment? Did I have any casualty losses in my home? Did I donate money, clothing, or property to a church or a non for profit organization? Do I have job expenses? Did I have to pay for legal, financial adviser, tax preparation, banking or investment services? Do I own a small business? Do I receive Rental Income? Did I adopt a child? Am I eligible for the elderly care credit? Am I putting enough money into my retirement plan at work to receive the ” retirement savings” credit? Did I pay alimony or child support? If you answered yes to just five of these questions, you are leaving money on the IRS table. Sit down with your tax professional now, so he can inform you of the things you need to minimize your tax liability and increasing your tax refund. Anthony Rivieccio is the founder & the CEO of The Financial Advisors Group, celebrating its 20th year as a fee-only financial planning firm specializing in solving financial problems. Anthony, a recognized financial expert since 1986, has been featured by many national and local media including: Klipingers Personal Finance, The New York Post, News12 The Bronx, Bloomberg News Radio, Bronxnet, The Norwood News, The West Side Manhattan Gazette, Labor Press Magazine, Financial Planning Magazine, WINS 1010 Radio, The Bronx News and The Bronx Chronicle. For financial assistance or a FREE 2015 Income Tax Extension, Anthony can be reached at (347) 575 5045.
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle 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. // // Moodle 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. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Atto text editor integration version file. * * @package atto_equation * @copyright 2013 Damyon Wiese <[email protected]> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); $plugin->version = 2021051700; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2021051100; // Requires this Moodle version. $plugin->component = 'atto_equation'; // Full name of the plugin (used for diagnostics).
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.IO; using System.Xml; namespace FromXmlToDataSet { class Program { static void Main(string[] args) { string filePath = @"C:\Users\UserName\Desktop\E-InvoiceSample.xml"; ImportFromXml(filePath); } public static DataSet ImportFromXml(string fromPath) { FileInfo xmlFile = new FileInfo(fromPath); DataSet dsXML = null; if (xmlFile.Exists) { FileStream fsReadXml = new FileStream(fromPath, FileMode.Open); XmlTextReader myXmlReader = new XmlTextReader(fsReadXml); dsXML = new DataSet(); dsXML.ReadXml(myXmlReader); myXmlReader.Close(); int s = dsXML.Tables["HAWB"].Rows.Count; for (int i = 0; i < s; i++) { string sub = dsXML.Tables["HAWB"].Rows[i]["Cube"].ToString(); } } return dsXML; } } }