text:
Q: JavaScript - jquery calender not showing in table- nested input, only in Firefox I have an input- field, nested, in a table, made a datepicker, with jquery.
It does not work, in Firefox 41.0.2 but in Chrome 46.0.2490.80 m and in IE 11.
I cannot show the source, cause it's from work.
Generally I just create a table, with JavaScript, make the rows sortable and give the nested input- fields unique id's.
Then html is assigned, to the DOM and the input- fields made datepickers, via id's.
Clicking on it, the datepicker just shows up in IE and Chrome.
Putting a datepicker- input somewhere else, in the site, FF opens it, too.
I raised the z-index of .ui-datepicker and ui-datepicker-div, up to 1000, which does not work.
Firebug says, the inputs get class "hasDatepicker".
Console does not throw an error. No warning either.
Is there an Firefox/ datepicker- issue, with tables ?
Thanks in advance.


Abstract: Crowdsourcing has arisen as a new problem-solving paradigm for tasks that are difficult for computers but easy for humans. However, since the answers collected from the recruited participants (workers) may contain sensitive information, crowdsourcing raises serious privacy concerns. In this paper, we investigate the problem of protecting answer privacy under local differential privacy (LDP), by which individual workers randomize their answers independently and send the perturbed answers to the task requester. The utility goal is to enable to infer the true answer (i.e., truth) from the perturbed data with high accuracy. One of the challenges of LDP perturbation is the sparsity of worker answers (i.e., each worker only answers a small number of tasks). Simple extension of the existing approaches (e.g., Laplace perturbation and randomized response) may incur large error of truth inference on sparse data. Thus we design an efficient new matrix factorization (MF) algorithm under LDP. We prove that our MF algorithm can provide both LDP guarantee and small error of truth inference, regardless of the sparsity of worker answers. We perform extensive experiments on real-world and synthetic datasets, and demonstrate that the MF algorithm performs better than the existing LDP algorithms on sparse crowdsourcing data.


