Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
BEFORE THE NATIONAL GREEN TRIBUNAL PRINCIPAL BENCH NEW DELHI ..............
M.A. No.685 of 2013 and M.A. No.708 of 2013 in ORIGINAL APPLICATION NO. 171 OF 2013 In the matter of :
National Green Tribunal Bar Association .....Petitioner Versus
1. The Secretary, Ministry of Environment & Forests Through Secretary, Paryavaran Bhawan, CGO Complex, Lodhi Road, New Delhi
2. The Chief Secretary, Govt. of Andhra Pradesh, Secretariat Building, Hyderabad-500001
3. The Chief Secretary, Govt. of Arunachal Pradesh, Secretariat Itanagar-791111
4. The Chief Secretary, Govt. of Assam, Block-C, 3rd Floor, Secretariat, Guwahati-781006
5. The Chief Secretary, Govt. of Bihar, Old Sectt., Patna-800015
6. The Chief Secretary, Govt. of Chhattisgarh, Room No.207, D.K.S. Bhavan, Mantralaya Raipur-492001
7. The Chief Secretary, Govt. of Goa, Secretariat, Porvoriam-403001 (Goa) 1
8. The Chief Secretary, Govt. of Gujarat, 3rd Floor, Block No.1, New Sachivalaya Complex, Gandhinagar-382010
9. The Chief Secretary, Govt. of Haryana, Secretariat, Chandigarh-160001
10. The Chief Secretary, Govt. of Himachal Pradesh, Secretariat, Shimla-171001
11. The Chief Secretary, Govt. of Jammu & Kashmir, Civil Secretariat, Srinagar-190001
12. The Chief Secretary, Govt. of Jharkhand, Secretariat, Ranchi-834001
13. The Chief Secretary, Govt. of Karnataka, Vidhan Soudha, Bengaluru-560001
14. The Chief Secretary, Govt. of Kerala, Secretariat, Thiruvanthapuram
15. The Chief Secretary, Govt. of Maharashtra, Room No.518, 5th Floor, Main Building, Mantralaya, Mumbai-400032
16. The Chief Secretary, Govt. of Madhya Pradesh, Vallabh Bhavan, Bhopal-462003
17. The Chief Secretary, Govt. of Manipur, Room No.171, South Block, Secretariat, Imphal-795001 2
18. The Chief Secretary, Govt. of Meghalaya, Main Secretariat Bldg., Shillong-793001
19. The Chief Secretary, Govt. of Mizoram, Block-C, Civil Secretariat, Aizawal-796001
20. The Chief Secretary, Govt. of Nagaland, Secretariat, Kohima-797001
21. The Chief Secretary, Govt. of NCT of Delhi, New Secretariat Bldg., I.P. Estate, New Delhi-110002.
22. The Chief Secretary, Govt. of Odisha, General Admn. Deptt., Odisha Secretariat, Bhubaneshwar-751001
23. The Chief Secretary, Govt. of Puducherry, No.1, Beach Road, Puducherry-605001
24. The Chief Secretary, Govt. of Punjab, Punjab Civil Secretariat, Chandigarh-160001
25. The Chief Secretary, Govt. of Rajasthan, Secretariat, Jaipur-302005
26. The Chief Secretary, Govt. of Sikkim, Tashiling Secretariat, Gangtok-737101
27. The Chief Secretary, Govt. of Tamil Nadu, Secretariat, Chennai-600009 3
28. The Chief Secretary, Govt. of Tripura, Civil Secretariat, Agartala-799001
29. The Chief Secretary, Govt. of Uttar Pradesh, Lal Bahadur Shastri Bhavan, U.P. Secretariat Lucknow-226001
30. The Chief Secretary, Govt. of Uttarakhand, Uttarakhand Secretariat, 4-B, Shubhash Road, Dehradun-248001
31. The Chief Secretary, Govt. of West Bengal, Writers' Building, Kolkata-700001
32. The Chief Secretary, U.T. of Andaman & Nicobar Islands, Secretariat, Portblair-744101
33. The Adviser to Administrator, U.T. of Chandigarh, Secretariat, Sector 9, Chandigarh-160001
34. The Administrator, U.T. of Dadra & Nagar Haveli, Secretariat, Silvasa-396230
35. The Administrator, U.T. of Daman & Diu, Fort Area, Secretariat, Moti Daman-396220
36. The Administrator, U.T. of Lakshadweep, Secretariat, Kavaratti-682555
37. State Level Environment Impact Assessment Authority, Directorate of Environment, State of Uttar Pradesh, Dr. Bhim Rao Ambedkar Paryavaran Parisar, Vineet Khand-I, Gomti Nagar, Lucknow-226010 4
38. Geological Survey of India, 3rd Floor, A-Wing, Shastri Bhawan, New Delhi-110001
39. The Director, Department of Geology & Mining, State of Uttar Pradesh, Kanij Bhawan, 27/8, Ram Mohan Rai Marg, Lucknow-226001
40. The Engineer-in-Chief, Department of Irrigation, State of Uttar Pradesh, New Planning Bhavan, Toilibagh, 3rd Floor, Lucknow-226001
41. The Member-Secretary, Central Pollution Control Board, Parivesh Bhawan, CBD-cum-Office Complex, East Arjun Nagar, Delhi-110032
42. The Member-Secretary, Uttar Pradesh State Pollution Control Board, Picup Bhawan, 2nd Floor, B-Block, Vibhuti Khand, Gomti Nagar, Lucknow-226010
43. The District Magistrate, Gautam Budha Nagar, Noida-201301
44. The Superintendent of Police, Gautam Budha Nagar, Noida-201301
45. The Ministry of Mining, Shastri Bhawan, New Delhi-110001
46. Mr. Vishal Agarwal, S/o Late Sri Nahar Singh, 12/10, Ashirwad Enclave Ballupur, Dehradun ..............................................Respondents 5 And In the matter of:
The State of Madhya Pradesh Through the Secretary Department of Mineral Resources, Government of Madhya Pradesh .............Review Applicant Counsel for Appellants :
Mr. Abhimanue Shrestha, Advocate Counsel for Respondents :
Ms. P.B. Singh for Respondent No.1 Mr. Pranab Prakash, Advocate for Respondent No.2 Mr. Avijit Roy, Advocate for Respondent No. 3 Mr. C.D. Singh, Mr. Ayushman Shrivastava and Mr. Abhisheky Bose, Advocate s for Respondents No.5 & 15 Mr. Devender Pratap & Mr. Vineet Malik, Advocates for Respondent No.8 Mr. Suryanarayana Singh, AAG for Respondent No.9 Mr. Jogi Scaria, Advocate for Respondent No.13 Mr. Atul Batra, Advocate for Respondent No.14 Mr. Sapam Biswajit, Advocate for Respondent No.16 Ms. Anibem Potsangbam, and Mr. Pragyan Pradip Sharma Advocates for Respondent No.18 Mr. Shibashish Misra and Mr. Suvinay Dash Advocates for Respondent No.21 Mr. Anil Soni, AAG for Respondent No.23 Mr. Manish Singhvi, Advocate for Respondent No.24 Ms. Aruna Mathur, Advocate for Respondent No.25 Mr. Abdul Saleem, Advocate for Respondent No.26 Mr. Pranab Prakash, Advocate for Respondent No.27 Ms. Savitri Pandey, Advocate for Respondents No.28, 36, 38, 42 & 43 Ms. Neelam Singh & Mr. Rahul Verma, Advocates for Respondent No.29 Mr. Bikash Kar Gupta, Advocate for Respondent No.30 Mr. V. Jagdishvaran and Mr. Balasubramaniam, Advocates for Respondent No.31 Mr. Alok Kumar, Advocate for Respondents No.33 & 34 Mr. Gaurav Bhatia, AAG & Mr. B. Banerjee, Advocate for Respondent No.38 & 40 Mr. Daleep Kr. Dhyani, Advocate for Respondent No.41 Mr. Naman Nagrath, Sr. Adv. With Mr. Harsh Parashar, Adv. In M A No. 708/2013 ORDER/JUDGMENT PRESENT :
Hon'ble Mr. Justice Swatanter Kumar (Chairperson) Hon'ble Mr. Justice U.D. Salvi (Judicial Member) Hon'ble Dr. D.K. Agrawal (Expert Member) 6 Hon'ble Mr. B.S. Sajwan (Expert Member) Hon'ble Dr. R.C.Trivedi (Expert Member) Dated : November 28, 2013 JUSTICE SWATANTER KUMAR, (CHAIRPERSON) Miscellaneous Application No.708 of 2013 has been filed by the M.P. State Mining Corporation Ltd., Government of Madhya Pradesh, praying for intervention and for being heard in Misc. Application No.685 of 2013 filed by the Department of Mineral Resources, Government of Madhya Pradesh. This Corporation was permitted to intervene and was heard by the Tribunal at length during the course of hearing of MA No.685 of 2013. This application stands allowed.
2. In M.A. No.685 of 2013, filed in the Registry of the Tribunal on 13th August, 2013, the applicant-State of Madhya Pradesh is praying for modification of the orders of the Tribunal dated 5th August, 2013 and 6th August, 2013. The applicant-State of Madhya Pradesh, had challenged these orders before the Supreme Court in Civil Appeals No.6786 and 6787 of 2013, which were disposed of by a Bench of the Supreme Court, vide its order dated 16th August, 2013, which reads as under:
"Appeals are admitted.
2. By order dated 5th August 2013, the National Green Tribunal, Principal Bench, New Delhi, while issuing notice in O.A. No. 277 of 2013 (NGT Bar Association & Other v. Ministry of Environment & Forests and others), passed an interim order restraining the partner/Company/Authority to carry out any mining activity or remove sand from river beds anywhere in the country without obtaining the environmental clearance 7 from the Ministry of Environment & Forests/SEIAA and license from the competent authorities.
3. It has been brought to our notice by Mr. Tankha learned Senior Counsel appearing for the appellant-State of Madhya Pradesh that under the Madhya Pradesh Mines and Minerals Rules, 1956 as amended in exercise of powers under sub-Section (i) to Section 15 of the Mines and Minerals Development Act, 1957 the District Level Environment Committee is an authority to give clearance and license for mining minerals including sand, for lands less than 5 hectares. He submitted that although Interlocutory Application No. 685 of 2013 has been moved before the National Green Tribunal for modification of the order dated 5th August, 2013 so as to include the District Level Environmental Committee as an authority in addition to MOEF/SEIAA to give clearance/licence, no order has been passed in the said IA by the Tribunal and as a result the sand mining activity in the entire State of Madhya Pradesh has come to a standstill and consequently, a lot of connected business activities have been adversely affected.
4. Considering the aforesaid submission made by Mr. Tankha instead of entertaining these appeals, we request the National Green Tribunal, Principal Bench New Delhi to take up IA No. 685 of 2013 and pass orders thereon in accordance with law, if possible within a week from today.
The appeals stand disposed of in the above terms."
3. After the above order was passed by the Supreme Court, the matter came up for hearing of the above application before the Tribunal on 23rd August, 2013. On that date, an adjournment was sought by the learned counsel appearing for the applicant and the Tribunal passed the following order in MA No.685 of 2013:
"The Learned Counsel appearing for the Applicant submits that she is not in a position to place the Order passed by the Hon'ble Supreme Court of India before us and prays that the Application be listed for hearing on adjourned date.
We may notice that we have asked the Learned Counsel to argue the matter as it was reported in the paper that the Hon'ble Supreme Court has observed that the 8 Tribunal should deal with this Application within a period of one week. However, keeping in view the request made on behalf of the Learned Counsel appearing for the Applicant the matter is adjourned to 29th August, 2013 the date already fixed."
4. Thereafter the matter came up for hearing on 29th August, 2013 on which day the arguments were again heard. The matter was adjourned on that date for 19th September, 2013 for arguments as the learned counsel appearing for various non-applicants prayed for time to file their respective replies and they were granted one week's time to do the needful. The arguments were heard in part on 19th September, 2013 and stood concluded on 24th September, 2013, the date on which this application was reserved for judgment.
5. The case of the applicant in the present application is that the Supreme Court of India had passed various directions in relation to mining of minerals and sand in the case of Deepak Kumar and Others v. State of Haryana on 27th February, 2013 [2012(4) SCC 629]. Vide communication dated 16th May, 2011, the State Governments were asked to comply with the Model Guidelines, 2010 issued by the Ministry of Environment and Forests (for short the "MoEF") as well as the draft rules i.e. the Minor Minerals (Conservation and Development) Rules, 2010 (for short the "Minor Mineral Rules"). The State of Madhya Pradesh filed an application for extension of time for compliance with the directions, as contained in the order of the Supreme Court, and the same was permitted. Thereafter, the State of Madhya Pradesh in 9 May, 2013 submitted the compliance report. It is claimed by the State of Madhya Pradesh that the States of Madhya Pradesh and Rajasthan are primarily the only States to have complied with the orders of Supreme Court and enacted the amended rules. The State of Madhya Pradesh further submits that it has strictly been monitoring compliance with these rules and upon detection of any illegal mining activity, appropriate action is taken against the wrong-doer and also if it is found that any mining operation is carried out against the mandate of law including non-compliance with the conditions of environmental clearances, strict action is being taken including closing down the operations of the unit and imposing heavy penalties, as mandated under law. The State of Madhya Pradesh had detected a total of 3147 cases of illegal extractions during 2008-2013 and about 27732 illegal vehicles carrying material extracted through illegal mining have been confiscated during the said period. An amount of Rs.3867.67 lakhs has been collected by the State Government as fine and penalty for illegal sand mining activities.
6. It was further contended by the applicant herein that an application has been filed before the Tribunal with regard to the State of Uttar Pradesh where large scale illegal mining without prior environmental clearance was being carried out. The Tribunal had passed the following orders on 5th August, 2013 and 6th August, 2013 and these read as under:
5th August, 2013:
10 "The contention raised before us is that large scale illegal and impermissible mining activity is going on, on the bank of Yamuna, Ganga, Chambal, Gaumti and Revati amongst others. This removal of minerals from the river beds is causing serious threat to the flow of the river, forests upon river bank and most seriously to the environment of these areas. All these 3 aspects are covered under Schedule - I of the National Green Tribunal Act, 2010 (NGT Act, 2010). It is further contended that in terms of the Orders of the Hon'ble Supreme Court of India in the case of Deepak Kumar Vs. State of Haryana, even the person carrying on mining activity in less than 5 hectares, are expected to take EIA Clearance from MoEF/SEIAA. Besides holding the above, the Hon'ble Supreme Court of India clearly stated that sand mining on either side of the rivers, upstream and in-stream, is one of the causes for environmental degradation and also a threat to the biodiversity. The contention is also that majority of persons carrying out the mining activity of removing mineral from the river bed have no license to extract sand, they also have not obtained clearance from MoEF/SEIAA at any stage in terms of the Environment (Protection) Act, 1986 (EP Act, 1986) as well as Air (Prevention and Control of Pollution) Act, 1981 and Water (Prevention and Control of Pollution) act, 1974. Besides violations of law, the mining activity is being carried out on a large scale, causing State revenue loss which may be running into lakhs of crores of Rupees. For the reasons aforestated, we find merits in this Petition which raises substantial environmental issues and questions arising directly from the implementation of the EP Act, 1986 and other Acts under Schedule - I of NGT Act, 2010. Thus, squarely this Petition falls within the ambit of Section 14 of NGT Act, 2010. Resultantly, we issue Notice to all the Respondents by registered post/ acknowledgment due and Dasti as well and email. Notice returnable on 14th August, 2013. In the meantime, we restrain any person, company, authority to carry out any mining activity or removal of sand, from river beds anywhere in the country without obtaining Environmental Clearance from MoEF/SEIAA and license from the competent authorities The Deputy Commissioners, Superintendent of Police and Mining Authorities of all the States are directed to ensure compliance of these directions."
6th August, 2013 "At the oral request of the learned counsel appearing for the Applicant the amended Memo of Parties is permitted to be taken on record.
Let Notice be issued to all the Respondents in furtherance to our Order dated 5th August, 2013 by registered post/acknowledgment due, Dasti and by e-mail as well.
Let the Chief Secretaries/Administrators of all the States be also informed of this Order for its proper implementation. 11
Liberty to serve to the Learned counsel appearing for the respective States before the Tribunal is granted.
Stand over to 14th August, 2013"
7. It is the case of the applicant-State that as a result of the above orders, even legal mining activity which has all the necessary approvals as per the applicable statutory provisions, is required to be shut down if it does not have approval of MoEF or State Environment Impact Assessment Authority (for short 'SEIAA'). The Environment Clearance (EC) has to be given by the District Level Environmental Committee as per the State law and because of the directions of the Tribunal, the mining activity has been adversely affected and is causing grave economic and developmental crisis. The State of Madhya Pradesh has thus, filed an appeal in the Supreme Court in terms of Section 22 of the NGT Act. In substance, the case of the applicant-State of Madhya Pradesh is that the State of Madhya Pradesh, in exercise of its powers conferred by sub- section (1) of Section 15 of the Mines and Mineral (Development & Regulation) Act, 1957 (for short the "Act of 1957"), amended/added/substituted Rules 42 to 49 and 68, inter alia, of the Madhya Pradesh Minor Mineral Rules, 1996 vide Notification dated 23rd March, 2013 and incorporated the report of the Group dated March, 2010 constituted by MoEF titled "Environmental Aspects of Quarrying of Minor Minerals - Evolving of Model Guidelines" and the draft Minor Minerals Rules issued by the MoEF. As per the amendment dated 23rd March, 2013, under Rule 18(2) of the Madhya Pradesh Minor Minerals Rules, 1996, the 12 applicant would be required to submit environmental permission in terms of the Notification dated 14th September, 2006 of MoEF within six months only for the grant of quarry lease by the sanctioning authority for an area of more than five hectares. As per notification dated 23rd March, 2013, under Section 15(1) of the Act of 1957, under the amended Rule 49 of the Madhya Pradesh Minor Mineral Rules, a District Level Environmental Committee has been constituted which can grant or refuse environment management plan of quarry lease and trade quarry under Rules 49 and 50 of the amended Madhya Pradesh Minor Mineral Rules and mandatory measures are required to be adopted for protection of environment. Thus, it is contended that the District Level Environment Committee is competent to give environmental clearance for carrying on of mining activity in areas less than five hectares and therefore, the order should be modified to include the District Level Environment Committee in addition to MoEF and SEIAA as competent authorities to grant EC. This is precisely the prayer of the applicant-State of Madhya Pradesh in this application. The application has been opposed on behalf of MoEF as well as some other parties. Having heard the learned counsel of the parties, we are of the considered view that the following questions of law need to be answered by the Tribunal:
Whether in face of the Notification of 2006 and the law of the land, stated in the Deepak's Kumar's case (supra), the State Government was competent in enacting a law in constituting and 13 empowering District Level Environmental Committee to grant EC for carrying on mining of minerals and sand in less than 5 ha. of area?
8. To answer this question, we must examine the legislative scheme behind both the Environmental (Protection) Act 1986 (for short the 'Act of 1986') and the Act of 1957.
9. The Act of 1986 was enacted to provide for protection and improvement of environment and for matters connected therewith. The decisions that were taken at the United Nation's Conference on the Human Environment held at Stockholm in June 1972, in which India was a participant country, required the countries to take appropriate steps for protection and improvement of Human Environment. The Act of 1986 specifically states in its objects and reasons that although there are existing laws dealing directly or indirectly with several environmental matters, it is necessary to have a general legislation for environmental protection. Existing laws generally focus on specific types of pollution or specific categories of hazardous substances. However, some major areas of environmental hazards are still not covered and there also exist uncovered lacunae in the areas of major environmental hazards. There are inadequate linkages in handling matters of industrial and environmental safety. Control mechanisms to guard against slow insidious build-up of hazardous substances, especially new chemicals in the environment are weak. Therefore, due to multiplicity of regulatory agencies, there was a need for an authority which could assume the lead role for studying, planning and implementing long term requirements of environmental safety 14 and give a direction to, and co-ordinate a system of speedy and adequate response to emergency situations threatening the environment.
10. Thus, in view of the above situation/scenario and the urgency manifested in the same, enactment of a general legislation on environmental protection was pertinent which inter alia, enabled co-ordination of activities of the various regulatory agencies, creation of an authority or authorities with adequate powers for environmental protection, regulation of discharge of environmental pollutants and handling of hazardous substances and provided for deterrent punishment to those who endangered human environment, safety and health. And consequently came into being the Act of 1986. It is thus clear that this was the law enacted with the intent and object of regulating the environment and all its fields and was to be the paramount law in relation to the environment. Such legislative intention is further demonstrated under the provisions of Section 5 of the Act of 1986 which uses a non- obstante clause and commands that the directions issued by the Central Government would take prevalence over the law in force. In exercise of powers conferred under Sections 6 and 25 of the Act of 1986, the Central Government framed the rules namely, the Environmental Protection Rules 1986 (for short the "Rules of 1986"). These rules were framed primarily to carry out the purposes of the Act of 1986. Further, in exercise of the powers vested in terms of Rule 5 (3)(d) of the Rules of 1986 read with Sub- section (1) and clause (v) of sub-Section 2 of Section 3 of the Act of 15 1986 and in supersession of its earlier Notifications, the Central Government framed regulations being Environmental Clearance Regulations, 2006 (for short the "Notification of 2006") dealing with the various facets of controlling and preventing the environmental pollution. Inter-alia, one of the most significant features of the Notification of 2006 was that the various industries listed in the Schedule to the Notification had to seek prior environmental clearance from the regulating authorities, which under Regulation 8 then were required to consider the recommendations of the EAC or SEAC and convey its decision on the application of an applicant for grant and/or refusal of environmental clearance for a project which falls under any of the entries stated in the Schedule to the Notification of 2006 and the regulations 2 and 7 of the Notification of 2006. Thus the central law provided as to the specific requirement of an applicant to obtain environmental clearance for carrying on an activity or project of the specified kind. Entry 1 (a) of this Schedule of Regulations of 2006 deals with mining of minor or major minerals. The said entry reads as under:
Project Category with threshold limit Conditions if or any Activity A B 1 Mining, extraction of natural resources and power generation
(for a specified production capacity) (1) (2) (3) (4) (5) 1(a) (i) Mining of > 50 ha of <50 ha 5> General minerals mining lease of mining conditions shall area in lease area apply Note: (i)
(ii) Slurry pipe- respect of in respect Prior lines (coal lignite non-coal of non- environmental and other ores) mine lease. coal mine clearance is as passing through lease. well required at 16 national > 150 ha of the stage of parks/sanctuari mining lease <150 ha renewal of mine es/coral reefs, area in >5 ha of lease for which ecologically respect of mining application sensitive areas. coal mine lease area should be made lease. in respect up to one year of coal prior to date of Asbestos mine renewal.
mining lease. (ii) Mineral irrespective of prospecting is mining area. exempted. All projects
11. The above entry thus shows that carrying out a mining activity i.e. mining extraction of natural resources in an area of more than or equal to 50 hectares would be a category A project while mining activity in an area of less than 50 hectares but more than 5 hectares would be a category B project but under both these categories, the applicant is required to obtain clearance (under category 'A' from MoEF while under category B from SEIAA). Moreover, even less than 50 hectares and more than 5 hectares of mining lease area in respect of non-coal mines would require clearance from the SEIAA. Also as per the amendment to the Notification of 2006 dated 9th September, 2013 issued by the MoEF, that amended Part 1 (a) of the Schedule to the Notification of 2006, stated that mining of minor minerals in land leases less than 5 ha will not be allowed with clearance from the SEIAA. The amended Notification reads as under:
Project Category with threshold limit Conditions if
or any
Activity
A B
17
1 Mining, extraction of natural resources and power generation
(for a specified production capacity) (1) (2) (3) (4) (5) 1(a) (i) Mining of > 50 ha of < 50 ha General minerals. mining lease of mining conditions shall area in lease area apply except for respect of in projects or non-coal respect of activity of less mine lease. minor that 5 ha of minerals mining lease
(ii) Slurry pipe- mine area of minor lines (coal lignite lease; minerals:
and other ores) and passing through Provided that national <50 ha >5 the above parks/sanctuari > 150 ha of of mining exception shall es/coral reefs, mining lease lease area not apply for ecologically area in in respect project or sensitive areas. respect of of non- activity if the coal mine coal mine sum total of the lease. lease. mining lease area of the said 150 ha >5 project or Asbestos ha of activity and that mining mining of existing mines irrespective of lease area and mining mining area. in respect projects which of coal were accorded All projects mine environment lease. clearance and are located within 500 metres from the periphery of such project ort activity equals or exceeds 5 ha. Note: Prior environmental clearance is required at the stage of renewal of mine lease for which application shall be made up to 18 two years prior to date due for renewal. Further, a period of two years with effect from the 4th April, 2011 is provided for obtaining environmental clearance for all those mining leases, which were operating as on the 4th April 2011 with requisite valid environmental clearance and which have fallen due for renewal on or after 4th November, 2011: Provided that no fresh environmental clearance shall be required for a mining project or activity at the time of renewal of mining lease, which has already obtained environmental clearance under this notification. (ii) Mineral prospecting is exempted. 19
12. The applicants in the main application while avoiding to comply with the restrictions of environmental laws were adopting unfair methods for carrying on the activities of extraction of minor minerals, particularly sand. Such applicants used to carry out this activity in various separate, yet adjacent blocks of less than 5 hectares thus eventually totalling upto a much larger area than 5 ha. This was being done to carry on mining activity on a large scale but by getting licence/lease deeds executed for the areas less than 5 hectares. Thus, while they were complying with the provisions of the Act of 1957, they were patently violating the provisions of the Act of 1986 and the Notification of 2006. This resulted in intervention by the highest court of the land in the case of Deepak Kumar (supra), wherein the Supreme Court, by a detailed judgment, put a check on continuation of such unfair and unjust practices. This practice was not only environmentally injurious but was even causing financial loss to the States concerned or the Centre. The Supreme Court thus inter alia held as under:
"27. The State of Haryana and various other States have not so far implemented the above recommendations of the MoEF or the guidelines issued by the Ministry of Mines before issuing auction notices granting short term permits by way of auction of minor mineral boulders, gravel, sand etc., in the river beds and elsewhere of less than 5 hectares. We, therefore, direct to all the States, Union Territories, MoEF and the Ministry of Mines to give effect to the recommendations made by MoEF in its report of March 2010 and the model guidelines framed by the Ministry of Mines, within a period of six months from today and submit their compliance reports.
28. The Central Government also should take steps to bring into force the Minor Minerals Conservation and Development Rules 2010 at the earliest. State Governments and UTs also should take immediate steps to frame necessary rules under Section 15 of the Mines and Minerals (Development and Regulation) Act, 1957 taking into consideration the 20 recommendations of MoEF in its Report of March 2010 and model guidelines framed by the Ministry of Mines, Govt. of India. Communicate the copy of this order to the MoEF, Secretary, Ministry of Mines, New Delhi, Ministry of Water Resources, Central Government Water Authority, the Chief Secretaries of the respective States and Union Territories, who would circulate this order to the concerned Departments concerned.
29. We, in the meanwhile, order that leases of minor mineral including their renewal for an area of less than five hectares be granted by the States/Union Territories only after getting environmental clearance from the MoEF.
Ordered accordingly."
13. With the passing of the above order, authorities and Governments concerned had no option but to take steps to stop such unfair practices being carried out and to prevent circumventing of the law by unfair traders. Now, any person wanting to carry on the activities of mining in respect of non-coal mines irrespective of the area of the mining lease was required to take environmental clearance from the authority concerned i.e. MoEF at the central level or SEIAA at the State level. This law is enforceable with all its rigours all over the country and all States were subject to the same.
'Environment' is not stated as a field of legislation in any of three Lists of Schedule VII to our Constitution. Thus it is only the Indian Parliament which is vested with the power to legislate in that regard with the aid of Entry 97 of the Union List. This Residuary Entry in List I states that with respect to any matter not enumerated in Lists II or III including any tax not mentioned in either of those Lists, it is the Union Parliament that is competent to legislate in regard to such subject. On the other hand, the field of 21 mines and development of minerals is specifically covered under List I of the Union List. Entry 54 of the said List reads as follows:
"Regulation of mines and minerals development to the extent to which such regulation and development under the control of the Union is declared by Parliament by law to be expedient in the public interest."
14. A bare reading of the above Entry shows that it concerns itself to enacting law in relation to regulation on Mining & Minerals Development to the extent the same is under the control of the Union and is so declared by Parliament by law to be expedient in the public interest. In other words, the Union Parliament is competent to enact laws regulating the mines and minerals development which fall under its control and are so stated by the Parliament. Once it is so stated and law is enacted under either of the two (regulation of mines and mineral development),the field would be covered by the Central law.
15. As already noticed, under List II, the State cannot legislate in the field of environment laws for absence of prescribed field. Entry 6 of this List provides a field for the State legislature to enact laws in relation to public health, sanitation, hospital and dispensaries, etc. Though not strictly but public health is one of the consequential facets of environmental jurisprudence. Entry 23 of the List that relates to regulation of mines and minerals reads as under:
"Regulation of mines and mineral development subject to the provisions of List I with respect to regulation and development under the control of the Union."22
16. In the present case, we are not concerned with Entry 6 of List II. The State can legislate under Entry 23 of the same List but subject to the limitations prescribed therein. The field of legislation by the State in regard to framing of regulations in relation of mining and mineral development is subject to limitation i.e. the law enacted by the Union Parliament under Entry 54 of List I. Parliament may by itself or through subordinate legislation may frame laws. This would cover the field and the law, if any, framed by the State with the aid of Entry 23 of List II and such State law would have to be read and construed subject to the Central law.
17. The Union Parliament enacted the Act of 1957. This Act was enacted to provide for regulation of mines and development of minerals under the control of the Union. Section 2 of this Act declared that it was expedient in the public interest that the Union should take control and provide for regulation of mines and development of minerals to the extent it was stated in the Act. Minerals included all minerals except mineral oil in terms of Section 3(a) of the Act of 1957. Mining lease means a lease granted for the purposes of undertaking mining operation and includes a sub lease granted for such purpose. Section 3(d) of the Act of 1957 defines mining operation to be any operation undertaken for the purposes of winning of minerals. Under the provisions of this Act of 1957, no person shall undertake any prospecting of mining operations in any area except in accordance with the terms and conditions of a prospecting licence or a mining lease granted under this Act as well as subject to the Rules framed thereunder, as the case may be. The 23 scheme of the Act of 1957 primarily deals with grant of licence or mining lease, terms & conditions of its continuation and for termination purposes for which such licence could be granted, the royalty payable in that regard and the manner in which application for grant of such licence lease is to be moved and processed. Importantly, Section 13 empowers the Central Government to make Rules in respect of minerals, which may relate to any of the subjects stated in Sub-sections 2 (a) to 2 (r) of Section 13 of the Act of 1957. The Rules so framed must relate to the subjects stated in that Section. A cumulative reading of these provisions shows that the Rules could primarily relate to the regulations of mines, grant or termination of licence/lease, payment of fee and the period within which such applications need to be dealt with. Under Section 17 of the Act of 1957, the Central Government itself can undertake prospecting or mining operations on certain lands in consultation with the State Government concerned. Section 18 of the Act of 1957 concerns itself with the development of minerals, and casts a duty on the Central Government to take necessary steps in that regard guided by the provisions made under Sub-sections 2 (a) to 2
(h) of Section 18 of the Act of 1957.
18. Section 15 of the Act of 1957 empowers the State Government to make rules in respect of minor minerals. However, these rules could be made for regulating the grant of quarry leases, mining leases or other mineral on cessions in respect of minor minerals or for purposes connected therewith. Section 15 of the Act of 1957 is the source of legislative competence of the State in regard 24 to framing of MP Minor Mineral Rules. The Parliament in its wisdom and keeping in view the Constitutional provisions, specifically provided for a window of subordinate legislation. But for such statutory delegation, the State might not have been able to frame Rules in face of the restrictive Entry contained under Entry 23 of List II. The power to frame Rules has to be regulated within the statutorily prescribed limitations. The State Government would not be able to frame Rules with the aid of Section 15 of the Act of 1957 on the subjects that fall outside the ambit of that Section.
19. Prior to 1972, there was no specific provision in the Act of 1957 specifically dealing with environment. It was by amending the Act of 1957, that Section 4(A) was introduced in it. As already noticed, Section 4 of the Act of 1957 had placed a restriction that no such activity could be carried on without licence or lease of mining and Section 4(A) of the Act of 1957 even provided for premature termination of the licence or mining lease. The reason for such premature termination, inter alia, could be for preservation of natural environment control of floods, prevention of pollution or to avoid danger to public health, etc. Section 18 of the Act of 1957 was also amended to take note that duty of the Central Government for conservation and systematic development of minerals was also coupled with the steps to be taken for protection of environment or control of any pollution which may be caused by prospecting or mining operations. For the first time, these provisions indicated the legislative concern for environment making preservation of environment and controlling pollution important considerations 25 while granting mining lease or licence and terminating the same. Despite these amendments, the provisions of Section 15 of the Act remained static and were not amended. In furtherance to the powers vested in State Government under Section 15 of the 1957 Act, the State of Madhya Pradesh enacted the MP Minor Mineral Rules 1996. These Rules provided for the matters specified under Section 15 and the matters connected thereto. These Rules, in their original form, did not deal with the concept of environmental clearance in relation to carrying on of mining activity under a licence or lease.
20. From the above legislative history of all these enactments, it is clear that when the legislature enacted the Act of 1986, it was fully conscious and aware of the existing enactments, i.e. the Act of 1957 and other prevalent laws. Despite existing laws, the legislature in its wisdom, did not opt to amend the Act of 1957 or any other existing law in relation to mining of minor minerals, and in fact, proceeded to enact the Act of 1986. The Rules of 1986 and the Notification of 2006 provided for specific environmental concerns and aimed at controlling environmental pollution while permitting the carrying on of mining activity and made it mandatory for the person carrying on mining activity to obtain environmental clearance from either of the authorities i.e. MoEF and SEIAA depending upon the category the particular project fell in. It is a settled cannon of statutory interpretation that legislature while enacting new laws is presumed to be aware of all existing laws and the legislative intent behind their enactment. Once the legislative 26 intent is explicitly specified in enacting a new law then the Courts must give full implementation to the law. The clear intention of the legislature is a relevant factor for the Courts to interpret and apply the law in a given case.
21. Declaring its dictum with reference to above laws, the Supreme Court in the case of M.C. Mehta v. Union of India, [(2009) 6 SCC 142] while referring to the precautionary principle and the need for regulating mining operations in view of the environmental concerns and also to prevent environmental degradation, held as under:
"In the past, when mining leases were granted, requisite clearances for carrying out mining operations were not obtained which have resulted in land and environmental degradation. Despite such breaches, approvals were granted for subsequent slots because in the past the authorities had not taken into account the macro effect of such wide-scale land and environmental degradation caused by absence of remedial measures (including rehabilitation plan). Time has now come, therefore, to suspend mining in the Aravalli hill range till statutory provisions for restoration and reclamation are duly complied with, particularly in cases where pits/quarries have been left abandoned.
Environment and ecology are national assets. They are subject to intergenerational equity. Time has now come to suspend all mining in the said area on sustainable development principle which is part of Articles 21, 48-A and 51-A(g) of the Constitution of India.
Mining within the principle of sustainable development comes within the concept of "balancing" whereas mining beyond the principle of sustainable development comes within the concept of "banning". It is a matter of degree. Balancing of the mining activity with environment protection and banning such activity are two sides of the same principle of sustainable development."
22. After the above dictum, the Supreme Court also considered the matter in terms of protection of environment and control of pollution with regard to mining of minor minerals, in the 27 case of Deepak Kumar (supra), wherein the Court specifically held that lease in relation to mining of minor minerals even in regard to areas less than 5 hectares, should be granted by the State only after getting clearance from MoEF. In paragraph 22 of this judgment, the Supreme Court noticed the instructions issued by MoEF in the form of recommendations for their incorporation in the Rules framed under Section 15 of the Act of 1957. All these instructions/ recommendations primarily related to the size of the mining lease and the requirements for carrying the mining activity, however, environmental issues were also touched upon in that paragraph. These model Rules of 2010 were considered vital by the Supreme Court from environmental, ecological and biological points of view. All these recommendations were stated to be relevant for the purposes of framing Rules under Section 15 of the 1957 Act and to achieve the objective of that Act. Despite all these directions, the Supreme Court culled out a specific order in relation to obtaining environmental clearance for such projects in paragraph 29 of the judgment. It may be useful to notice here that the Model Rules of 2010 did not deal with the grant of environmental clearance. However, it did contemplate preparation of a regional environmental assessment and regional environmental management plan for the purposes of environmental clearance. These Rules also specifically provided for restoration, reclamation and rehabilitation in clusters.
23. The legislature is supreme in its own sphere under the Constitution subject to Parliamentary limitations provided in the Constitution itself. The legislature enacted the Act of 1957 as well 28 as the Act of 1986. In furtherance to the powers conferred by the latter enactment, the Notification of 2006 came into existence. All these are statutory documents and have to be given complete and full effect to. The extraction of minor minerals, like that of major minerals, can invite rigours of environmental law. The Supreme Court in the case of Deepak Kumar (supra), while noticing that quarrying of river sand is an important economic activity in the country with river sand forming a crucial raw material for the infrastructure development and for the construction industry; excessive instream sand and gravel mining causes degradation of rivers. It lowers the stream bottom of rivers which may lead to bank erosion. Having noticed this aspect, the Court in para 20 of this judgment observed, with regard to the report submitted before it, that the report clearly indicated, that operation of mining of minor minerals needed to be subjected to strict regulatory parameters as that of mining of major minerals. The Court even suggested at expanding the definition of 'minor minerals'. In the current times, the minor mineral extraction activity has to be regulated to ensure that no degradation of environment is caused. This squarely means that the environmental laws are to be applied with all their rigours by the authorities stated under the provisions of the Act of 1986. The provisions of the Act of 1986, and the Notification of 2006 along with the judgment of the Supreme Court, clearly mandate that all activity of mining of minerals (sand) irrespective of the area would require environmental clearance from MoEF / SEIAA prior to operating the mining activity. Section 15 of the Act of 1957, as 29 already discussed at some length, gives limited power to the State Government to frame rules for regulating grant of lease or licence for quarrying of mines or minerals in respect of minor minerals. It will be difficult to give a liberal or wider meaning to the language of Section 15 of the Act of 1957 on the principle of plain interpretation. It is particularly so in face of the specific legislations on the subject of environment i.e. the Act of 1986, the Rules of 1986 and the Notification of 2006. The Union Parliament is competent to legislate and has so enacted these laws. It is only by virtue of delegated legislation under Section 15 of the Act of 1957 that the State Government can frame rules, which thus, must be construed strictly and subject to the provisions of the Section. The competence of the State legislature to regulate mining activity in terms of Entry 23 of List II is subject to the law enacted by the Parliament under entry 54 of List I. Thus, in no way can the State enact a law which would be in conflict with or would change the very course of the law laid down by the Centre. This conflict between the provisions of the amended rules of 2013 and the Notification of 2006 may lead to the very fundamental attack as to the legislative competence of the provisions.
24. The Supreme Court's direction for preparation of environmental plans has to be construed as a plan which would be in consonance with the existing law. Such plan cannot run contra to or be in conflict with the Central law. The contention of the State that in view of Rules 42 to 49 and 68 of the Rules of 2013, the environmental clearance would be granted by the District Level 30 Committee is unsustainable. The environmental clearance under the Central law can only be granted by the MoEF or SEIAA, depending upon the category of the project that comes up for consideration of these authorities. The State is vested with no power to change the system with regard to the grant of environmental clearance under law. The consideration and grant of environmental clearance is statutorily regulated by the Notification of 2006. The State Government would not be competent to alter or completely give a go-by to the said statutory procedure and methodology and assume to itself any authority appointed by it to grant environmental clearance. The environmental clearance has to be granted by the authority specified under the Central law.
25. We may also notice that Rules 42 to 49 and 68 are intended to and have to be construed so as to make the authorities responsible for granting lease or licence for mining, aware of the environmental facets. An applicant is to make the mining plan with complete information in regard to its impact on the environment as required under these rules and the District Level Environment Committee so constituted is subsequently to grant lease or licence in accordance with these rules. These rules are incapable of any other interpretation. By amending these rules, the State Government could not be permitted to entirely wipe out the impact, effect and procedure prescribed under the Central law. The District Level Environmental Committee has to perform its functions under the Act of 1957 and the rules. Neither the Act of 1957 nor the rules framed by the State vest any power in the State Government with 31 regard to environmental clearance. Thus, the appropriate way to read and interpret these Sections would be that such powers are to be exercised in relation to environment but primarily for the purposes of granting or refusing mining leases or licences.
26. Another contention raised on behalf of the State of Madhya Pradesh is that grant of environmental clearance by MoEF or SEIAA, as the case may be, is causing serious stagnation in the way of granting of permission, lease or licence for carrying on the activity of mining of minor minerals in the State. This is resulting in financial loss. Firstly, it is affecting the economy of the State and secondly, it is hampering the developmental projects.
27. Before we dwell upon this issue, we must notice that the observation of the Supreme Court requiring stringent regulation of mining of minerals is fully justified even by the facts disclosed by the State in its application. There have been a large number of cases of illegal mining in the State and huge amounts have to be recovered on account of penalty, charges etc. This itself shows that by the grant of mining leases/licences under its regulations, there has been huge illegal mining with great revenue loss to the State. The argument advanced by the State is self-destructive. Stringent regulation of mining of minerals is required. Due care, caution and prevention should be taken to ensure that no degradation of environment takes place. The objection that there being stagnation as well as delay in grant of EC is a mere administrative issue. Inconvenience is normally never a ground for changing the interpretation of law or reading words into a statute. The 32 administrative difficulty can be resolved by MoEF in consultation with the State by creating larger number of committees (SEIAA) at the State level to ensure that applications for environmental clearance for mining of minerals are dealt with expeditiously and no stagnation on any front takes place as a result thereof.
28. In view of the above discussion, particularly the judgment of the Supreme Court in Deepak Kumar's case (supra) and the notification of 2013, we find no merits in this application. The same is dismissed in the facts and circumstances of the case. However, we leave the parties to bear their own costs.
Justice Swatanter Kumar Chairperson Justice U.D. Salvi Judicial Member Dr. D.K. Agrawal Expert Member B.S.Sajwan Expert Member Dr. R.C. Trivedi Expert Member New Delhi November 28, 2013 33