text:
Profitability of a sample of Portuguese bank branches and its decomposition into technical and allocative components
Maria C.A. Silva Portela, Emmanuel Thanassoulis
Operations & Information Management
The efficiency literature, both using parametric and non-parametric methods, has been focusing mainly on cost efficiency analysis rather than on profit efficiency. In for-profit organisations, however, the measurement of profit efficiency and its decomposition into technical and allocative efficiency is particularly relevant. In this paper a newly developed method is used to measure profit efficiency and to identify the sources of any shortfall in profitability (technical and/or allocative inefficiency). The method is applied to a set of Portuguese bank branches first assuming long run and then a short run profit maximisation objective. In the long run most of the scope for profit improvement of bank branches is by becoming more allocatively efficient. In the short run most of profit gain can be realised through higher technical efficiency. © 2003 Elsevier B.V. All rights reserved.
European Journal of Operational Research
https://doi.org/10.1016/j.ejor.2003.10.018
sata envelopment analysis
profit efficiency
10.1016/j.ejor.2003.10.018
Profitability of a sample of Portuguese bank branches
Accepted author manuscript, 152 KBLicence: CC BY-NC-ND
Dive into the research topics of 'Profitability of a sample of Portuguese bank branches and its decomposition into technical and allocative components'. Together they form a unique fingerprint.
Profitability Mathematics 100%
Profit Efficiency Business & Economics 84%
Banks Mathematics 77%
Bank Branches Business & Economics 77%
profitability Social Sciences 75%
Profit Mathematics 72%
Banking Engineering & Materials Science 72%
Decomposition Business & Economics 70%
Silva Portela, M. C. A., & Thanassoulis, E. (2005). Profitability of a sample of Portuguese bank branches and its decomposition into technical and allocative components. European Journal of Operational Research, 162(3), 850-866. https://doi.org/10.1016/j.ejor.2003.10.018
Silva Portela, Maria C.A. ; Thanassoulis, Emmanuel. / Profitability of a sample of Portuguese bank branches and its decomposition into technical and allocative components. In: European Journal of Operational Research. 2005 ; Vol. 162, No. 3. pp. 850-866.
@article{429c9b2e2dc9455494cd625b08517174,
title = "Profitability of a sample of Portuguese bank branches and its decomposition into technical and allocative components",
abstract = "The efficiency literature, both using parametric and non-parametric methods, has been focusing mainly on cost efficiency analysis rather than on profit efficiency. In for-profit organisations, however, the measurement of profit efficiency and its decomposition into technical and allocative efficiency is particularly relevant. In this paper a newly developed method is used to measure profit efficiency and to identify the sources of any shortfall in profitability (technical and/or allocative inefficiency). The method is applied to a set of Portuguese bank branches first assuming long run and then a short run profit maximisation objective. In the long run most of the scope for profit improvement of bank branches is by becoming more allocatively efficient. In the short run most of profit gain can be realised through higher technical efficiency. {\textcopyright} 2003 Elsevier B.V. All rights reserved.",
keywords = "bank branches, sata envelopment analysis, profit efficiency",
author = "{Silva Portela}, {Maria C.A.} and Emmanuel Thanassoulis",
note = "{\textcopyright} 2005, Elsevier. Licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International http://creativecommons.org/licenses/by-nc-nd/4.0/",
doi = "10.1016/j.ejor.2003.10.018",
journal = "European Journal of Operational Research",
Silva Portela, MCA & Thanassoulis, E 2005, 'Profitability of a sample of Portuguese bank branches and its decomposition into technical and allocative components', European Journal of Operational Research, vol. 162, no. 3, pp. 850-866. https://doi.org/10.1016/j.ejor.2003.10.018
Profitability of a sample of Portuguese bank branches and its decomposition into technical and allocative components. / Silva Portela, Maria C.A.; Thanassoulis, Emmanuel.
In: European Journal of Operational Research, Vol. 162, No. 3, 01.05.2005, p. 850-866.
T1 - Profitability of a sample of Portuguese bank branches and its decomposition into technical and allocative components
AU - Silva Portela, Maria C.A.
AU - Thanassoulis, Emmanuel
N1 - © 2005, Elsevier. Licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International http://creativecommons.org/licenses/by-nc-nd/4.0/
N2 - The efficiency literature, both using parametric and non-parametric methods, has been focusing mainly on cost efficiency analysis rather than on profit efficiency. In for-profit organisations, however, the measurement of profit efficiency and its decomposition into technical and allocative efficiency is particularly relevant. In this paper a newly developed method is used to measure profit efficiency and to identify the sources of any shortfall in profitability (technical and/or allocative inefficiency). The method is applied to a set of Portuguese bank branches first assuming long run and then a short run profit maximisation objective. In the long run most of the scope for profit improvement of bank branches is by becoming more allocatively efficient. In the short run most of profit gain can be realised through higher technical efficiency. © 2003 Elsevier B.V. All rights reserved.
AB - The efficiency literature, both using parametric and non-parametric methods, has been focusing mainly on cost efficiency analysis rather than on profit efficiency. In for-profit organisations, however, the measurement of profit efficiency and its decomposition into technical and allocative efficiency is particularly relevant. In this paper a newly developed method is used to measure profit efficiency and to identify the sources of any shortfall in profitability (technical and/or allocative inefficiency). The method is applied to a set of Portuguese bank branches first assuming long run and then a short run profit maximisation objective. In the long run most of the scope for profit improvement of bank branches is by becoming more allocatively efficient. In the short run most of profit gain can be realised through higher technical efficiency. © 2003 Elsevier B.V. All rights reserved.
KW - bank branches
KW - sata envelopment analysis
KW - profit efficiency
U2 - 10.1016/j.ejor.2003.10.018
DO - 10.1016/j.ejor.2003.10.018
JO - European Journal of Operational Research
JF - European Journal of Operational Research
Silva Portela MCA, Thanassoulis E. Profitability of a sample of Portuguese bank branches and its decomposition into technical and allocative components. European Journal of Operational Research. 2005 May 1;162(3):850-866. https://doi.org/10.1016/j.ejor.2003.10.018

redpajama_set_name: RedPajamaCommonCrawl


For the first 10 hours of the legendary endurance race, the Marc VDS BMW Z4 GT3 #4 of Markus Palttala, Nicky Catsburg and Henri Moser was either leading the 60+ strong pack of the best GT cars Europe has to offer, or hot on the heels of the leading Manthey Porsche. The intriguing battle between these two came to an abrupt end when Catsburg parked the #4 on the side of the track with a failed alternator.
Markus Palttala and Jos Menten scored the first podium of the season for the SIMFY-coloured Porsche #110 of RTR (raceunion Teichmann Racing) finishing 3rd in class and 7th overall. During the last lap Palttala moved to take the lead, and 5th overall, but just moments later a fuel problem robbed the duo of a chance to win. Nevertheless, the experienced Finn was able to nurture the car home over the finish line using its service pump and thereby salvage a very respectable result.


Sure, everyone knows about the deep-sea fishing opportunities off Cairns – it's one of the world's most famed deep-sea fishing locations and has even attracted some of Hollywood's biggest names to try their luck for a marlin. And everyone knows about the Great Barrier Reef. But what's not so talked about are the world-class fishing options close to Cairns in the Net Free Zone.
And you don't even need a boat. This region includes many areas easily accessible by land. The headlands around Cairns provide many areas where fish naturally congregate, while the area's stunning white-sand beaches are full of stunning fishing spots where you can catch everything from whiting to barramundi.
If you do have a boat, Cairns offers a huge tidal estuary that stretches for 85-kilometres and is a boatie's dream, with everything from golden snapper to grunter lurking below. Or there's the Barron River, which is one of Queensland's most significant catchment areas and is full of huge barramundi.
The best time to fish is the warmest time, so be sure to cover up from the sun, watch out for saltwater crocodiles and jelly-fish and pack plenty of water along with Queensland's famed fishing refresher, XXXX Gold.
The three main headland locations within the Net Free Zone are at the northern end of Yorkeys Knob Beach, and the start and end of Trinity Beach.
Land-based access is easy with all three headlands having access to ample parking and toilet facilities and they're only a short walking distance from popular Yorkeys Knob and Trinity tourist beaches, and Yorkeys Knob Marina.
Access for boaties is best from either the Half Moon Creek Boat Ramp or Yorkeys Knob Boat Ramp and the distance between all headlands is less than a five-kilometre run. They're exposed to the wind and swell so wind strength below 15 knots is recommended for smaller boats. These areas always fish best over the larger tides, especially on the lead up to the full and new moon. All three headlands are fed by nearby creeks and on these bigger tides bait is often flushed out of creek mouths. This bait tends to take up residence around the headlands, which in turn attracts fish such as barramundi and mangrove jacks.
This fishing trail is a terrific option as it allows you to fish multiple locations using the same techniques and rigs over a single tide.
Cairns is blessed with some of Australia's best beaches and they offer plenty of incredible fishing spots, especially for land-based anglers. They are all easily accessible. Like the headland route, it's best to fish over the rising tide and bigger tides and calmer weather with little swell is best.
Machans Beach has many fishable attributes especially with its close proximity to the Barron River mouth. Fishing around the mouth with live and fresh baits can produce some monster barramundi and salmon. The creek mouth is not the only spot to wet a line and anywhere along the open beach may produce fish.
The next stop is Holloways Beach which is fed by Thomatis Creek and is also a hot spot for salmon and barramundi. When fishing both these beaches, standard estuary gear will do the job. In terms of technique, these beaches are very much highways for both bait and fish and when they come through, it can get red-hot very quickly.
Lures, bait fishing and retrievers will work well in the open beach environment with depth of water being the biggest factor to consider. Trinity Beach is not fed by any creek systems but still has many fishable attributes.
Fish a huge tidal-estuary that stretches 85-kilometres with many creeks, drains, wrecks and snags home to barramundi, golden snapper, grunter, salmon and mud crabs. The Cairns Inlet is accessed by two boat-ramps, Smiths Creek Ramp, next to the sugar terminal, and the ramp at Tingira Street-Smith Creek a few kilometres down the road which is preferred for larger boats.
When the weather makes conditions closer to the mouth undesirable, fish the mid-to-upper reaches of the Inlet. Launch your boat around the top of the tide and head up the Inlet and move around the island where you have the option of fishing Chinamen, Four Mile, Garrison or Skeleton Creek.
If lure fishing, the tide will slowly push you down the creek giving you ample opportunity to flick snags for barramundi and mangrove jacks. Once the tide is low, fish the deeper holes at the creek mouth and junctions.
In good weather, head for Hospital Flats as they hold lots of bait after heavy rain, especially prawns which attract fish. They're best fished on the last two-hours of the incoming tide and the bigger the tide, the better. This area can be good at night for salmon, grunter and barramundi on.
Just north of Cairns lies the almighty Barron River and its side branch, Thomatis Creek. This estuary is best accessed at Stratford, next to the Captain Cook Highway Bridge. This ramp has ample parking, is well-lit and has a pontoon for ease of access.
When starting your Barron River Fishing Trail, launch your boat and head towards the mouth of the creek. Along the way you will see many mangrove-lined riverbanks, which hold good numbers of mangrove jack. However, it is the deeper holes mostly found on the bends of the rivers – especially the last bend of the river before nearing the mouth and the mouths of smaller feeder creeks – which are worth fishing.
Fishing this deeper water on the slack of the tide, preferably the bottom of the tide, with live prawns and mullet, or vibe-style lures, will see some excellent fishing. Threadfin salmon and large barramundi are found in the Barron River, especially when fishing at night. The mouth of the Barron River is also excellent and this is best fished on the outgoing tide. The best bait to use here are herring, mullet and prawn and these can all be caught using a cast net.


Words from the second chapter of Peter's first letter to believers across the Roman Empire are strong and clear: to be a follower of Jesus is to have a home elsewhere. To be a member of God's family makes you a visitor in this place, here and now. This week Pastor Bill tackles the Christian perspective on suffering that Peter lays out at the end of chapter 2.


text:
190 Oliver Street • North Tonawanda, NY 14120 • (716) 692-2305 • fax (716) 692-2394
Estimating & Engineering
Aviation & Transportation
Retail & Restaurant
The R.E. Krug Corp. was founded in 1980 as a small contract glazing and aluminum frame fabricating company at the same location that it occupies today. Starting with the rental of a single work bay, it now occupies the entire complement of buildings that constitutes the 190 Oliver Street Industrial Park in North Tonawanda, NY. Despite strong competition during the early years, Krug soon grew into a major supplier of architectural glass and metals. The company also expanded into other related facets of the industry including aluminum doors, glass handrail and decorative architectural panels. In 2008 Krug was purchased by Erik Chretien, a longtime employee of the company. Under the new ownership Krug has grown and will continue to evolve as the construction industry demands.
Rapid Contact
190 Oliver St | North Tonawanda NY 14120 | Phone 716.692.2305 | Fax 716.692.2394 | Email info@rekrug.com
Powered by QBC


Are two T1's the same as a 3Mbps pipe?
No, however by balancing two T1 links you are able to utilize the same amount of bandwidth as two bound T1 connections when multiple sessions are being utilized.
What does this mean? Basically network load balancing uses session balancing in order to share connections between multiple WAN links. Thus when a web browser opens a web site, each image is a different session, thus both links are being used to download the various files.
If you are using an FTP application (or something similar) it only uses a single session, and thus a single FTP download does not take advantage of multiple WAN links, however if multiple FTP sessions are started from one or more users, than both links may be utilized in order to share the load.


Many have a fantasy of a creative essay profession. You may dream of essay composing the perfect American tale, or turning into the following Poe. If you are not kidding about turning into an author, there are a few things you ought to do and remember.
Composing isn't care for riding a bicycle. If you quit composition and return to it five years after the fact, you presumably won't be so great, not to mention better. If you need to wind up an incredible author, you need to rehearse regularly. That implies ordinary. That means setting a specific measure of time to compose ordinary. Stop at this moment, check your schedule, and directly in a period for regular that you will write.
You most likely loathed composing essays in school. They instructed you to have a presentation section, the body, and the end. At that point, they said to do likewise with each chapter. Try not to utilize I and sound genuinely exhausting. OK, they probably won't have said that, yet by and large, most essays sounded exceptionally formal. On the off chance that you delighted recorded as a hard copy one of a kind, creative essays, you are progressing nicely. I'm not saying to overlook all that you've found out about composition; I'm trying to say that creative essay is considerably less formal. You need to draw in your author and keep them intrigued. Try not to give exhausting dreariness a chance to murder your story.
I have run over a few people's compositions that was simply dreadful. It was a decent story and may have had potential, yet it was ineffectively composed and appeared as if they composed it once and never took a gander at it again. On the off chance that you are composing a piece that you are not kidding about, particularly in the event that you need to distribute it, you have to ensure that it is immaculate. Print it up, if conceivable, and read through it a couple of days after you composed it. Break down it and ensure it's ideal. At that point have another person that you trust experience it also.
For me, composing has dependably been my fantasy. I compose constantly, and I've for the longest time been itching to be a fruitful essayist. Individuals are continually revealing to me that I am an incredible author. In the event that you need to succeed, you can't surrender. Simply continue composing and endeavoring to achieve what you need to achieve. In the event that you need to distribute a novel, do whatever you can to do it.
Compose your novel and alter it until you feel it's ideal. Have a couple of believed companions read it and give you some productive analysis. Convey some inquiry letters to operators and do all that you can to get it distributed. On the off chance that you get some poor responses and you feel like the novel won't work choose on the off chance that you feel like it truly is sufficient to distribute and independently publish it, if not, move onto the following novel.
Try not to quit doing what you adore. On the off chance that you truly need to succeed, surrendering is the most noticeably awful approach to do it. Continue composing and altering, composing and altering, and you just may achieve your fantasies.
You can discover a ton of outlets for articles and furthermore different kinds of composing – yet to begin with you should get included: join that club, get that magazine, and get joy from oneself! Except if you will be the hit with the occasion, finding distributed by a sizable distributing office merely is not easy and regularly takes years.
You're mindful that once in a while your creative essay streams like Niagara Falls just as different days it's scarcely as productive as a dribbling tap. That time at whatever point you start to put your strands and bits of reasoning together towards making an entire story that would be important and engaging. Plotting resembles establishing the skeletal framework from the world you've gotten in your creative energy to create. Besides, creative essay scholars for books, papers and magazines need to be careful that numerous individuals perused while in travel and at such occasions, lexicons are not helpful.
A quick and straightforward approach to influence associations and bound to up with individuals in of your enthusiasm for composing practice is your consideration as an individual from creative essay classes. Top Tips to attempt: Try diverse kinds of writing, those you'd never at any point consider, those you've never attempted, those you haven't found yet. Should you want to be imaginative and genuinely feel you have a talent for delivering anecdotal stories and characters, at that point try it.
I've taken in a ton from these notable journalists and their creative essay thoughts. For this reason, the lanes like the workplaces are bursting at the seams with ladies and men whose ears are stopped with a solitary sound gadget or one more – basically since the sound media gives you a chance to acquire excitement albeit working, driving or dozing, which the book doesn't allow.


I went to Australia Zoo not really looking forward to it - but feeling like it was something that I ought to do once in my life - and feeling a little cynical about all the hype over Steve Irwin.
But in the end I was very impressed.
There is too much haigiography of Irwin. He is everywhere. From the huge jump in the toyota add at the entrance to the name of the shuttle train 'Steve's Safari.' The half hour performance we watched in the Crocoseam was billed as a tribute to him and the things he stood for. It doesn't make sense to call the place 'The home of the Crocodile hunter' with a photo of him - when he clearly isn't there.
Something led by one person will be stamped for good or ill with that person's personality and vision whereas the organisation led by a committee or board by nature is one of compromise.
Australia Zoo has vision and character in a way i have not seen in any other zoo.
It was by far the best zoo I have been to and we had a wonderful time - seeing lots of animals up close. Many of the exhibits actually had keepers in the cages sitting with the animals to answer questions.
Cathie has been a little frustrated the last few days that so far the balance of our holiday has been higher on fun that learning. Well Australia Zoo was fun but it was a day filled with conversation and learning. I was very impressed.
Sideline: A delightful moment for us was when Hannah discovered that Australia Zoo was not in Sydney as she had assumed.
ps We didn't see Bindi!
When we picked up the Jeep on Friday it still didn't have a backup fan. The replacement fan from jeep was quoted at $1300, and the repair guys had not been able to get one second hand that day. They gave us the name of a jeep place at Maroochydore which specialises in second hand parts - so we will go there.
But it means two days of driving with no back up fan - and hence no air conditioner.
This was fine as we drove with the windows open. More stressful was keeping a close eye on the temperature. We sat at 95 which was the middle of the dial the whole trip. 120 was the red area. I am not sure quite what this means but I am keeping a close eye on it.
It now feels like we are starting to get more off the beaten track. All though we are only at the Sunshine Coast. It is starting to feel like the outback is approaching. This is exciting.
We are also starting to get into the rythum of things. We arrived at the Big 4 Forest Glen Caravan Park at about 4pm, the kids went for a play in the pool while Cathie had a sleep and I edited up a video. At six pm we looked at the Bible. Abraham actually fell asleep towards the end of this time - he was so tired after the big day at Australia Zoo.
Then dinner and then we actually got the kids to bed by 9pm and us by 10pm. I woke at 5:30am.
It's seven now, we will breakfast, pack up the caravan and head to church.
We just heard this banging around outside the caravan - it was a brush turkey trying to break into our rubbish. Abraham was out of bed in a second and headed out to scare it away.


All of you are amazing. Thank you for taking the time to send encouraging words, helpful advice, and share personal experiences. Knowing that I'm not the only one, even on an anonymous forum, is really consoling. And things have gotten better- I took the advice to relax more around everyone and everything is starting to feel way more natural and I am starting to realize after talking to other classmates that they felt overwhelmed and anxious too. So we are all beginning to trust each other and open up. Thanks for caring and being amazing PAs!!


text:
Q: $\int \frac{dx}{x^2 \sqrt{x^{2}-4)}}, x=2\sec(t) $ Am I eliminating the absolute value correctly? $$ \int \frac{dx}{x^2 \sqrt{(x^{2}-4)}},\quad x=2\sec(t).$$
After substitution
$$\int \frac{2\tan(t)\sec(t)}{(2\sec(t))^{2}\sqrt{(2sec(t))^2-4}}=\frac{1}{4}\int \frac{\cos(t)\tan(t)}{\sqrt{\tan^{2}(t)}}.$$
and for $g(t)=2\sec(t), t \in (0,\pi)$ such that $g:(0,\pi)\rightarrow (-\infty,-2)\cup(2,\infty) $
$$\frac{\tan(t)}{|\tan(t)|}=\frac{|\cos(t)|}{\cos(t)}$$
then
$$ \frac{1}{4} \int_{}^{} |\cos(t)| dt$$
and
$$ \frac{1}{4} \int_{}^{} \cos(t) dt = \frac{1}{4} \sin(t), t \in (0,\frac{\pi}{2})$$
$$ \frac{1}{4} \int_{}^{} -\cos(t) dt = -\frac{1}{4} \sin(t), t \in (\frac{\pi}{2},\pi)$$
$sin(t)=\frac{\sqrt{x^{2}-4}}{x}$ but $sin(t)\geq 0, \forall t \in (0,\pi)$ then $sin(t)=\frac{\sqrt{x^{2}-4}}{|x|},  \forall x \in \mathbb{R}$
finally
$$ \frac{1}{4} \int_{}^{} \cos(t) dt = \frac{1}{4} \frac{\sqrt{x^{2}-4}}{x} + C, t \in (0,\frac{\pi}{2}), x\geq0$$
$$ \frac{1}{4} \int_{}^{} -\cos(t) dt = -\frac{1}{4} \frac{\sqrt{x^{2}-4}}{-x}=\frac{1}{4} \frac{\sqrt{x^{2}-4}}{x} + C, t \in (\frac{\pi}{2},\pi), x<0$$

A: Your final answer looks correct, just a few remarks.
You are missing the constant of integration. Since $\tan(t)$ is not defined at $t=\frac{\pi}{2}$, this needs to be excluded in the interval. Note also that $\sqrt{x^2-4}\geq 0$ for $x\leq -2$ and $x\geq 2$.
For the $\textbf{indefinite}$ integral we write
$$\int\frac{dx}{x^2\sqrt{x^2-4}}=\frac{\sqrt{x^2-4}}{4x}+C$$
since we are not given the limits of integration. When we are given the limits, we split the integration intervals according to the absolute value.

redpajama_set_name: RedPajamaStackExchange


Brooklyn Nets NBA Deuce Team SocksYour team spirit runs all the way to your toes with these Deuce Crew 504 Socks, featuring the team logo on the cuff. The team name appears on the sock foot, and the heel and toe sport a contrasting color. Fits shoe size 8-13.


games for ´t Ivoor. This premier league team, including Huub Wilkowski in its ranks, is based at Biljartcentrum ´t Ivoor in Boxtel. A beautiful location in the south of The Netherlands. Of course Therese will also remain to play for Burgmans biljarts, for which she also played this season.
After the current competition, Therese will travel to Brandenburg where, among others, the Women's European Championships will be held in Brandenburg in early May (3 to 5 May). She will then focus on the Grand Prix of Rosmalen (May 20th until June 1st), the World Cup in Blankenberge and the World Cup in Portugal.


Here are the extra services you receive in addition to the existing services on Passrider.com.
Flight Schedules Profile – Store a profile for your searches. This auto populates whenever you use the Flight Schedule engine.
Airport Schedules – a list of all the routes to/from a particular airport. This includes nonstops, directs and round robins.
Email Schedules – you can view a schedule as you normally do, but now you can email it to yourself or to someone else. This way you can view it whenever you need it, even if you are offline.
Change Dates – you can change dates by clicking on the Prev and Next links without entering a new dates and leaving your search.
City Notes – Audio information about select cities around the world. Here you will find information about how to get from the airport to the city, what to see and where to stay and other city tidbits.
One (1) Passrider Routing GuideThe Guide has an overview of the destination, airports serving the city, hotel information, airlines serving city, plus specific passrider information. You will also have access to previously requested Guides in PDF format. One new Guide request per month.


Council will support a Multi-use zoning application, subject to the usual conditions. Potential for petrol station, motel, etc within 10 minutes/3.7km of Lanseria International Airport.
Current income producing 4.4 HA of prime land with multi-unit dwellings and plenty of space for further development.
Serious Seller - Make an Offer!
The suburbs of Randburg offer a wide variety of neighbourhoods to suit most lifestyles and, have a mixed population of old and young residents. Property types include older homes and new developments. Diggers and Randburg Sports Club offer professional facilities for all major sporting activities, for young and old. For nightlife and entertainment, Randburg is very central. Parkhurst or Greenside's boulevard cafés, Monte Casino's multitude of restaurants, theatres and gambling facilities are a mere 20 minutes away. For outdoor lovers, the Lion Park and the Cradle of Humankind has a wide variety of attractions, in close proximity.


text:
EntertainmentHow to log into Showtime with Spotify
How to log into Showtime with Spotify
by Valeriy Odintsov
Heidi Fin / Unsplash
Spotify is a Swedish music service available in nearly 120 countries. It has a catalog of more than 50 million songs and 4 billion playlists of tracks by various international artists. The service can be used online, on desktops, mobile devices, game consoles, televisions, and stereos.
Spotify offers the legal ability to listen to tracks online from a huge music catalog, which includes many albums not available on other platforms. However, that's not the only reason users love the service.
The main advantage of Spotify – algorithms for music selection, which almost perfectly adjust to the tastes of listeners. If you turn on "Non-Stop Music" in the settings, then at the end of the playlist will automatically play similar tracks. You can often find something new for you there.
However, that's still not all Spotify has to offer. Spotify is offering students a discount on a premium student plan that includes Showtime only for $4.99 per month. So, if you want to log into Showtime with Spotify, here is how you can do this.
How to get a Spotify student discount
First of all, obviously, you must be a student enrolled at an accredited Title IV college or university in the United States. In addition, you must be over 18 years old. If you want this discount, you'll need to create a Spotify account and verify your student status with your Sheer ID. To do this, you need to log in to your college or university portal or upload your enrollment information. Once you register, you'll be able to activate your accounts on Showtime.
You can also keep your existing Showtime account if you have one. You will simply need to cancel your existing billing and activate Showtime on the Spotify Services page.
Why Spotify is so highly regarded
It's because Spotify's recommendation algorithms work so well that millions of listeners around the world appreciate them. According to users, the music is selected so that all day long you listen to selections without the desire to switch. It's all thanks to advanced machine learning.
The app has multiple playlists with personalized recommendations. "My Mix of the Day" is updated every day and consists of your favorites and new songs broken down by genre. The more different music you listen to, the more of these playlists there will be.
There's also a "Novelty Radar" playlist, which adds all-new music from the past week with dozens of artists selected based on your tastes. It's updated on Fridays. In addition to adjusting for listener preferences, the service offers a "Discoveries of the Week" playlist, which is updated every Monday and contains recommended tracks.
A huge community of listeners with good taste is also a plus of the service. Thanks to the public playlist feature, you can find and subscribe to collections of friends and users with similar music preferences through the standard search, constantly discovering something new.
Unlike its counterparts, Spotify has full clients for all popular platforms. Even on Linux, you can listen to music in the proprietary player instead of switching between browser tabs. The service works equally well on your computer and mobile device.
What is Spotify Connect
With seamless synchronization and Spotify Connect, you can't only enjoy your favorite tracks on any gadget but also control playback remotely by using your smartphone as a remote for your computer, TV, or audio system connected to the speakers.
Using Spotify Connect is easy. Download the latest version of the Spotify app to your device to control and make sure it is connected to the same Wi-Fi network as the one or more devices you select.
Launch the Spotify app on your smartphone, sign in to your subscription account, and select a song to start playing. Tap on the "Now Playing" bar and then on the device logo in the lower-left corner of the screen. You will see which of your connected devices will be able to play music from Spotify.
How to create a Collaborative Spotify playlist
How to log out of all devices on Spotify
How to use Spotify Listen Alike feature
How to cancel Showtime on Amazon Prime
How to setup Spotify Sleep Timer
How to cancel Showtime subscription on any device