Updating storyboard strings
I use Storyboard to present UI in iOS applications, all work fine. However, when I update the UI, it’s hard to update the releated localization strings, I usually don’t know what strings should be added and translated. It must be a easier way to do this.
Base internationalization
Let’s take a look at the Apple definition: “Base internationalization separates user-facing strings from .storyboard and .xib files. It relieves localizers of the need to modify .storyboard and .xib files in Interface Builder. Instead, an app has just one set of .storyboard and .xib files where strings are in the development language—the language that you used to create the .storyboard and .xib files. These .storyboard and .xib files are called the base internationalization. When you export localizations, the development language strings are the source that is translated into multiple languages.”
The key benefits of using base internationalization is we just modify a storyboard for all languages, all localization strings are sperated in different files.
ibtools to generate new strings
When you update the UI, such as add view controllers, you need to update the storyboard strings. ibtools is the tool to generate strings from Storyboard. Use the following code to generate a new strings
ibtool --export-strings-file new_file.strings file.storyboard
Now, we have two strings files for the same storyboard. One is file.strings, the other is new_file.strings. We also have some other file.strings in different langugages directories. What we should do is finding out the differences between new_file.strings and file.strings and updating the different strings to other language file.strings. If we do this manually, it’s very hard to find out the differences. Therefore, we need tools. The Localization Suite(http://www.loc-suite.org/) is a free tool to do such jobs.
You should copy the new_file.strings to the default language folder and replace the old one, then open the Localization suite, you can synchronize the strings, which is very easy.


Configures the Prompt console.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --height | CSS Unit Expression | No | Specifies the height of the Prompt console in CSS units (200px, 50%, 30pt, etc.). If you only pass one argument to the config command, Prompt will assume that argument is the height. In that case you do not need to explicitly use --height |
config 50%
| [Height of Console gets set to 50% of the window height. |


Michael Marino
I'm a full-stack web developer (in training) specialized in frontend and backend development for complex, scalable web apps. I enjoy web development, spending time with my wife, and 3d Printing. I have a facination for technology and computers.
Want to know how I may help your project? Check out my portfolio and resume.Contact Me
View Resume
What I do
I have more than 5 years experience building rich web applications for clients all over the world. Below is a quick overview of my main technical skill sets and tools I use.
Javascript/jQuery
JavaScript and Jquery is part of my standard workflow. I have of experience with object oriented programming. Web and REST APIs.
HTML, CSS, Bootstrap
Utilizing CSS, bootstrap, and Materialize is part of my standard workflow. I have of experience with CSS3 Animations and Jquery Slider/Calenders.
Node.js, npm, Express and Handlebars
I know node.
SQL, Sequelize, Mongo
I have used SQL and MySQL in many dashboard projects
Git, Github
I know how to use GIT and terminal. As well as NPM and package installers.
Visual Studio Code, Heroku
Knowledge of this powerful code software is essentil.
Featured Projects
Tech Blog
CMS-style blog site similar to a Wordpress site, where developers can publish their blog posts and comment on other developers’ posts as well.
View Github View ProjecteCommerce Backend
Project provides the back end for an e-commerce site by modifying starter code. Configured Express.js API to use Sequelize to interact with a MySQL database.
View GithubUltimate Sports Tracker
A web app that allows sports enthusiasts to find data, facts, events, shopping, etc. around their favorite sports.
View Github View ProjectWeather Dashboard
Used JavaScript to call REST APIs to create a weather dashboard that provides users with current and future weather forecasts. The dashboard also saves the users search history, which can be retreieved when browser is closed.
View Github View ProjectRecent Blog Posts
Blog Post 1
Babies are coming! Are you prepared?
Blog Post 2
Spreadsheets and such.
Blog Post 3
3D printing whatnot.


Plurr is a cross-platform format specification + libraries for handling plurals/genders/conditionals.
MIME types defined: text/x-plurr.
text/x-plurr


Puck Setup
View Log
Wi-Fi Network Name
This Puck needs to connect to the internet to check your Imgur account for reputation changes. Please choose an Access Point that can connect to the internet.
{SSIDLIST}
Wi-Fi Password
If your Access Point needs a password or passphrase to connect, type that in here.
My Name
After Setup is complete, you can reconnect to this Puck at any time by connecting to the Access Point this Puck will create. The newly created Access Point will be called the name you type in here.
My Password
The Access Point this Puck creates will be protected using this password. Make sure you remember it! If you ever forget your password, you will have to press the Reset button and reset the Puck to its factory settings, then run Setup again.
Imgur Account
This Puck is configured to connect to Imgur and monitor the Reputation of any user. Please type the Imgur username of the user you wish to monitor here. If the Puck cannot retrieve the user's name, the middle dot will blink red and yellow. Please doublecheck the user name matching their name on Imgur exactly.
Save Changes
Press Save to save the settings above to the Puck. The Puck will restart and create an Access Point. The Access Point's name will be the name typed in above. Connect to this newly created Access Point and point your browser to http://<IP_ADDRESS> to access the Puck's dashboard and manage settings. If you need to restore the Puck to factory settings, press the Reset button on the Puck.


IMF recommends Pakistan to establish Federal Revenue Agency for tax collection
by https://www.facebook.com/dunyanewsISLAMABAD (Dunya News) – The International Monetary Fund (IMF) has recommendation the federal government of Pakistan to establish the Federal Revenue Agency to collect taxes from across the country.
The global moneylender believes that collection of taxes will be more efficient if the revenue agency is formed and maintains that it should collect taxes at provincial and district level.
Thereby, taxpayers will not have to travel to federal, province and district tax offices and all taxes at federal, provincial and district level will be collected at the same place.
The IMF has further recommended that the center could return the taxes to the provinces and districts after collecting it at one place.
In Pakistan, taxpayers are required to fill 47 tax forms and so it is essentially required to simplify tax forms filling and submission process and its collection.
With the recommendation, the IMF maintains that any form of tax can be collected at any tax office across the country.


AP Top Entertainment News at 8:17 a.m. EST
by EndPlayNew award to honor arts and activism named after Lena Horne
Domingo to sing at 100th anniversary Salzburg Festival
BMI honors Dwight Yoakam, top country songwriters
People magazine names John Legend as 2019 Sexiest Man Alive
LSU-Alabama game a big winner for CBS over the weekend
Singer Andrea Bocelli: 'Absurd' to shun opera legend Domingo
De Niro named Screen Actors Guild life achievement honoree
'We love you, Alex!' Contestant on 'Jeopardy!' moves Trebek


Main Scripts
The scripts present in the main_code directory are described in this section.
calculations.py
Calculations.
This script contains different sections, each of which generates the data and the plot of a calculation. Comment the quotation marks by using hashtags to run the calculations.
Contents:
Visualization
Kwant system
Density u^2 - v^2
Energy Spectrum
Tight-binding spectrum
Microscopic spectrum
Spectrum comparison
Momentum at the Fermi level k0
k0 v.s. nu
k0 v.s. Z at various fillings
Andreev Transmission and Hole Probability
tau v.s. theta_qh at various fillings
tau v.s. theta_sc at various fillings
fh_p v.s. Z at various fillings
Downstream conductance
Conductance comparison
Track states
nu_crit v.s. mu_qh/delta
Asymptotic nu_crit v.s. mu_sc/mu_qh
Asymptotic nu_crit v.s. Z
Finite-temperature
Momentum difference v.s. energy
tau v.s. energy
Finite-temperature tight-binding conductance v.s. L
Finite-temperature tight-binding conductance v.s. L at various temperatures
The resulting data and plots are saved in the ‘files‘ directory.
manuscript_figures.py
This script generates the figures as used in the manuscript.
The resulting plots are saved in the ‘figures‘ directory.


Evolution of a Prototypal Language User
- Fresh out of Java or C++, learning JavaScript. Look up on the internets how to define a class. It doesn’t quite work. Avoid the “new” keyword, because it is dangerous.
- Learn about prototypes. Design constructors that work how you expect. Re-introduce “new” into your code. Note: Many programmers stop here. And that is fine.
- Learn about Object.create, Object.getPrototypeOf. Mix and match constructors with just “raw” Object prototype usage. Monkey-patch native prototypes. Use prototypes to do everything.
- Come back to sanity. Use constructors+prototypes to define objects, but use Plain Old Functions more often. Prefer composition to “is-a” inheritance, but use is-a when it makes sense. Use
new
and prototypes to create objects that all extend the same prototype, because, well, why not? - Re-read the Gang of Four book that you once thought was so inspiring. Grok how the “class” pattern is just a special case of disciplined prototype re-use. Realize that prototypal inheritance makes a lot of those patterns trivial, and it’s a bit silly to spend so much time on them.
- Begin to notice actual applications that are best moduled with prototype chains. (Branching recursive file-system walks, configuration object overriding, inheritance trees, etc.)
I’m really wondering what’s next on this list.
The great thing about enlightenment is that it doesn’t end. It is continually extending itself in multiple non-overlapping directions.


Developing applications using modern technologies and practices like DevOps requires more than simply understanding a programming language like Python or Javascript. Experience and skill with source control, container technologies, collaboration services, and build bots is also needed.
imapex 101 is an intensive hands-on training program designed to jump start new developers with a foundation in DevOps practices. The training material is designed to introduce a concept, provide basic hands-on examples, and challenges to reinforce the material.
The learning modules and labs used within imapex 101 are a subset of training material developed by the imapex community. All modules and labs are available at github.com/imapex-training.
Approximately 90 minutes
Developing software involves much more than simply programming languages and APIs. In this module we will explore four topics that are fundamental to any successful development project.
Approximately 120 minutes
This hands on module is designed to provide you with some experience with several important utility tools and technologies which are very important and time saving. We will cover Basic Linux Tools, Markdown, and several Python topics.
Approximately 180 minutes
Git and GitHub remain the most popular source control platforms for developers today. We will review the basics of git repository creation and interaction, before moving into topics including branches, pull requests, issues, and forking in this hands-on module.
Approximately 120 minutes
Docker, continues to be a major aspect of modern development practices and deployment strategies. Topics discussed in this hands-on module include Dockerfile creation, registry options, the meaning and use of tags, and auto-build repositories.
 The module begins with foundational knowledge about CICD, and end with a guided lab where a full pipeline is constructed and tested.
Approximately 90 minutes
Application developers need a modern infrastructure stack (or cloud) to deploy onto. In this module students are shown how to consume several leading Open Source tools including Marathon/Mesos, Consul and Traefik for deploying their applications onto a Mantl.io stack.
Approximately 60 minutes
Good demo applications should be easy to deploy, use and contribute code to. This means focus up front on questions like "How will others deploy my application?", "How can I quickly and easily test application changes?", and "What is my MVP and how can I build it fast!" are critical. In this module we'll suggest an approach to the building applications.
Finding time to set aside for training can be difficult, so the imapex 101 program has been designed to be compact and intensive. Each module quickly covers the relevant concepts and spends the marjority of time with guided hands on lessons and exercises. Though each organizer can adjust as needed, the suggested agenda targets a 3 day training block.
* Times listed are only guidelines. Each module could go shorter or longer depending on discussion and challenges
Ending Day 2 by bringing in food and drinks during the "Open Mic" session is a great way to decompress after 2 solid days of focused work.


|
mk.webfactory.dz.converter.currency.core.ConversionResult |
A result of an exchange rate conversion.
|
|
mk.webfactory.dz.converter.currency.core.Currency |
Currency representation. tagId is used as unique identifier; always uppercase.
|
|
mk.webfactory.dz.converter.currency.core.CurrencyConverter |
Main point for using this module.
Given an ExchangeRateProvider, calculates exchange rates.
|
|
mk.webfactory.dz.converter.currency.core.ExchangeRateData |
Holds Rates against a base currency.
|
|
mk.webfactory.dz.converter.currency.core.ExchangeRateProvider |
Source of data for the CurrencyConverter.
|
|
kotlin.Float (extensions in package mk.webfactory.dz.converter.currency.core) |
|
|
mk.webfactory.dz.converter.currency.core.FromToCurrencyPair |
A FROM -> TO pair of currencies. Used for convenience.
|
|
mk.webfactory.dz.converter.currency.core.Rate |
Base class for representing an exchange rate.
The rate can be basic containing only the middleRate
or extended containing the buying and selling rate.
|
|
mk.webfactory.dz.converter.currency.core.RateNotAvailableException |
Thrown when a rate can not be calculated.
|


Portfolio
My Projects
Project 1
This is the 1st project I worked on at Grand Circus.
Project 2
This is my 2nd project.
Project 3
This is my 3rd project.
Project 4
This is my 4th project.
Project 5
This is my 5th project.
Project 6
This is my 6th project.
Project 7
This is my 7th project.
Project 8
This is my 8th project.
Project 9
This is my 9th project.


public final class OtherMath
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
OtherMath.BiasGain
A wrapper around
barronSpline(float, float, float) to use it as an Interpolation. |
| Modifier and Type | Method and Description |
|---|---|
static float |
barronSpline(float x,
float shape,
float turning)
A generalization on bias and gain functions that can represent both; this version is branch-less.
|
static float |
cbrt(float x)
An approximation of the cube-root function for float inputs and outputs.
|
static byte |
centralize(byte v)
Given a byte, pushes any value that isn't extreme toward the center of the 0 to 255 range, and keeps extreme
values (such as the channel values in the colors max green or black) as they are.
|
static double |
probit(double d)
A way of taking a double in the (0.0, 1.0) range and mapping it to a Gaussian or normal distribution, so high
inputs correspond to high outputs, and similarly for the low range.
|
public static float barronSpline(float x, float shape, float turning)
x
- progress through the spline, from 0 to 1, inclusiveshape
- must be greater than or equal to 0; values greater than 1 are "normal interpolations"turning
- a value between 0.0 and 1.0, inclusive, where the shape changespublic static byte centralize(byte v)
v
- a byte value that will be treated as if in the 0-255 range (as if unsigned)v
that is more often near the center of the range than the extremespublic static double probit(double d)
Random.nextGaussian()
). If this is given an input of 0.0
or less, it returns -38.5, which is slightly less than the result when given Double.MIN_VALUE
. If it is
given an input of 1.0 or more, it returns 38.5, which is significantly larger than the result when given the
largest double less than 1.0 (this value is further from 1.0 than Double.MIN_VALUE
is from 0.0). If
given Double.NaN
, it returns whatever Math.copySign(double, double)
returns for the arguments
38.5, Double.NaN
, which is implementation-dependent. It uses an algorithm by Peter John Acklam, as
implemented by Sherali Karimov.
Original source.
Information on the algorithm.
Wikipedia's page on the probit function may help, but
is more likely to just be confusing.
double
that's exclusive on 1.0, it won't produce a result higher than
8.209536145151493
, and will only produce results of at least -8.209536145151493
if 0.0 is
excluded from the inputs (if 0.0 is an input, the result is 38.5
). A chief advantage of using this with
a random number generator is that it only requires one random double to obtain one Gaussian value;
Random.nextGaussian()
generates at least two random doubles for each two Gaussian values, but may rarely
require much more random generation.d
- should be between 0 and 1, exclusive, but other values are toleratedpublic static float cbrt(float x)
Math.cbrt(double)
. It
correctly returns negative results when given negative inputs.
x
- any finite float to find the cube root of


Advanced Operators
In addition to the operators described in Basic Operators, Swift provides several advanced operators that perform more complex value manipulation. These include all of the bitwise and bit shifting operators you will be familiar with from C and Objective-C.
Unlike arithmetic operators in C, arithmetic operators in Swift do not overflow by default. Overflow behavior is trapped and reported as an error. To opt in to overflow behavior, use Swift’s second set of arithmetic operators that overflow by default, such as the overflow addition operator (&+
). All of these overflow operators begin with an ampersand (&
).
When you define your own structures, classes, and enumerations, it can be useful to provide your own implementations of the standard Swift operators for these custom types. Swift makes it easy to provide tailored implementations of these operators and to determine exactly what their behavior should be for each type you create.
You’re not limited to the predefined operators. Swift gives you the freedom to define your own custom infix, prefix, postfix, and assignment operators, with custom precedence and associativity values. These operators can be used and adopted in your code like any of the predefined operators, and you can even extend existing types to support the custom operators you define.
Bitwise Operators
Bitwise operators enable you to manipulate the individual raw data bits within a data structure. They are often used in low-level programming, such as graphics programming and device driver creation. Bitwise operators can also be useful when you work with raw data from external sources, such as encoding and decoding data for communication over a custom protocol.
Swift supports all of the bitwise operators found in C, as described below.
Bitwise NOT Operator
The bitwise NOT operator (~
) inverts all bits in a number:
The bitwise NOT operator is a prefix operator, and appears immediately before the value it operates on, without any white space:
let initialBits: UInt8 = 0b00001111
let invertedBits = ~initialBits // equals 11110000
UInt8
integers have eight bits and can store any value between 0
and 255
. This example initializes a UInt8
integer with the binary value 00001111
, which has its first four bits set to 0
, and its second four bits set to 1
. This is equivalent to a decimal value of 15
.
The bitwise NOT operator is then used to create a new constant called invertedBits
, which is equal to initialBits
, but with all of the bits inverted. Zeros become ones, and ones become zeros. The value of invertedBits
is 11110000
, which is equal to an unsigned decimal value of 240
.
Bitwise AND Operator
The bitwise AND operator (&
) combines the bits of two numbers. It returns a new number whose bits are set to 1
only if the bits were equal to 1
in both input numbers:
In the example below, the values of firstSixBits
and lastSixBits
both have four middle bits equal to 1
. The bitwise AND operator combines them to make the number 00111100
, which is equal to an unsigned decimal value of 60
:
let firstSixBits: UInt8 = 0b11111100
let lastSixBits: UInt8 = 0b00111111
let middleFourBits = firstSixBits & lastSixBits // equals 00111100
Bitwise OR Operator
The bitwise OR operator (|
) compares the bits of two numbers. The operator returns a new number whose bits are set to 1
if the bits are equal to 1
in either input number:
In the example below, the values of someBits
and moreBits
have different bits set to 1
. The bitwise OR operator combines them to make the number 11111110
, which equals an unsigned decimal of 254
:
let someBits: UInt8 = 0b10110010
let moreBits: UInt8 = 0b01011110
let combinedbits = someBits | moreBits // equals 11111110
Bitwise XOR Operator
The bitwise XOR operator, or “exclusive OR operator” (^
), compares the bits of two numbers. The operator returns a new number whose bits are set to 1
where the input bits are different and are set to 0
where the input bits are the same:
In the example below, the values of firstBits
and otherBits
each have a bit set to 1
in a location that the other does not. The bitwise XOR operator sets both of these bits to 1
in its output value. All of the other bits in firstBits
and otherBits
match and are set to 0
in the output value:
let firstBits: UInt8 = 0b00010100
let otherBits: UInt8 = 0b00000101
let outputBits = firstBits ^ otherBits // equals 00010001
Bitwise Left and Right Shift Operators
The bitwise left shift operator (<<
) and bitwise right shift operator (>>
) move all bits in a number to the left or the right by a certain number of places, according to the rules defined below.
Bitwise left and right shifts have the effect of multiplying or dividing an integer by a factor of two. Shifting an integer’s bits to the left by one position doubles its value, whereas shifting it to the right by one position halves its value.
Shifting Behavior for Unsigned Integers
The bit-shifting behavior for unsigned integers is as follows:
Existing bits are moved to the left or right by the requested number of places.
Any bits that are moved beyond the bounds of the integer’s storage are discarded.
Zeros are inserted in the spaces left behind after the original bits are moved to the left or right.
This approach is known as a logical shift.
The illustration below shows the results of 11111111 << 1
(which is 11111111
shifted to the left by 1
place), and 11111111 >> 1
(which is 11111111
shifted to the right by 1
place). Blue numbers are shifted, gray numbers are discarded, and orange zeros are inserted:
Here’s how bit shifting looks in Swift code:
let shiftBits: UInt8 = 4 // 00000100 in binary
shiftBits << 1 // 00001000
shiftBits << 2 // 00010000
shiftBits << 5 // 10000000
shiftBits << 6 // 00000000
shiftBits >> 2 // 00000001
You can use bit shifting to encode and decode values within other data types:
let pink: UInt32 = 0xCC6699
let redComponent = (pink & 0xFF0000) >> 16 // redComponent is 0xCC, or 204
let greenComponent = (pink & 0x00FF00) >> 8 // greenComponent is 0x66, or 102
let blueComponent = pink & 0x0000FF // blueComponent is 0x99, or 153
This example uses a UInt32
constant called pink
to store a Cascading Style Sheets color value for the color pink. The CSS color value #CC6699
is written as 0xCC6699
in Swift’s hexadecimal number representation. This color is then decomposed into its red (CC
), green (66
), and blue (99
) components by the bitwise AND operator (&
) and the bitwise right shift operator (>>
).
The red component is obtained by performing a bitwise AND between the numbers 0xCC6699
and 0xFF0000
. The zeros in 0xFF0000
effectively “mask” the second and third bytes of 0xCC6699
, causing the 6699
to be ignored and leaving 0xCC0000
as the result.
This number is then shifted 16 places to the right (>> 16
). Each pair of characters in a hexadecimal number uses 8 bits, so a move 16 places to the right will convert 0xCC0000
into 0x0000CC
. This is the same as 0xCC
, which has a decimal value of 204
.
Similarly, the green component is obtained by performing a bitwise AND between the numbers 0xCC6699
and 0x00FF00
, which gives an output value of 0x006600
. This output value is then shifted eight places to the right, giving a value of 0x66
, which has a decimal value of 102
.
Finally, the blue component is obtained by performing a bitwise AND between the numbers 0xCC6699
and 0x0000FF
, which gives an output value of 0x000099
. There’s no need to shift this to the right, as 0x000099
already equals 0x99
, which has a decimal value of 153
.
Shifting Behavior for Signed Integers
The shifting behavior is more complex for signed integers than for unsigned integers, because of the way signed integers are represented in binary. (The examples below are based on 8-bit signed integers for simplicity, but the same principles apply for signed integers of any size.)
Signed integers use their first bit (known as the sign bit) to indicate whether the integer is positive or negative. A sign bit of 0
means positive, and a sign bit of 1
means negative.
The remaining bits (known as the value bits) store the actual value. Positive numbers are stored in exactly the same way as for unsigned integers, counting upwards from 0
. Here’s how the bits inside an Int8
look for the number 4
:
The sign bit is 0
(meaning “positive”), and the seven value bits are just the number 4
, written in binary notation.
Negative numbers, however, are stored differently. They are stored by subtracting their absolute value from 2
to the power of n
, where n
is the number of value bits. An eight-bit number has seven value bits, so this means 2
to the power of 7
, or 128
.
Here’s how the bits inside an Int8
look for the number -4
:
This time, the sign bit is 1
(meaning “negative”), and the seven value bits have a binary value of 124
(which is 128 - 4
):
This encoding for negative numbers is known as a two’s complement representation. It may seem an unusual way to represent negative numbers, but it has several advantages.
First, you can add -1
to -4
, simply by performing a standard binary addition of all eight bits (including the sign bit), and discarding anything that doesn’t fit in the eight bits once you’re done:
Second, the two’s complement representation also lets you shift the bits of negative numbers to the left and right like positive numbers, and still end up doubling them for every shift you make to the left, or halving them for every shift you make to the right. To achieve this, an extra rule is used when signed integers are shifted to the right: When you shift signed integers to the right, apply the same rules as for unsigned integers, but fill any empty bits on the left with the sign bit, rather than with a zero.
This action ensures that signed integers have the same sign after they are shifted to the right, and is known as an arithmetic shift.
Because of the special way that positive and negative numbers are stored, shifting either of them to the right moves them closer to zero. Keeping the sign bit the same during this shift means that negative integers remain negative as their value moves closer to zero.
Overflow Operators
If you try to insert a number into an integer constant or variable that cannot hold that value, by default Swift reports an error rather than allowing an invalid value to be created. This behavior gives extra safety when you work with numbers that are too large or too small.
For example, the Int16
integer type can hold any signed integer between -32768
and 32767
. Trying to set an Int16
constant or variable to a number outside of this range causes an error:
var potentialOverflow = Int16.max
// potentialOverflow equals 32767, which is the maximum value an Int16 can hold
potentialOverflow += 1
// this causes an error
Providing error handling when values get too large or too small gives you much more flexibility when coding for boundary value conditions.
However, when you specifically want an overflow condition to truncate the number of available bits, you can opt in to this behavior rather than triggering an error. Swift provides three arithmetic overflow operators that opt in to the overflow behavior for integer calculations. These operators all begin with an ampersand (&
):
Overflow addition (
&+
)Overflow subtraction (
&-
)Overflow multiplication (
&*
)
Value Overflow
Numbers can overflow in both the positive and negative direction.
Here’s an example of what happens when an unsigned integer is allowed to overflow in the positive direction, using the overflow addition operator (&+
):
var unsignedOverflow = UInt8.max
// unsignedOverflow equals 255, which is the maximum value a UInt8 can hold
unsignedOverflow = unsignedOverflow &+ 1
// unsignedOverflow is now equal to 0
The variable unsignedOverflow
is initialized with the maximum value a UInt8
can hold (255
, or 11111111
in binary). It is then incremented by 1
using the overflow addition operator (&+
). This pushes its binary representation just over the size that a UInt8
can hold, causing it to overflow beyond its bounds, as shown in the diagram below. The value that remains within the bounds of the UInt8
after the overflow addition is 00000000
, or zero.
Something similar happens when an unsigned integer is allowed to overflow in the negative direction. Here’s an example using the overflow subtraction operator (&-
):
var unsignedOverflow = UInt8.min
// unsignedOverflow equals 0, which is the minimum value a UInt8 can hold
unsignedOverflow = unsignedOverflow &- 1
// unsignedOverflow is now equal to 255
The minimum value that a UInt8
can hold is zero, or 00000000
in binary. If you subtract 1
from 00000000
using the overflow subtraction operator (&-
), the number will overflow and wrap around to 11111111
, or 255
in decimal.
Overflow also occurs for signed integers. All addition and subtraction for signed integers is performed in bitwise fashion, with the sign bit included as part of the numbers being added or subtracted, as described in Bitwise Left and Right Shift Operators.
var signedOverflow = Int8.min
// signedOverflow equals -128, which is the minimum value an Int8 can hold
signedOverflow = signedOverflow &- 1
// signedOverflow is now equal to 127
The minimum value that an Int8
can hold is -128
, or 10000000
in binary. Subtracting 1
from this binary number with the overflow operator gives a binary value of 01111111
, which toggles the sign bit and gives positive 127
, the maximum positive value that an Int8
can hold.
For both signed and unsigned integers, overflow in the positive direction wraps around from the maximum valid integer value back to the minimum, and overflow in the negative direction wraps around from the minimum value to the maximum.
Precedence and Associativity
Operator precedence gives some operators higher priority than others; these operators are applied first.
Operator associativity defines how operators of the same precedence are grouped together—either grouped from the left, or grouped from the right. Think of it as meaning “they associate with the expression to their left,” or “they associate with the expression to their right.”
It is important to consider each operator’s precedence and associativity when working out the order in which a compound expression will be calculated. For example, operator precedence explains why the following expression equals 17
.
2 + 3 % 4 * 5
// this equals 17
If you read strictly from left to right, you might expect the expression to be calculated as follows:
2
plus3
equals5
5
remainder4
equals1
1
times5
equals5
However, the actual answer is 17
, not 5
. Higher-precedence operators are evaluated before lower-precedence ones. In Swift, as in C, the remainder operator (%
) and the multiplication operator (*
) have a higher precedence than the addition operator (+
). As a result, they are both evaluated before the addition is considered.
However, remainder and multiplication have the same precedence as each other. To work out the exact evaluation order to use, you also need to consider their associativity. Remainder and multiplication both associate with the expression to their left. Think of this as adding implicit parentheses around these parts of the expression, starting from their left:
2 + ((3 % 4) * 5)
(3 % 4)
is 3
, so this is equivalent to:
2 + (3 * 5)
(3 * 5)
is 15
, so this is equivalent to:
2 + 15
This calculation yields the final answer of 17
.
For information about the operators provided by the Swift standard library, including a complete list of the operator precedence groups and associativity settings, see Operator Declarations.
Operator Methods
Classes and structures can provide their own implementations of existing operators. This is known as overloading the existing operators.
The example below shows how to implement the arithmetic addition operator (+
) for a custom structure. The arithmetic addition operator is a binary operator because it operates on two targets and is said to be infix because it appears in between those two targets.
The example defines a Vector2D
structure for a two-dimensional position vector (x, y)
, followed by a definition of an operator method to add together instances of the Vector2D
structure:
struct Vector2D {
var x = 0.0, y = 0.0
}
extension Vector2D {
static func + (left: Vector2D, right: Vector2D) -> Vector2D {
return Vector2D(x: left.x + right.x, y: left.y + right.y)
}
}
The operator method is defined as a type method on Vector2D
, with a method name that matches the operator to be overloaded (+
). Because addition isn’t part of the essential behavior for a vector, the type method is defined in an extension of Vector2D
rather than in the main structure declaration of Vector2D
. Because the arithmetic addition operator is a binary operator, this operator method takes two input parameters of type Vector2D
and returns a single output value, also of type Vector2D
.
In this implementation, the input parameters are named left
and right
to represent the Vector2D
instances that will be on the left side and right side of the +
operator. The method returns a new Vector2D
instance, whose x
and y
properties are initialized with the sum of the x
and y
properties from the two Vector2D
instances that are added together.
The type method can be used as an infix operator between existing Vector2D
instances:
let vector = Vector2D(x: 3.0, y: 1.0)
let anotherVector = Vector2D(x: 2.0, y: 4.0)
let combinedVector = vector + anotherVector
// combinedVector is a Vector2D instance with values of (5.0, 5.0)
This example adds together the vectors (3.0, 1.0)
and (2.0, 4.0)
to make the vector (5.0, 5.0)
, as illustrated below.
Prefix and Postfix Operators
The example shown above demonstrates a custom implementation of a binary infix operator. Classes and structures can also provide implementations of the standard unary operators. Unary operators operate on a single target. They are prefix if they precede their target (such as -a
) and postfix operators if they follow their target (such as b!
).
You implement a prefix or postfix unary operator by writing the prefix
or postfix
modifier before the func
keyword when declaring the operator method:
extension Vector2D {
static prefix func - (vector: Vector2D) -> Vector2D {
return Vector2D(x: -vector.x, y: -vector.y)
}
}
The example above implements the unary minus operator (-a
) for Vector2D
instances. The unary minus operator is a prefix operator, and so this method has to be qualified with the prefix
modifier.
For simple numeric values, the unary minus operator converts positive numbers into their negative equivalent and vice versa. The corresponding implementation for Vector2D
instances performs this operation on both the x
and y
properties:
let positive = Vector2D(x: 3.0, y: 4.0)
let negative = -positive
// negative is a Vector2D instance with values of (-3.0, -4.0)
let alsoPositive = -negative
// alsoPositive is a Vector2D instance with values of (3.0, 4.0)
Compound Assignment Operators
Compound assignment operators combine assignment (=
) with another operation. For example, the addition assignment operator (+=
) combines addition and assignment into a single operation. You mark a compound assignment operator’s left input parameter type as inout
, because the parameter’s value will be modified directly from within the operator method.
The example below implements an addition assignment operator method for Vector2D
instances:
extension Vector2D {
static func += (left: inout Vector2D, right: Vector2D) {
left = left + right
}
}
Because an addition operator was defined earlier, you don’t need to reimplement the addition process here. Instead, the addition assignment operator method takes advantage of the existing addition operator method, and uses it to set the left value to be the left value plus the right value:
var original = Vector2D(x: 1.0, y: 2.0)
let vectorToAdd = Vector2D(x: 3.0, y: 4.0)
original += vectorToAdd
// original now has values of (4.0, 6.0)
Equivalence Operators
Custom classes and structures do not receive a default implementation of the equivalence operators, known as the “equal to” operator (==
) and “not equal to” operator (!=
). It is not possible for Swift to guess what would qualify as “equal” for your own custom types, because the meaning of “equal” depends on the roles that those types play in your code.
To use the equivalence operators to check for equivalence of your own custom type, provide an implementation of the operators in the same way as for other infix operators:
extension Vector2D {
static func == (left: Vector2D, right: Vector2D) -> Bool {
return (left.x == right.x) && (left.y == right.y)
}
static func != (left: Vector2D, right: Vector2D) -> Bool {
return !(left == right)
}
}
The above example implements an “equal to” operator (==
) to check if two Vector2D
instances have equivalent values. In the context of Vector2D
, it makes sense to consider “equal” as meaning “both instances have the same x
values and y
values”, and so this is the logic used by the operator implementation. The example also implements the “not equal to” operator (!=
), which simply returns the inverse of the result of the “equal to” operator.
You can now use these operators to check whether two Vector2D
instances are equivalent:
let twoThree = Vector2D(x: 2.0, y: 3.0)
let anotherTwoThree = Vector2D(x: 2.0, y: 3.0)
if twoThree == anotherTwoThree {
print("These two vectors are equivalent.")
}
// Prints "These two vectors are equivalent."
Custom Operators
You can declare and implement your own custom operators in addition to the standard operators provided by Swift. For a list of characters that can be used to define custom operators, see Operators.
New operators are declared at a global level using the operator
keyword, and are marked with the prefix
, infix
or postfix
modifiers:
prefix operator +++
The example above defines a new prefix operator called +++
. This operator does not have an existing meaning in Swift, and so it is given its own custom meaning below in the specific context of working with Vector2D
instances. For the purposes of this example, +++
is treated as a new “prefix doubling” operator. It doubles the x
and y
values of a Vector2D
instance, by adding the vector to itself with the addition assignment operator defined earlier. To implement the +++
operator, you add a type method called +++
to Vector2D
as follows:
extension Vector2D {
static prefix func +++ (vector: inout Vector2D) -> Vector2D {
vector += vector
return vector
}
}
var toBeDoubled = Vector2D(x: 1.0, y: 4.0)
let afterDoubling = +++toBeDoubled
// toBeDoubled now has values of (2.0, 8.0)
// afterDoubling also has values of (2.0, 8.0)
Precedence for Custom Infix Operators
Custom infix operators each belong to a precedence group. A precedence group specifies an operator’s precedence relative to other infix operators, as well as the operator’s associativity. See Precedence and Associativity for an explanation of how these characteristics affect an infix operator’s interaction with other infix operators.
A custom infix operator that is not explicitly placed into a precedence group is given a default precedence group with a precedence immediately higher than the precedence of the ternary conditional operator.
The following example defines a new custom infix operator called +-
, which belongs to the precedence group AdditionPrecedence
:
infix operator +-: AdditionPrecedence
extension Vector2D {
static func +- (left: Vector2D, right: Vector2D) -> Vector2D {
return Vector2D(x: left.x + right.x, y: left.y - right.y)
}
}
let firstVector = Vector2D(x: 1.0, y: 2.0)
let secondVector = Vector2D(x: 3.0, y: 4.0)
let plusMinusVector = firstVector +- secondVector
// plusMinusVector is a Vector2D instance with values of (4.0, -2.0)
This operator adds together the x
values of two vectors, and subtracts the y
value of the second vector from the first. Because it is in essence an “additive” operator, it has been given the same precedence group as additive infix operators such as +
and -
. For information about the operators provided by the Swift standard library, including a complete list of the operator precedence groups and associativity settings, see Operator Declarations. For more information about precedence groups and to see the syntax for defining your own operators and precedence groups, see Operator Declaration.
Copyright © 2017 Apple Inc. All rights reserved. Terms of Use | Privacy Policy | Updated: 2017-09-19


Students who return to the Athens campus this Fall semester will have to follow several new university policies, including a mandatory mask mandate, temperature checks and symptom monitoring before going to class and physical distancing protocols.
Students living in on-campus housing for the Phase I return will be living in Tanaka, Carr, or Sowle Residence Halls, said Pete Trentacoste, executive director of housing and residence life. Students that return to campus for Phase II will be charged an appropriate amount for room and board relative to the amount of time they will be living in campus housing during the Fall, he said.
All students, faculty, staff and visitors are now required to wear a mask while they are on campus. Face coverings must cover the nose, mouth and chin, and must be worn at all times, with exceptions for exercise when there is at least six feet of distance, or in households which consist of roommates and suitemates, according to OU’s new “Be Safe Bobcats” website for COVID-19 information.
The university will provide each student, staff and faculty member with two washable masks.
The City of Athens also has a mandate requiring masks to be worn in all public places, including while inside businesses and on public transportation.
All students, faculty, and staff will also be required to measure their temperature before they leave for campus each morning. Self-monitoring for common symptoms of COVID-19, like fever, cough and loss of taste or smell, is also required.
Any individual with a temperature above 100.4 degrees is required to stay at their place of residence. If the individual is discovered to have a fever on campus, they are required to return to their place of residence.
If a student is diagnosed with or suspected to have COVID-19, OU will partner with the Athens City-County Health Department for contact tracing. Anyone who has been exposed to the individual must quarantine for 14 days.
Students who test positive for the coronavirus must return to their permanent residence. If that is not possible, the student must quarantine at their off-campus residence or in one of the university’s isolation dorms.
Academic accommodations will be made for those students, and meals will be delivered to their residence hall. To return to campus, sick students, faculty and staff must have a physician's approval.
Social distancing is now required throughout the campus. There must be at least six feet of distance between all people, with the exception of those from the same household.
There will be floor signage throughout campus marking distancing guidance. Classrooms have also been reviewed and maximum capacities were set at lower numbers to account for social distancing. Classes will be dispersed across campus according to classroom size and density, and many classes might not be held within their typical home building.
There will be no more than 30 students in class at any time, and students will be seated at least six feet apart. Professors will be provided with new, additional technologies to help adapt their classes to spaced out learning.
Students are expected to take the seat farthest from the door, and classroom furniture is not permitted to be moved. Faculty and students will sanitize the classroom space before and after each class, and students nearest to the door will exit first, according to the university website.
Campus dining will be carry-out only. All on-campus dining venues will be cashless, but will still accept credit and debit cards, Bobcat Cash, and meal plans. The university plans on offering more outdoor seating across campus, according to the website.
Study spaces and public technology, like library computers and printers, will be greatly reduced in numbers during the return to campus. Additional safety measures, like putting covers over keyboards, are being implemented as well.
Sanitation practices of all public areas will be increased, and signage reminding students, faculty, and staff of guidelines will be frequently visible throughout the campus.
Many campus transportation options, like the CATCAB, have been reconfigured with often shorter hours and limited campus routes.
Campus recreation will be limited to individual and socially distanced activities, like strength and cardio workouts. Limited virtual fitness classes will be available, but activities with high contact, like basketball, will be banned.
Additionally, the university requests student organizations meet online, except when necessary. Meetings should be limited to no more than 10 people who maintain a social distance of at least six feet.
The university will be giving new housing assignments to students who are able to return to campus during Phase 1. All other students will receive adjusted housing rates and refunds.
“The University will automatically exempt any student not included in Phase 1 from the fall semester portion of their annual housing and dining contract at this time and will reverse those charges,” Jim Sabin, spokesperson for the university, said. “Students who are eligible and choose to return to campus in Phase 2 will receive an updated housing assignment, and revised housing and dining charges will be assessed accordingly. The fall semester payment due date will be changed from August 21 to September 21 to allow time for adjustments to course schedules, housing and dining charges, or student financial aid.”
Students who return to campus for Phase 2 will also receive new housing assignments, along with revised housing and dining charges.
Employees who are able to work remotely must continue to do so to avoid overcrowding campus.
Any student on any campus who would like to arrange an entirely online semester may do so, with the exception of graduate students in the Heritage College of Osteopathic Medicine.


"No one is mean to me in space!"
"The silk beaches of Nengunus are smply divine!"
"Nypso 6X has technology like you wouldn't believe!"


policysearch
Classes
ActionUtility
Constant
Functions
PolicySearchApp
State
StateGrid
UtilityComparator
Enums
Action
StateType