Learn more about the TIGRS Advantage.
Why Register (RE100, CDP, Science Based Targets)?
APX will walk your firm through the know your client (KYC) verification process. This involves submitting company documents and answering questions about how it intends to use RECs.
The KYC process is not required for entities that have an active account in other APX registries, such as the APX VCS Registry.
Following account activation, developers can bring generation assets online. APX will request documents to identify each project, registration details and ownership.
(1 week) The account holder will be requested to demonstrate legal ownership of their environmental attributes and confirm that attributes are not being (and will not be) double counted. APX may conduct research to substantiate these claims.
4 Select a Qualified Reporting Entity (QRE) APX works with third party entities to verify generation independently. Developers select from a list of approved QREs to validate generation volumes.
5 Issue RECs for first quarter of generation The QRE will upload validated generation data into the Registry, and corresponding RECs will be issued to the developer. These RECs are "active" and can be sold and traded immediately.
For voluntary renewable energy tracking in the United States companies use the North American Renewables Registry (NAR).
The global demand for renewable energy is growing fast. Corporate and industrial energy consumers want to buy renewable power using a credible tracking system. The TIGR Registry enables transparent, secure, and reliable tracking of RECs, backed by APX quality standards. APX's 15+ years of experience working with the world's leading brands. Transacting RECs through the TIGR Registry provides a layer of trust and credibility for buyers and sellers alike.Fee StructureOpening an account in the registry is free for project developers. The cost of registering a generation asset and issuing RECs for the first 3 months is fixed at $1,000. The subsequent cost of issuance is $0.05 per REC (MWh).Who Buys RECs?The most frequent REC buyers are large brands that wish to demonstrate their commitment to using renewable energy. Members of the RE100, the We Mean Business Coalition, and other industry associations use RECs to meet international commitments.Account holders using APX's voluntary REC registries include:and many more.
The cost for the account, project and first 3 months of issuance is fixed at $1000. After this, issuances will be charged at $0.05 per REC issued.
Project owners can work with an independent reporter (Qualified Reporting Entity) to report the generation data directly to the TIGR Registry. Examples of entities that provide this service include power system operators, independent verifiers and Designated Operational Entities familiar with the reporting process from the carbon markets.
Alternatively, APX can connect directly to meters at the project site, read the generation data remotely, and automatically import this data to the registry after validation. Our experience with providing services for power plants and storage units globally enables us to offer this unique service to participants in the TIGR Registry.
APX's global network and contacts enables us to match buyers and sellers. If you are looking to be introduced to a buyer or seller let us know and we can assist. If this leads to a transaction APX can also offer escrow services to help facilitate delivery-versus-payment. In select markets we work CBL Markets – the leading exchange for voluntary environmental markets.
APX's combination of our 15+ years of pioneering environmental markets and our 20+ year history of providing technology solutions to wholesale power participants drives our broad spectrum of sustainable energy solutions. We partner with renewable power producers, innovative utilities, enlightened commercial and industrial consumers as well as top government agencies and NGO's.
APX is actively engaging with numerous countries to birth TIGRs across the globe. Contact us to inquire about a country not currently highlighted below so we can begin discussions with you on supporting your TIGR transactions.
Stay tuned for announcements regarding new countries where TIGRs will be birthed.


text:
RAPORLAR & ANALİZLER
DEFENCE TURKEY
BRENSAN's Technologies to Support the Soldiers of the Future
Issue 109 - August 2021
BRENSAN develops innovative, highly efficient and customized power electronics and battery solutions for a wide variety of users, ranging from single soldier to the level of mobile platforms. The products developed by the company extend from the light weight and high energy-density batteries and charging devices that energize the portable devices, to the battery and power electronics infrastructures for new generation manned and unmanned land vehicles. During this period in which technological transformation occurs at all levels of armed forces, nearly all personnel and platforms interact with other elements while they are fulfilling various functions. Therefore, each personnel and platform are regarded as a "the system of systems." The common ground of the technologies that enable such transformation and development is the high efficiency electric energy that is available under all conditions. When the variety and necessity of the subsystems are considered, the significance of the reliable and lightweight power components simultaneously covering the needs of such systems increases more. BRENSAN's solutions step in exactly at this point. The Li-Ion batteries d e v e l o p e d a n d manufactured by BRENSAN stand out with their high energy density and compatibility under challenging operational conditions. Thanks to the data communication interfaces incorporated, they have the capacity to communicate with the devices they are utilized with, such as the power managers or battery chargers. On account of their technological infrastructure, BRENSAN products enable the users to benefit from various capabilities at maximum level at today's complex military field.
The batteries that energize many applications such as the electro-optical sensors, communication equipment, electronic warfare systems and unmanned systems, are being designed in accordance with the power and energy priorities and their operating conditions in addition to the mechanical and electrical interfaces of the systems they are used with. These batteries are then tested in line with the relevant military and industrial standards.
New Generation Battery Charger
BRENSAN's perception of battery chargers reflects the "universal" charging approach, which is capable of charging any portable batteries and in this way eliminating the burden of containing different chargers for every type of battery. Thanks to the new generation GaN technology utilized in the electronic design, company's indigenously developed "Light Universal Charger/LUC" offers the users with unique lightness, efficiency and functionality. The size of the device enables the personnel to carry it with ease. The sales of the Light Universal Chargers in international markets has started this year. Weighing merely 600 gram, the device can be energized from any source available at the field like military vehicles, solar panels and even by other batteries, and is capable of charging two batteries simultaneously with simple cabled adapters. On account of its ports that support NATO STANAG 4695, LUC can operate directly with the devices and batteries compatible with this standard and at the same time can be used for charging commercial electronic devices with its 2 USB ports. The device can show the charge parameters and health status of the batteries via its display, and through the computer interface it can present all details of the batteries via a PC based software designed by BRENSAN. Moreover, new functions can be added through software updates when required. In addition to the charger solutions, the company carries on the light and high efficiency soldier-borne integrated power and data distribution system development project where the universal and industry standards interfaces are used again for the "future soldier" projects held in the country and abroad. The field tests of the new generation system for engaging and energizing all the electronic equipment that can be carried by the personnel and that has various energy requirements and data interfaces, is planned to be launched soon. With the power electronics and battery solutions that incorporate innovative state-of-the-art technology developed and produced domestically, BRENSAN aims to offer products that can be a force multiplier for our armed forces and support its rapidly developing capabilities. Besides, with the competitive solutions which are superior than their equivalents in the international markets, the company creates a remarkable potential in exports
Interviews News Reports & Analysis Articles
Issue 119Issue 118Issue 117Issue 116
Subscription from Editor Who We Are Advertising
İlkbahar Mah. Sinpaş Altın Oran Kule-3 No:142 Çankaya-Ankara Turkey
info@defenceturkey.com
© Defence Turkey 2017. All rights reserved


text:
/* $Id$ */

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include "php.h"
#include "zend_exceptions.h"

#include "php_spl.h"
#include "spl_functions.h"
#include "spl_engine.h"
#include "spl_iterators.h"
#include "spl_heap.h"
#include "spl_exceptions.h"

#define PTR_HEAP_BLOCK_SIZE 64

#define SPL_HEAP_CORRUPTED       0x00000001

#define SPL_PQUEUE_EXTR_MASK     0x00000003
#define SPL_PQUEUE_EXTR_BOTH     0x00000003
#define SPL_PQUEUE_EXTR_DATA     0x00000001
#define SPL_PQUEUE_EXTR_PRIORITY 0x00000002

zend_object_handlers spl_handler_SplHeap;
zend_object_handlers spl_handler_SplPriorityQueue;

PHPAPI zend_class_entry  *spl_ce_SplHeap;
PHPAPI zend_class_entry  *spl_ce_SplMaxHeap;
PHPAPI zend_class_entry  *spl_ce_SplMinHeap;
PHPAPI zend_class_entry  *spl_ce_SplPriorityQueue;

typedef void *spl_ptr_heap_element;

typedef void (*spl_ptr_heap_dtor_func)(spl_ptr_heap_element TSRMLS_DC);
typedef void (*spl_ptr_heap_ctor_func)(spl_ptr_heap_element TSRMLS_DC);
typedef int  (*spl_ptr_heap_cmp_func)(spl_ptr_heap_element, spl_ptr_heap_element, void* TSRMLS_DC);

typedef struct _spl_ptr_heap {
	spl_ptr_heap_element   *elements;
	spl_ptr_heap_ctor_func  ctor;
	spl_ptr_heap_dtor_func  dtor;
	spl_ptr_heap_cmp_func   cmp;
	int                     count;
	int                     max_size;
	int                     flags;
} spl_ptr_heap;

typedef struct _spl_heap_object spl_heap_object;
typedef struct _spl_heap_it spl_heap_it;

struct _spl_heap_object {
	zend_object         std;
	spl_ptr_heap       *heap;
	zval               *retval;
	int                 flags;
	zend_class_entry   *ce_get_iterator;
	zend_function      *fptr_cmp;
	zend_function      *fptr_count;
	HashTable          *debug_info;
};

/* define an overloaded iterator structure */
struct _spl_heap_it {
	zend_user_iterator  intern;
	int                 flags;
	spl_heap_object    *object;
};

/* {{{  spl_ptr_heap */
static void spl_ptr_heap_zval_dtor(spl_ptr_heap_element elem TSRMLS_DC) { /* {{{ */
	if (elem) {
		zval_ptr_dtor((zval **)&elem);
	}
}
/* }}} */

static void spl_ptr_heap_zval_ctor(spl_ptr_heap_element elem TSRMLS_DC) { /* {{{ */
	Z_ADDREF_P((zval *)elem);
}
/* }}} */

static int spl_ptr_heap_cmp_cb_helper(zval *object, spl_heap_object *heap_object, zval *a, zval *b, long *result TSRMLS_DC) { /* {{{ */
		zval *result_p = NULL;

		zend_call_method_with_2_params(&object, heap_object->std.ce, &heap_object->fptr_cmp, "compare", &result_p, a, b);

		if (EG(exception)) {
			return FAILURE;
		}

		convert_to_long(result_p);
		*result = Z_LVAL_P(result_p);

		zval_ptr_dtor(&result_p);

		return SUCCESS;
}
/* }}} */

static zval **spl_pqueue_extract_helper(zval **value, int flags) /* {{{ */
{
	if ((flags & SPL_PQUEUE_EXTR_BOTH) == SPL_PQUEUE_EXTR_BOTH) {
		return value;
	} else if ((flags & SPL_PQUEUE_EXTR_BOTH) > 0) {

		if ((flags & SPL_PQUEUE_EXTR_DATA) == SPL_PQUEUE_EXTR_DATA) {
			zval **data;
			if (zend_hash_find(Z_ARRVAL_PP(value), "data", sizeof("data"), (void **) &data) == SUCCESS) {
				return data;
			}
		} else {
			zval **priority;
			if (zend_hash_find(Z_ARRVAL_PP(value), "priority", sizeof("priority"), (void **) &priority) == SUCCESS) {
				return priority;
			}
		}
	}

	return NULL;
}
/* }}} */

static int spl_ptr_heap_zval_max_cmp(spl_ptr_heap_element a, spl_ptr_heap_element b, void* object TSRMLS_DC) { /* {{{ */
	zval result;

	if (EG(exception)) {
		return 0;
	}

	if (object) {
		spl_heap_object *heap_object = (spl_heap_object*)zend_object_store_get_object((zval *)object TSRMLS_CC);
		if (heap_object->fptr_cmp) {
			long lval = 0;
			if (spl_ptr_heap_cmp_cb_helper((zval *)object, heap_object, (zval *)a, (zval *)b, &lval TSRMLS_CC) == FAILURE) {
				/* exception or call failure */
				return 0;
			}
			return lval;
		}
	}

	INIT_ZVAL(result);
	compare_function(&result, (zval *)a, (zval *)b TSRMLS_CC);
	return Z_LVAL(result);
}
/* }}} */

static int spl_ptr_heap_zval_min_cmp(spl_ptr_heap_element a, spl_ptr_heap_element b, void* object TSRMLS_DC) { /* {{{ */
	zval result;

	if (EG(exception)) {
		return 0;
	}

	if (object) {
		spl_heap_object *heap_object = (spl_heap_object*)zend_object_store_get_object((zval *)object TSRMLS_CC);
		if (heap_object->fptr_cmp) {
			long lval = 0;
			if (spl_ptr_heap_cmp_cb_helper((zval *)object, heap_object, (zval *)a, (zval *)b, &lval TSRMLS_CC) == FAILURE) {
				/* exception or call failure */
				return 0;
			}
			return lval;
		}
	}

	INIT_ZVAL(result);
	compare_function(&result, (zval *)b, (zval *)a TSRMLS_CC);
	return Z_LVAL(result);
}
/* }}} */

static int spl_ptr_pqueue_zval_cmp(spl_ptr_heap_element a, spl_ptr_heap_element b, void* object TSRMLS_DC) { /* {{{ */
	zval result;
	zval **a_priority_pp = spl_pqueue_extract_helper((zval **)&a, SPL_PQUEUE_EXTR_PRIORITY);
	zval **b_priority_pp = spl_pqueue_extract_helper((zval **)&b, SPL_PQUEUE_EXTR_PRIORITY);

	if ((!a_priority_pp) || (!b_priority_pp)) {
		zend_error(E_RECOVERABLE_ERROR, "Unable to extract from the PriorityQueue node");
		return 0;
	}
	if (EG(exception)) {
		return 0;
	}

	if (object) {
		spl_heap_object *heap_object = (spl_heap_object*)zend_object_store_get_object(object TSRMLS_CC);
		if (heap_object->fptr_cmp) {
			long lval = 0;
			if (spl_ptr_heap_cmp_cb_helper((zval *)object, heap_object, *a_priority_pp, *b_priority_pp, &lval TSRMLS_CC) == FAILURE) {
				/* exception or call failure */
				return 0;
			}
			return lval;
		}
	}

	INIT_ZVAL(result);
	compare_function(&result, *a_priority_pp, *b_priority_pp TSRMLS_CC);
	return Z_LVAL(result);
}
/* }}} */

static spl_ptr_heap *spl_ptr_heap_init(spl_ptr_heap_cmp_func cmp, spl_ptr_heap_ctor_func ctor, spl_ptr_heap_dtor_func dtor) /* {{{ */
{
	spl_ptr_heap *heap = emalloc(sizeof(spl_ptr_heap));

	heap->dtor     = dtor;
	heap->ctor     = ctor;
	heap->cmp      = cmp;
	heap->elements = safe_emalloc(sizeof(spl_ptr_heap_element), PTR_HEAP_BLOCK_SIZE, 0);
	heap->max_size = PTR_HEAP_BLOCK_SIZE;
	heap->count    = 0;
	heap->flags    = 0;

	return heap;
}
/* }}} */

static void spl_ptr_heap_insert(spl_ptr_heap *heap, spl_ptr_heap_element elem, void *cmp_userdata TSRMLS_DC) { /* {{{ */
	int i;

	if (heap->count+1 > heap->max_size) {
		/* we need to allocate more memory */
		heap->elements  = (void **) safe_erealloc(heap->elements, sizeof(spl_ptr_heap_element), (heap->max_size), (sizeof(spl_ptr_heap_element) * (heap->max_size)));
		heap->max_size *= 2;
	}

	heap->ctor(elem TSRMLS_CC);

	/* sifting up */
	for(i = heap->count; i > 0 && heap->cmp(heap->elements[(i-1)/2], elem, cmp_userdata TSRMLS_CC) < 0; i = (i-1)/2) {
		heap->elements[i] = heap->elements[(i-1)/2];
	}
	heap->count++;

	if (EG(exception)) {
		/* exception thrown during comparison */
		heap->flags |= SPL_HEAP_CORRUPTED;
	}

	heap->elements[i] = elem;

}
/* }}} */

static spl_ptr_heap_element spl_ptr_heap_top(spl_ptr_heap *heap) { /* {{{ */
	if (heap->count == 0) {
		return NULL;
	}

	return heap->elements[0];
}
/* }}} */

static spl_ptr_heap_element spl_ptr_heap_delete_top(spl_ptr_heap *heap, void *cmp_userdata TSRMLS_DC) { /* {{{ */
	int i, j;
	const int limit = (heap->count-1)/2;
	spl_ptr_heap_element top;
	spl_ptr_heap_element bottom;

	if (heap->count == 0) {
		return NULL;
	}

	top    = heap->elements[0];
	bottom = heap->elements[--heap->count];

	for( i = 0; i < limit; i = j)
	{
		/* Find smaller child */
		j = i*2+1;
		if(j != heap->count && heap->cmp(heap->elements[j+1], heap->elements[j], cmp_userdata TSRMLS_CC) > 0) {
			j++; /* next child is bigger */
		}

		/* swap elements between two levels */
		if(heap->cmp(bottom, heap->elements[j], cmp_userdata TSRMLS_CC) < 0) {
			heap->elements[i] = heap->elements[j];
		} else {
			break;
		}
	}

	if (EG(exception)) {
		/* exception thrown during comparison */
		heap->flags |= SPL_HEAP_CORRUPTED;
	}

	heap->elements[i] = bottom;
	heap->dtor(top TSRMLS_CC);
	return top;
}
/* }}} */

static spl_ptr_heap *spl_ptr_heap_clone(spl_ptr_heap *from TSRMLS_DC) { /* {{{ */
	int i;

	spl_ptr_heap *heap = emalloc(sizeof(spl_ptr_heap));

	heap->dtor     = from->dtor;
	heap->ctor     = from->ctor;
	heap->cmp      = from->cmp;
	heap->max_size = from->max_size;
	heap->count    = from->count;
	heap->flags    = from->flags;

	heap->elements = safe_emalloc(sizeof(spl_ptr_heap_element),from->max_size,0);
	memcpy(heap->elements, from->elements, sizeof(spl_ptr_heap_element)*from->max_size);

	for (i=0; i < heap->count; ++i) {
		heap->ctor(heap->elements[i] TSRMLS_CC);
	}

	return heap;
}
/* }}} */

static void spl_ptr_heap_destroy(spl_ptr_heap *heap TSRMLS_DC) { /* {{{ */
	int i;

	for (i=0; i < heap->count; ++i) {
		heap->dtor(heap->elements[i] TSRMLS_CC);
	}

	efree(heap->elements);
	efree(heap);
}
/* }}} */

static int spl_ptr_heap_count(spl_ptr_heap *heap) { /* {{{ */
	return heap->count;
}
/* }}} */
/* }}} */

zend_object_iterator *spl_heap_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);

static void spl_heap_object_free_storage(void *object TSRMLS_DC) /* {{{ */
{
	int i;
	spl_heap_object *intern = (spl_heap_object *)object;

	zend_object_std_dtor(&intern->std TSRMLS_CC);

	for (i = 0; i < intern->heap->count; ++i) {
		if (intern->heap->elements[i]) {
			zval_ptr_dtor((zval **)&intern->heap->elements[i]);
		}
	}

	spl_ptr_heap_destroy(intern->heap TSRMLS_CC);

	zval_ptr_dtor(&intern->retval);

	if (intern->debug_info != NULL) {
		zend_hash_destroy(intern->debug_info);
		efree(intern->debug_info);
	}

	efree(object);
}
/* }}} */

static zend_object_value spl_heap_object_new_ex(zend_class_entry *class_type, spl_heap_object **obj, zval *orig, int clone_orig TSRMLS_DC) /* {{{ */
{
	zend_object_value  retval;
	spl_heap_object   *intern;
	zend_class_entry  *parent = class_type;
	int                inherited = 0;

	intern = ecalloc(1, sizeof(spl_heap_object));
	*obj = intern;
	ALLOC_INIT_ZVAL(intern->retval);

	zend_object_std_init(&intern->std, class_type TSRMLS_CC);
	object_properties_init(&intern->std, class_type);

	intern->flags      = 0;
	intern->fptr_cmp   = NULL;
	intern->debug_info = NULL;

	if (orig) {
		spl_heap_object *other = (spl_heap_object*)zend_object_store_get_object(orig TSRMLS_CC);
		intern->ce_get_iterator = other->ce_get_iterator;

		if (clone_orig) {
			int i;
			intern->heap = spl_ptr_heap_clone(other->heap TSRMLS_CC);
			for (i = 0; i < intern->heap->count; ++i) {
				if (intern->heap->elements[i]) {
					Z_ADDREF_P((zval *)intern->heap->elements[i]);
				}
			}
		} else {
			intern->heap = other->heap;
		}

		intern->flags = other->flags;
	} else {
		intern->heap = spl_ptr_heap_init(spl_ptr_heap_zval_max_cmp, spl_ptr_heap_zval_ctor, spl_ptr_heap_zval_dtor);
	}

	retval.handlers = &spl_handler_SplHeap;

	while (parent) {
		if (parent == spl_ce_SplPriorityQueue) {
			intern->heap->cmp = spl_ptr_pqueue_zval_cmp;
			intern->flags     = SPL_PQUEUE_EXTR_DATA;
			retval.handlers   = &spl_handler_SplPriorityQueue;
			break;
		}

		if (parent == spl_ce_SplMinHeap) {
			intern->heap->cmp = spl_ptr_heap_zval_min_cmp;
			break;
		}

		if (parent == spl_ce_SplMaxHeap) {
			intern->heap->cmp = spl_ptr_heap_zval_max_cmp;
			break;
		}

		if (parent == spl_ce_SplHeap) {
			break;
		}

		parent = parent->parent;
		inherited = 1;
	}

	retval.handle   = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, spl_heap_object_free_storage, NULL TSRMLS_CC);

	if (!parent) { /* this must never happen */
		php_error_docref(NULL TSRMLS_CC, E_COMPILE_ERROR, "Internal compiler error, Class is not child of SplHeap");
	}

	if (inherited) {
		zend_hash_find(&class_type->function_table, "compare",    sizeof("compare"),    (void **) &intern->fptr_cmp);
		if (intern->fptr_cmp->common.scope == parent) {
			intern->fptr_cmp = NULL;
		}
		zend_hash_find(&class_type->function_table, "count",        sizeof("count"),        (void **) &intern->fptr_count);
		if (intern->fptr_count->common.scope == parent) {
			intern->fptr_count = NULL;
		}
	}

	return retval;
}
/* }}} */

static zend_object_value spl_heap_object_new(zend_class_entry *class_type TSRMLS_DC) /* {{{ */
{
	spl_heap_object *tmp;
	return spl_heap_object_new_ex(class_type, &tmp, NULL, 0 TSRMLS_CC);
}
/* }}} */

static zend_object_value spl_heap_object_clone(zval *zobject TSRMLS_DC) /* {{{ */
{
	zend_object_value   new_obj_val;
	zend_object        *old_object;
	zend_object        *new_object;
	zend_object_handle  handle = Z_OBJ_HANDLE_P(zobject);
	spl_heap_object    *intern;

	old_object  = zend_objects_get_address(zobject TSRMLS_CC);
	new_obj_val = spl_heap_object_new_ex(old_object->ce, &intern, zobject, 1 TSRMLS_CC);
	new_object  = &intern->std;

	zend_objects_clone_members(new_object, new_obj_val, old_object, handle TSRMLS_CC);

	return new_obj_val;
}
/* }}} */

static int spl_heap_object_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */
{
	spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(object TSRMLS_CC);

	if (intern->fptr_count) {
		zval *rv;
		zend_call_method_with_0_params(&object, intern->std.ce, &intern->fptr_count, "count", &rv);
		if (rv) {
			zval_ptr_dtor(&intern->retval);
			MAKE_STD_ZVAL(intern->retval);
			ZVAL_ZVAL(intern->retval, rv, 1, 1);
			convert_to_long(intern->retval);
			*count = (long) Z_LVAL_P(intern->retval);
			return SUCCESS;
		}
		*count = 0;
		return FAILURE;
	}

	*count = spl_ptr_heap_count(intern->heap);

	return SUCCESS;
}
/* }}} */

static HashTable* spl_heap_object_get_debug_info_helper(zend_class_entry *ce, zval *obj, int *is_temp TSRMLS_DC) { /* {{{ */
	spl_heap_object *intern  = (spl_heap_object*)zend_object_store_get_object(obj TSRMLS_CC);
	zval *tmp, zrv, *heap_array;
	char *pnstr;
	int  pnlen;
	int  i;

	*is_temp = 0;

	if (!intern->std.properties) {
		rebuild_object_properties(&intern->std);
	}

	if (intern->debug_info == NULL) {
		ALLOC_HASHTABLE(intern->debug_info);
		ZEND_INIT_SYMTABLE_EX(intern->debug_info, zend_hash_num_elements(intern->std.properties) + 1, 0);
	}

	if (intern->debug_info->nApplyCount == 0) {
		INIT_PZVAL(&zrv);
		Z_ARRVAL(zrv) = intern->debug_info;

		zend_hash_copy(intern->debug_info, intern->std.properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));

		pnstr = spl_gen_private_prop_name(ce, "flags", sizeof("flags")-1, &pnlen TSRMLS_CC);
		add_assoc_long_ex(&zrv, pnstr, pnlen+1, intern->flags);
		efree(pnstr);

		pnstr = spl_gen_private_prop_name(ce, "isCorrupted", sizeof("isCorrupted")-1, &pnlen TSRMLS_CC);
		add_assoc_bool_ex(&zrv, pnstr, pnlen+1, intern->heap->flags&SPL_HEAP_CORRUPTED);
		efree(pnstr);

		ALLOC_INIT_ZVAL(heap_array);
		array_init(heap_array);

		for (i = 0; i < intern->heap->count; ++i) {
			add_index_zval(heap_array, i, (zval *)intern->heap->elements[i]);
			Z_ADDREF_P(intern->heap->elements[i]);
		}

		pnstr = spl_gen_private_prop_name(ce, "heap", sizeof("heap")-1, &pnlen TSRMLS_CC);
		add_assoc_zval_ex(&zrv, pnstr, pnlen+1, heap_array);
		efree(pnstr);
	}

	return intern->debug_info;
}
/* }}} */

static HashTable* spl_heap_object_get_debug_info(zval *obj, int *is_temp TSRMLS_DC) /* {{{ */
{
	return spl_heap_object_get_debug_info_helper(spl_ce_SplHeap, obj, is_temp TSRMLS_CC);
}
/* }}} */

static HashTable* spl_pqueue_object_get_debug_info(zval *obj, int *is_temp TSRMLS_DC) /* {{{ */
{
	return spl_heap_object_get_debug_info_helper(spl_ce_SplPriorityQueue, obj, is_temp TSRMLS_CC);
}
/* }}} */

/* {{{ proto int SplHeap::count() U
 Return the number of elements in the heap. */
SPL_METHOD(SplHeap, count)
{
	long count;
	spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	count = spl_ptr_heap_count(intern->heap);
	RETURN_LONG(count);
}
/* }}} */

/* {{{ proto int SplHeap::isEmpty() U
 Return true if the heap is empty. */
SPL_METHOD(SplHeap, isEmpty)
{
	spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	RETURN_BOOL(spl_ptr_heap_count(intern->heap)==0);
}
/* }}} */

/* {{{ proto bool SplHeap::insert(mixed $value) U
	   Push $value on the heap */
SPL_METHOD(SplHeap, insert)
{
	zval *value;
	spl_heap_object *intern;

	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &value) == FAILURE) {
		return;
	}

	intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	if (intern->heap->flags & SPL_HEAP_CORRUPTED) {
		zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
		return;
	}

	SEPARATE_ARG_IF_REF(value);

	spl_ptr_heap_insert(intern->heap, value, getThis() TSRMLS_CC);

	RETURN_TRUE;
}
/* }}} */

/* {{{ proto mixed SplHeap::extract() U
	   extract the element out of the top of the heap */
SPL_METHOD(SplHeap, extract)
{
	zval *value;
	spl_heap_object *intern;

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	if (intern->heap->flags & SPL_HEAP_CORRUPTED) {
		zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
		return;
	}

	value  = (zval *)spl_ptr_heap_delete_top(intern->heap, getThis() TSRMLS_CC);

	if (!value) {
		zend_throw_exception(spl_ce_RuntimeException, "Can't extract from an empty heap", 0 TSRMLS_CC);
		return;
	}

	RETURN_ZVAL(value, 1, 1);
}
/* }}} */

/* {{{ proto bool SplPriorityQueue::insert(mixed $value, mixed $priority) U
	   Push $value with the priority $priodiry on the priorityqueue */
SPL_METHOD(SplPriorityQueue, insert)
{
	zval *data, *priority, *elem;
	spl_heap_object *intern;

	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &data, &priority) == FAILURE) {
		return;
	}

	intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	if (intern->heap->flags & SPL_HEAP_CORRUPTED) {
		zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
		return;
	}

	SEPARATE_ARG_IF_REF(data);
	SEPARATE_ARG_IF_REF(priority);

	ALLOC_INIT_ZVAL(elem);

	array_init(elem);
	add_assoc_zval_ex(elem, "data",     sizeof("data"),     data);
	add_assoc_zval_ex(elem, "priority", sizeof("priority"), priority);

	spl_ptr_heap_insert(intern->heap, elem, getThis() TSRMLS_CC);

	RETURN_TRUE;
}
/* }}} */

/* {{{ proto mixed SplPriorityQueue::extract() U
	   extract the element out of the top of the priority queue */
SPL_METHOD(SplPriorityQueue, extract)
{
	zval *value, *value_out, **value_out_pp;
	spl_heap_object *intern;

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	if (intern->heap->flags & SPL_HEAP_CORRUPTED) {
		zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
		return;
	}

	value  = (zval *)spl_ptr_heap_delete_top(intern->heap, getThis() TSRMLS_CC);

	if (!value) {
		zend_throw_exception(spl_ce_RuntimeException, "Can't extract from an empty heap", 0 TSRMLS_CC);
		return;
	}

	value_out_pp = spl_pqueue_extract_helper(&value, intern->flags);

	if (!value_out_pp) {
		zend_error(E_RECOVERABLE_ERROR, "Unable to extract from the PriorityQueue node");
		zval_ptr_dtor(&value);
		return;
	}

	value_out = *value_out_pp;

	Z_ADDREF_P(value_out);
	zval_ptr_dtor(&value);

	RETURN_ZVAL(value_out, 1, 1);
}
/* }}} */

/* {{{ proto mixed SplPriorityQueue::top() U
	   Peek at the top element of the priority queue */
SPL_METHOD(SplPriorityQueue, top)
{
	zval *value, **value_out;
	spl_heap_object *intern;

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	if (intern->heap->flags & SPL_HEAP_CORRUPTED) {
		zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
		return;
	}

	value  = (zval *)spl_ptr_heap_top(intern->heap);

	if (!value) {
		zend_throw_exception(spl_ce_RuntimeException, "Can't peek at an empty heap", 0 TSRMLS_CC);
		return;
	}

	value_out = spl_pqueue_extract_helper(&value, intern->flags);

	if (!value_out) {
		zend_error(E_RECOVERABLE_ERROR, "Unable to extract from the PriorityQueue node");
		return;
	}

	RETURN_ZVAL(*value_out, 1, 0);
}
/* }}} */

/* {{{ proto int SplPriorityQueue::setIteratorMode($flags) U
 Set the flags of extraction*/
SPL_METHOD(SplPriorityQueue, setExtractFlags)
{
	long value;
	spl_heap_object *intern;

	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &value) == FAILURE) {
		return;
	}

	intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	intern->flags = value & SPL_PQUEUE_EXTR_MASK;

	RETURN_LONG(intern->flags);
}
/* }}} */

/* {{{ proto int SplHeap::recoverFromCorruption() U
 Recover from a corrupted state*/
SPL_METHOD(SplHeap, recoverFromCorruption)
{
	spl_heap_object *intern;

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	intern->heap->flags = intern->heap->flags & ~SPL_HEAP_CORRUPTED;

	RETURN_TRUE;
}
/* }}} */

/* {{{ proto bool SplPriorityQueue::compare(mixed $a, mixed $b) U
	   compare the priorities */
SPL_METHOD(SplPriorityQueue, compare)
{
	zval *a, *b;

	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &a, &b) == FAILURE) {
		return;
	}

	RETURN_LONG(spl_ptr_heap_zval_max_cmp(a, b, NULL TSRMLS_CC));
}
/* }}} */

/* {{{ proto mixed SplHeap::top() U
	   Peek at the top element of the heap */
SPL_METHOD(SplHeap, top)
{
	zval *value;
	spl_heap_object *intern;

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	if (intern->heap->flags & SPL_HEAP_CORRUPTED) {
		zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
		return;
	}

	value  = (zval *)spl_ptr_heap_top(intern->heap);

	if (!value) {
		zend_throw_exception(spl_ce_RuntimeException, "Can't peek at an empty heap", 0 TSRMLS_CC);
		return;
	}

	RETURN_ZVAL(value, 1, 0);
}
/* }}} */

/* {{{ proto bool SplMinHeap::compare(mixed $a, mixed $b) U
	   compare the values */
SPL_METHOD(SplMinHeap, compare)
{
	zval *a, *b;

	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &a, &b) == FAILURE) {
		return;
	}

	RETURN_LONG(spl_ptr_heap_zval_min_cmp(a, b, NULL TSRMLS_CC));
}
/* }}} */

/* {{{ proto bool SplMaxHeap::compare(mixed $a, mixed $b) U
	   compare the values */
SPL_METHOD(SplMaxHeap, compare)
{
	zval *a, *b;

	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", &a, &b) == FAILURE) {
		return;
	}

	RETURN_LONG(spl_ptr_heap_zval_max_cmp(a, b, NULL TSRMLS_CC));
}
/* }}} */

static void spl_heap_it_dtor(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
{
	spl_heap_it *iterator = (spl_heap_it *)iter;

	zend_user_it_invalidate_current(iter TSRMLS_CC);
	zval_ptr_dtor((zval**)&iterator->intern.it.data);

	efree(iterator);
}
/* }}} */

static void spl_heap_it_rewind(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
{
	/* do nothing, the iterator always points to the top element */
}
/* }}} */

static int spl_heap_it_valid(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
{
	spl_heap_it         *iterator = (spl_heap_it *)iter;

	return (iterator->object->heap->count != 0 ? SUCCESS : FAILURE);
}
/* }}} */

static void spl_heap_it_get_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC) /* {{{ */
{
	spl_heap_it  *iterator = (spl_heap_it *)iter;
	zval        **element  = (zval **)&iterator->object->heap->elements[0];

	if (iterator->object->heap->flags & SPL_HEAP_CORRUPTED) {
		zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
		return;
	}

	if (iterator->object->heap->count == 0 || !*element) {
		*data = NULL;
	} else {
		*data = element;
	}
}
/* }}} */

static void spl_pqueue_it_get_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC) /* {{{ */
{
	spl_heap_it  *iterator = (spl_heap_it *)iter;
	zval        **element  = (zval **)&iterator->object->heap->elements[0];

	if (iterator->object->heap->flags & SPL_HEAP_CORRUPTED) {
		zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
		return;
	}

	if (iterator->object->heap->count == 0 || !*element) {
		*data = NULL;
	} else {
		*data = spl_pqueue_extract_helper(element, iterator->object->flags);
		if (!*data) {
			zend_error(E_RECOVERABLE_ERROR, "Unable to extract from the PriorityQueue node");
		}
	}
}
/* }}} */

static void spl_heap_it_get_current_key(zend_object_iterator *iter, zval *key TSRMLS_DC) /* {{{ */
{
	spl_heap_it *iterator = (spl_heap_it *)iter;

	ZVAL_LONG(key, iterator->object->heap->count - 1);
}
/* }}} */

static void spl_heap_it_move_forward(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
{
	zval                 *object   = (zval*)((zend_user_iterator *)iter)->it.data;
	spl_heap_it          *iterator = (spl_heap_it *)iter;
	spl_ptr_heap_element elem;

	if (iterator->object->heap->flags & SPL_HEAP_CORRUPTED) {
		zend_throw_exception(spl_ce_RuntimeException, "Heap is corrupted, heap properties are no longer ensured.", 0 TSRMLS_CC);
		return;
	}

	elem = spl_ptr_heap_delete_top(iterator->object->heap, object TSRMLS_CC);

	if (elem != NULL) {
		zval_ptr_dtor((zval **)&elem);
	}

	zend_user_it_invalidate_current(iter TSRMLS_CC);
}
/* }}} */

/* {{{  proto int SplHeap::key() U
   Return current array key */
SPL_METHOD(SplHeap, key)
{
	spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	RETURN_LONG(intern->heap->count - 1);
}
/* }}} */

/* {{{ proto void SplHeap::next() U
   Move to next entry */
SPL_METHOD(SplHeap, next)
{
	spl_heap_object      *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
	spl_ptr_heap_element  elem   = spl_ptr_heap_delete_top(intern->heap, getThis() TSRMLS_CC);

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	if (elem != NULL) {
		zval_ptr_dtor((zval **)&elem);
	}
}
/* }}} */

/* {{{ proto bool SplHeap::valid() U
   Check whether the datastructure contains more entries */
SPL_METHOD(SplHeap, valid)
{
	spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	RETURN_BOOL(intern->heap->count != 0);
}
/* }}} */

/* {{{ proto void SplHeap::rewind() U
   Rewind the datastructure back to the start */
SPL_METHOD(SplHeap, rewind)
{
	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}
	/* do nothing, the iterator always points to the top element */
}
/* }}} */

/* {{{ proto mixed|NULL SplHeap::current() U
   Return current datastructure entry */
SPL_METHOD(SplHeap, current)
{
	spl_heap_object *intern  = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
	zval            *element = (zval *)intern->heap->elements[0];

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	if (!intern->heap->count || !element) {
		RETURN_NULL();
	} else {
		RETURN_ZVAL(element, 1, 0);
	}
}
/* }}} */

/* {{{ proto mixed|NULL SplPriorityQueue::current() U
   Return current datastructure entry */
SPL_METHOD(SplPriorityQueue, current)
{
	spl_heap_object  *intern  = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
	zval            **element = (zval **)&intern->heap->elements[0];

	if (zend_parse_parameters_none() == FAILURE) {
		return;
	}

	if (!intern->heap->count || !*element) {
		RETURN_NULL();
	} else {
		zval **data = spl_pqueue_extract_helper(element, intern->flags);

		if (!data) {
			zend_error(E_RECOVERABLE_ERROR, "Unable to extract from the PriorityQueue node");
			RETURN_NULL();
		}

		RETURN_ZVAL(*data, 1, 0);
	}
}
/* }}} */

/* iterator handler table */
zend_object_iterator_funcs spl_heap_it_funcs = {
	spl_heap_it_dtor,
	spl_heap_it_valid,
	spl_heap_it_get_current_data,
	spl_heap_it_get_current_key,
	spl_heap_it_move_forward,
	spl_heap_it_rewind
};

zend_object_iterator_funcs spl_pqueue_it_funcs = {
	spl_heap_it_dtor,
	spl_heap_it_valid,
	spl_pqueue_it_get_current_data,
	spl_heap_it_get_current_key,
	spl_heap_it_move_forward,
	spl_heap_it_rewind
};

zend_object_iterator *spl_heap_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC) /* {{{ */
{
	spl_heap_it     *iterator;
	spl_heap_object *heap_object = (spl_heap_object*)zend_object_store_get_object(object TSRMLS_CC);

	if (by_ref) {
		zend_throw_exception(spl_ce_RuntimeException, "An iterator cannot be used with foreach by reference", 0 TSRMLS_CC);
		return NULL;
	}

	Z_ADDREF_P(object);

	iterator                  = emalloc(sizeof(spl_heap_it));
	iterator->intern.it.data  = (void*)object;
	iterator->intern.it.funcs = &spl_heap_it_funcs;
	iterator->intern.ce       = ce;
	iterator->intern.value    = NULL;
	iterator->flags           = heap_object->flags;
	iterator->object          = heap_object;

	return (zend_object_iterator*)iterator;
}
/* }}} */

zend_object_iterator *spl_pqueue_get_iterator(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC) /* {{{ */
{
	spl_heap_it     *iterator;
	spl_heap_object *heap_object = (spl_heap_object*)zend_object_store_get_object(object TSRMLS_CC);

	if (by_ref) {
		zend_throw_exception(spl_ce_RuntimeException, "An iterator cannot be used with foreach by reference", 0 TSRMLS_CC);
		return NULL;
	}

	Z_ADDREF_P(object);

	iterator                  = emalloc(sizeof(spl_heap_it));
	iterator->intern.it.data  = (void*)object;
	iterator->intern.it.funcs = &spl_pqueue_it_funcs;
	iterator->intern.ce       = ce;
	iterator->intern.value    = NULL;
	iterator->flags           = heap_object->flags;
	iterator->object          = heap_object;

	return (zend_object_iterator*)iterator;
}
/* }}} */

ZEND_BEGIN_ARG_INFO(arginfo_heap_insert, 0)
	ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_heap_compare, 0)
	ZEND_ARG_INFO(0, a)
	ZEND_ARG_INFO(0, b)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_pqueue_insert, 0)
	ZEND_ARG_INFO(0, value)
	ZEND_ARG_INFO(0, priority)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_pqueue_setflags, 0)
	ZEND_ARG_INFO(0, flags)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO(arginfo_splheap_void, 0)
ZEND_END_ARG_INFO()

static const zend_function_entry spl_funcs_SplMinHeap[] = {
	SPL_ME(SplMinHeap, compare, arginfo_heap_compare, ZEND_ACC_PROTECTED)
	{NULL, NULL, NULL}
};
static const zend_function_entry spl_funcs_SplMaxHeap[] = {
	SPL_ME(SplMaxHeap, compare, arginfo_heap_compare, ZEND_ACC_PROTECTED)
	{NULL, NULL, NULL}
};

static const zend_function_entry spl_funcs_SplPriorityQueue[] = {
	SPL_ME(SplPriorityQueue, compare,               arginfo_heap_compare,    ZEND_ACC_PUBLIC)
	SPL_ME(SplPriorityQueue, insert,                arginfo_pqueue_insert,   ZEND_ACC_PUBLIC)
	SPL_ME(SplPriorityQueue, setExtractFlags,       arginfo_pqueue_setflags, ZEND_ACC_PUBLIC)
	SPL_ME(SplPriorityQueue, top,                   arginfo_splheap_void,    ZEND_ACC_PUBLIC)
	SPL_ME(SplPriorityQueue, extract,               arginfo_splheap_void,    ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap,          count,                 arginfo_splheap_void,    ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap,          isEmpty,               arginfo_splheap_void,    ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap,          rewind,                arginfo_splheap_void,    ZEND_ACC_PUBLIC)
	SPL_ME(SplPriorityQueue, current,               arginfo_splheap_void,    ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap,          key,                   arginfo_splheap_void,    ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap,          next,                  arginfo_splheap_void,    ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap,          valid,                 arginfo_splheap_void,    ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap,          recoverFromCorruption, arginfo_splheap_void,    ZEND_ACC_PUBLIC)
	{NULL, NULL, NULL}
};

static const zend_function_entry spl_funcs_SplHeap[] = {
	SPL_ME(SplHeap, extract,               arginfo_splheap_void, ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap, insert,                arginfo_heap_insert, ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap, top,                   arginfo_splheap_void, ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap, count,                 arginfo_splheap_void, ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap, isEmpty,               arginfo_splheap_void, ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap, rewind,                arginfo_splheap_void, ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap, current,               arginfo_splheap_void, ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap, key,                   arginfo_splheap_void, ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap, next,                  arginfo_splheap_void, ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap, valid,                 arginfo_splheap_void, ZEND_ACC_PUBLIC)
	SPL_ME(SplHeap, recoverFromCorruption, arginfo_splheap_void, ZEND_ACC_PUBLIC)
	ZEND_FENTRY(compare, NULL, NULL, ZEND_ACC_PROTECTED|ZEND_ACC_ABSTRACT)
	{NULL, NULL, NULL}
};
/* }}} */

PHP_MINIT_FUNCTION(spl_heap) /* {{{ */
{
	REGISTER_SPL_STD_CLASS_EX(SplHeap, spl_heap_object_new, spl_funcs_SplHeap);
	memcpy(&spl_handler_SplHeap, zend_get_std_object_handlers(), sizeof(zend_object_handlers));

	spl_handler_SplHeap.clone_obj      = spl_heap_object_clone;
	spl_handler_SplHeap.count_elements = spl_heap_object_count_elements;
	spl_handler_SplHeap.get_debug_info = spl_heap_object_get_debug_info;

	REGISTER_SPL_IMPLEMENTS(SplHeap, Iterator);
	REGISTER_SPL_IMPLEMENTS(SplHeap, Countable);

	spl_ce_SplHeap->get_iterator = spl_heap_get_iterator;

	REGISTER_SPL_SUB_CLASS_EX(SplMinHeap,           SplHeap,        spl_heap_object_new, spl_funcs_SplMinHeap);
	REGISTER_SPL_SUB_CLASS_EX(SplMaxHeap,           SplHeap,        spl_heap_object_new, spl_funcs_SplMaxHeap);

	spl_ce_SplMaxHeap->get_iterator = spl_heap_get_iterator;
	spl_ce_SplMinHeap->get_iterator = spl_heap_get_iterator;

	REGISTER_SPL_STD_CLASS_EX(SplPriorityQueue, spl_heap_object_new, spl_funcs_SplPriorityQueue);
	memcpy(&spl_handler_SplPriorityQueue, zend_get_std_object_handlers(), sizeof(zend_object_handlers));

	spl_handler_SplPriorityQueue.clone_obj      = spl_heap_object_clone;
	spl_handler_SplPriorityQueue.count_elements = spl_heap_object_count_elements;
	spl_handler_SplPriorityQueue.get_debug_info = spl_pqueue_object_get_debug_info;

	REGISTER_SPL_IMPLEMENTS(SplPriorityQueue, Iterator);
	REGISTER_SPL_IMPLEMENTS(SplPriorityQueue, Countable);

	spl_ce_SplPriorityQueue->get_iterator = spl_pqueue_get_iterator;

	REGISTER_SPL_CLASS_CONST_LONG(SplPriorityQueue, "EXTR_BOTH",      SPL_PQUEUE_EXTR_BOTH);
	REGISTER_SPL_CLASS_CONST_LONG(SplPriorityQueue, "EXTR_PRIORITY",  SPL_PQUEUE_EXTR_PRIORITY);
	REGISTER_SPL_CLASS_CONST_LONG(SplPriorityQueue, "EXTR_DATA",      SPL_PQUEUE_EXTR_DATA);

	return SUCCESS;
}
/* }}} */

/*
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 * vim600: fdm=marker
 * vim: noet sw=4 ts=4
 */

redpajama_set_name: RedPajamaGithub


text:
Home / Insights / "The New 20% Pass-Through ...
"The New 20% Pass-Through Deduction – Potential Traps and Planning Opportunities" at the Zicklin School of Business at Baruch College
Norman Lencz will present "The New 20% Pass-Through Deduction – Potential Traps and Planning Opportunities" at the Executive Taxation Series of the Zicklin School of Business at Baruch College in New York City on November 5, 2018. The presentation will address the historic changes to the tax landscape for pass-through entities resulting from last year's tax reform legislation, with a focus on planning tips and ideas to maximize use of the new 20% pass-through deduction, as well as an in-depth analysis of the impact of the new rules on the "choice-of-entity" decision.
SECURE 2.0 Has Arrived – Here's What You Need to Know
California Improves Its SALT Cap Work-Around
New York's SALT Workaround: New Guidance, Affected Industries, and What to Know Before the October 15, 2021 Deadline


A safe, supportive atmosphere in which moms work together to adjust to the "new normal" that arrives alongside motherhood.
Island of Hope is a Bloom Certified Peer-to-Peer Support Group facilitated by Monika Cancilla .
Email for more information islandofhope.alameda@gmail.com.


text:
Bernhard Weiss (Berlijn, 30 juli 1880 – Londen, 29 juli 1951) was een Duitse jurist en politiefunctionaris. Hij was van 1927 tot 1932 de vicecommissaris bij de Berlijnse politie en had het in deze functie vaak aan de stok met de opkomende Nationaalsocialistische Duitse Arbeiderspartij. Hij werd vooral vanwege zijn Joodse afkomst een mikpunt van spot en vluchtte een paar dagen voor de machtsovername van de nazi's naar het buitenland.

Levensloop
Weiss groeide op in een liberaal-Joods gezin. Hij studeerde rechten. Tijdens de Eerste Wereldoorlog vocht hij mee in het Duitse leger en bracht het tot de rang van kapitein. Voor zijn inzet kreeg hij het IJzeren Kruis  (Eerste klasse). Tijdens de oorlog verloor hij een broer die in het gevecht omkwam.

De jurist was actief binnen de Joodse gemeenschap. Zo was Weiss bestuurslid van het Rabbijnse seminarie en actief binnen een mensenrechtenorganisatie die opkwam voor de belangen van de Duitse Joden, maar tegelijkertijd streefde naar een goede integratie van de Joodse gemeenschap in de Duitse maatschappij.

Weiss stond tevens bekend als een uitstekend jurist, voordat hij toetrad tot de Berlijnse politie. In 1918 werd hij benoemd tot tweede man van de Berlijnse Kriminalpolizei. In 1925 werd hij benoemd tot het hoofd van deze dienst. Weer twee jaar later werd hij de tweede man in rang van de gehele Berlijnse politie. Weiss was tevens lid van de Deutsche Demokratische Partei. Hij speelde een belangrijke rol in de na de Eerste Wereldoorlog nieuw gevormde Weimar Republiek. De democratie stond onder druk vanuit zowel linkse (communisten) als rechte hoek (nazi's). Zo werd Walter Rathenau, een Joodse industrialist en politicus, in 1922 vermoord. Als minister van Buitenlandse Zaken had hij twee maanden eerder het Verdrag van Rapallo getekend. Weiss was nauw betrokken bij de opsporing van de daders. Ook leverde hij het bewijs van staatsondermijnende activiteiten van een handelsdelegatie afkomstig uit de Sovjet-Unie.

Weiss verbood in 1927 de Berlijnse afdeling van de NSDAP, omdat partijleden regelmatig gewelddadig waren naar andersdenkenden. In hetzelfde jaar arresteerde hij vijfhonderd nazi's die met de trein terugkwamen van een partijbijeenkomst in Neurenberg vanwege het lidmaatschap van een illegale organisatie. Door zijn optreden werd Weiss het doelwit van Joseph Goebbels, op dat moment gauleiter van de Nazipartij in Berlijn. Goebbels gaf de krant Der Angriff uit en was zeer antisemitisch in zijn uitlatingen. Hij gaf Weiss de bijnaam Isidor. Isidor was een Joodse naam en werd door Goebbels gebruikt om te suggereren dat Weiss zijn voornaam had verduitst. Weiss werd – in negatieve zin – neergezet als stereotype Jood en werd afgeschilderd als een laf, achterbaks en lachwekkend figuur, die bovendien symbool stond voor de Joodse hegemonie in het "systeem". Op zijn beurt klaagde Weiss Goebbels aan vanwege laster. Hij won de rechtszaak, maar Goebbels trok zich weinig aan van de veroordeling. Uiteindelijk klaagde Weiss hem meer dan veertig keer aan. Goebbels kreeg meerdere malen hoge boetes opgelegd.

Onder druk van de NSDAP onthief rijkskanselier Franz von Papen Weiss in 1932 uit zijn functie. Een paar dagen voordat Adolf Hitler aan de macht kwam (januari 1933) kreeg de politie van Berlijn de opdracht hun oud-collega te arresteren. Op het moment dat de politie zijn huis bezocht was hij met zijn dochter Hilda bij familie op bezoek. Daar werd hij in de kolenkelder verstopt om ontdekking te voorkomen. Met behulp van een vriend bereikte hij Tsjecho-Slowakije. Zijn vrouw reisde hem achterna. De Duitse regering ontnam hem zijn staatsburgerschap en nam zijn vermogen in beslag.

Weiss belandde uiteindelijk in Groot-Brittannië. Daar begon hij een kantoorwinkel. Kort nadat hij in 1951 zijn Duitse paspoort had terug gekregen overleed hij aan kanker. Zijn vrouw Lotte keerde terug naar Berlijn waar ze een jaar later overleed. Een plein bij het Station Berlin Friedrichstraße en een plein vlak bij de Alexanderplatz in het centrum van Berlijn zijn naar Weiss vernoemd.

Duits Holocaustoverlevende
Duits politiefunctionaris

redpajama_set_name: RedPajamaWikipedia