During earthquake we should drop down and take cover under a desk or a table. Stay indoors untill the shaking stops. Stay away from book cases or furniture taht can fall.
Tsunami can wreak havoc on coastal population and landscapes. During tsunami warning, plan an evacuation route that leads to higher ground. Never stay near to watch a tsunamic come in.
Flooding may occur as an overflow of water fromwater bodies such as river, lake or ocean. When a flood is imminent pack a bag with important items in case there is a need to evacuate. If there is a possibility of a flash flood move immediately to higher ground.
During a Nuclear accident take a safe shelter, take iodine tablets if prescribed and follow the instruction of the authorities.
We are {Dirty Code}, creators of the desktop console app SHELTER. SHELTER aims to be the stoic in a natural calamity, a product that you can rely on when you most need it. It uses the concept of neural networks to pinpoint the crisis area, cross validate it with various other sources, provide information about the situation, provide essential information, and uses geostationary technology to bring its user back to safety. Because we are there when you most need us.
SHELTER is an web-based and a desktop console app. Simply Sign-Up and Login into our platform and instantly report any disasters around you. Our servers use neural networks to pridict the area of effect (of the disaster) based on the user inputs of the area. Our platform then validates the incoming data with various other sources. If the cross-check holds true then it declares DISASTER EMINENT. When DISASTER EMINENT is declared our users recieve instrctions on what to do during that specific natural calamity. Various different EVAC points are charted and the safest routes are distributed to the users at random, to avoid overcrowding reducing colletral damage significantly. A medical team will be present on all the EVAC points. Rescue optertives are alerted and our data gives them first hand report of situation in the AOE. We aim to reduce the collateral damage caused during rescue operations.
"App developer & Lead Scripter"
"Web developer"
"Presentation Management"
"Graphic Design"


1 IN THE HIGH COURT OF JUDICATURE FOR RAJASTHAN AT JODHPUR 1. D.B.Civil Writ Petition No.8074/2010 M/s Laxmi Suiting Vs. State of Rajasthan & Ors. 2. D.B.Civil Writ Petition No.8682/2010 M/s Arun Dal Mills Vs. State of Rajasthan & Ors. 3. D.B.Civil Writ Petition No.9612/2010 M/s Adarsh Industries Vs. State of Rajasthan & Ors. 4. D.B.Civil Writ Petition No.10146/2010 M/s Kiran Creations Vs. Raj. State Pollution Control Board & Ors. 5. D.B.Civil Writ Petition No.3615/2011 Anand Vs. State of Rajasthan & Ors. 6. D.B.Civil Writ Petition No.7932/2011 Multan Singh & Anr. Vs. State (Industries) & Ors. 7. D.B.Civil Writ Petition No.11533/2011 Shatrudhan Rajpurohit & Ors. Vs. State (Irrigation) & Ors. 8. D.B.Civil Writ Petition No.4050/2012 U.R. Beniwal. Vs. State of Rajasthan 9. D.B.Civil Writ Petition No.8828/2012 M/s Jojoba India P. Ltd. Vs. State of Rajasthan & Ors. 10. D.B.Civil Writ Petition No.2087/2013 M/s Building Material Vs. State of Rajasthan & Ors. 11. D.B.Civil Writ Petition No.2630/2013 Nisar Mohammed Vs. State of Rajasthan & Ors. 12. D.B.Civil Writ Petition No.2631/2013- M/s Golden Emery Stone Vs. State of Rajasthan & Ors 13. D.B.Civil Writ Petition No.2648/2013 Nisha Laboratories Vs. State of Rajasthan & Ors. 14. D.B.Civil Writ Petition No.2649/2013 M/s Gaurav Textiles (M/s Ankur Udyog) Vs. State of Raj. & Ors. 15. D.B.Civil Writ Petition No.2650/2013 M/s Sun Textiles Vs. State of Rajasthan & Ors. 16. D.B.Civil Writ Petition No.2651/2013 M/s Khatri Boghraj Motilal Vs. State of Rajasthan & Ors. 17. D.B.Civil Writ Petition No.2707/2013 M/s Kishore Kumar & Co. Vs. State of Rajasthan & Ors. 2 18. D.B.Civil Writ Petition No.2709/2013 M/s Chetan Knitwear Vs. State of Rajasthan & Ors. 19. D.B.Civil Writ Petition No.2710/2013 Mangal Textiles Vs. State of Rajasthan & Ors. 20. D.B.Civil Writ Petition No.2713/2013 Bhawna Prints Vs. State of Rajasthan & Ors. 21. D.B.Civil Writ Petition No.2730/2013 Jagdamba Fabrics Vs. State of Rajasthan & Ors. 22. D.B.Civil Writ Petition No.2783/2013 M/s Rishabh Creation Vs. State of Rajasthan & Ors. 23. D.B.Civil Writ Petition No.2784/2013 M/s Pari Impex Vs. State of Rajasthan & Ors. 24. D.B.Civil Writ Petition No.2785/2013 Bhandari Impex Vs. State of Rajasthan & Ors. 25. D.B.Civil Writ Petition No.2888/2013 M/s L.R. Creation Vs. State of Rajasthan & Ors. 26. D.B.Civil Writ Petition No.2892/2013 Suban Khan Vs. State of Rajasthan & Ors. 27. D.B.Civil Writ Petition No.2896/2013 M/s Veetex Creation Vs. State of Rajasthan & Ors. 28. D.B.Civil Writ Petition No.2899/2013 Rajesh Exporter & Importer & Anr. Vs. Raj. State Pollution Control Board & Ors. 29. D.B.Civil Writ Petition No.2900/2013 Bhawani Industries Vs. Raj. State Pollution Control Board & Ors. 30. D.B.Civil Writ Petition No.2901/2013 Vardhman Industries Vs. Raj. State Pollution Control Board & Ors. 31. D.B.Civil Writ Petition No.2903/2013 M/s Kamdhenu Made up & Gram Vs. Raj. State Pollution Control Board & Ors. 32. D.B.Civil Writ Petition No.2904/2013 Adarsh Creations Vs. Raj. State Pollution Control Board & Ors. 33. D.B.Civil Writ Petition No.2905/2013 JMD Industries Vs. Raj. State Pollution Control Board & Ors. 34. D.B.Civil Writ Petition No.2906/2013 Pakija Fabrics Vs. Raj. State Pollution Control Board & Ors. 3 35. D.B.Civil Writ Petition No.2907/2013 Mateshwari Fabrics Vs. Raj. State Pollution Control Board & Ors. 36. D.B.Civil Writ Petition No.2908/2013 Suncity Holding & Trading Ltd. Vs. Raj. State Pollution Control Board & Ors. 37. D.B.Civil Writ Petition No.2960/2013 Choudhary Industries Vs. Raj. State Pollution Control Board & Ors. 38. D.B.Civil Writ Petition No.2962/2013 Dhanlaxmi Prints Vs. Raj. State Pollution Control Board & Ors. 39. D.B.Civil Writ Petition No.2963/2013 M.B. Industries Vs. Raj. State Pollution Control Board & Ors. 40. D.B.Civil Writ Petition No.2964/2013 Salasar Balaji Industries Vs. Raj. State Pollution Control Board & Ors. 41. D.B.Civil Writ Petition No.2965/2013 Jitendra Industries Vs. Raj. State Pollution Control Board & Ors. 42. D.B.Civil Writ Petition No.2966/2013 Vineeta Fabrics & Anr. Vs. Raj. State Pollution Control Board & Ors. 43. D.B.Civil Writ Petition No.2967/2013 Balaji Industries Vs. Raj. State Pollution Control Board & Ors. 44. D.B.Civil Writ Petition No.2968/2013 Ambika Sales Vs. Raj. State Pollution Control Board & Ors. 45. D.B.Civil Writ Petition No.2969/2013 Anusha Fashion Vs. Raj. State Pollution Control Board & Ors. 46. D.B.Civil Writ Petition No.2984/2013 Dinesh Kumar Gupta Vs. State of Rajasthan & Ors. 47. D.B.Civil Writ Petition No.3039/2013 Hemant Prints (Handicrafts) Vs. State of Rajasthan & Ors. 48. D.B.Civil Writ Petition No.3040/2013 P.S. Industries Vs. State of Rajasthan & Ors. 49. D.B.Civil Writ Petition No.3044/2013 M/s Siddhi Vinayak Prints Vs. State of Rajasthan & Ors. 50. D.B.Civil Writ Petition No.3046/2013 Saraswati Textile Vs. State of Rajasthan & Ors. 51. D.B.Civil Writ Petition No.3047/2013 Maharanisa Fabrics Vs. State of Rajsathan & Ors. 4 52. D.B.Civil Writ Petition No.3091/2013 Ramdev Creations Vs. Raj. State Pollution Control Board & Ors. 53. D.B.Civil Writ Petition No.3095/2013 Monika Industries Vs. Raj. State Pollution Control Board & Ors. 54. D.B.Civil Writ Petition No.3115/2013 Jakeer Hussain Handicraft Vs.Raj.State Pollution Control Board & Ors. 55. D.B.Civil Writ Petition No.3116/2013 Ajanta Creations Vs. Raj. State Pollution Control Board. 56. D.B.Civil Writ Petition No.3117/2013 A.S. Fashions Vs. Raj. State Pollution Control Board & Ors. 57. D.B.Civil Writ Petition No.3118/2013 Mamta Fabrics Prints Vs. Raj. State Pollution Control Board & Ors. 58. D.B.Civil Writ Petition No.3121/2013 Babu Lal Gaur HUF Vs. Raj. State Pollution Control Board & Ors. Date of Order::- 1/10/2013. PRESENT HON'BLE THE CHIEF JUSTICE MR.AMITAVA ROY HON'BLE MR.JUSTICE P.K. LOHRA Dr. Sachin Acharya ) Mr.V.R.Bishnoi ) Mr.R.R.Vyas ) Dr.Pushpendra Singh ) Mr.Manish Patel ) Mr.Hemant Balani )-for the petitioners. Mr. Sandeep Shah ) Mr.Ankur Mathur ) Mr.Umesh Shrimali ) Mr. Manish Shishodia for the -Rajasthan State ) Pollution Control Board. ) Mr. Manoj Bhandari, for the JVVNL ) Mr.G.R.Punia, Additional Advocate General ) Mr. Mukul Singhvi . ) Mr.Sushil Bishnoi ) Mr.R.S.Saluja )-for the respondents. Mr.V.K.Bhadu ) Mr.Mahendra Chhangani ) Mr.Kuldeep Mathur ) Mr. Dinesh Mehta for the Jodhpur Pradushan ) Niwaran Trust. 5 ORDER BY THE COURT (Per Hon'ble Amitava Roy,CJ)
This batch of writ petitions has been laid before us to determine as to whether these ought to be transferred to the National Green Tribunal (for short, hereafter referred to as "the Tribunal") established under section 3 of the National Green Tribunal Act, 2010 (for short, hereafter referred to as "the Act"). The writ petitions hitherto pending before the learned Single Bench have been listed in terms of the order dated 23.9.2013.
We have heard learned counsel for the petitioners and the learned counsel for the respondents.
The factual spectrum though involves divergent facts projecting a range of challenges and grievances, however, pertains to environment as defined in Section 2(c) of the Act with varying degree of co-relative proximacy having regard to the debate raised and needs to be addressed, it is inessential to dilate on the rival pleadings. This is more so as in course of the arguments advanced on behalf of the parties, it has not been contended that no environmental issue whatsoever is involved in the instant proceedings. The competing pleadings as a composite whole would thus be required to be noted in the pronounced perspectives of the scheme and the underlying objectives of the Act.
The learned counsel for the petitioners apart from contending that the reliefs provided by the Act under section 15 thereof do not constitute efficacious alternative remedy, have urged that in absence of any provision in the enactment to that effect, it is not mandatory to 6 transfer the cases to the learned Tribunal. It has been argued that the provisions of the Act do not apply to the facts of the instant proceedings. Referring to Sections 14 and 16 of the Act in particular, it has been insisted that no substantial question in civil cases relating to environment exist in the cases in hand and thus, the learned Tribunal is bereft of jurisdiction in settling the disputes founded on the facts averred. Referring to the notice(s) issued by the Rajasthan State Pollution Control Board (for short, hereafter referred to as "the Board") under section 33A of the Water (Prevention and Control of Pollution) Act, 1974 (for short, hereinafter referred to as "the Act of 1974") in the concerned cases, it has been urged that as the validity thereof has been impeached for the violation of the mandatory provisions with regard thereto, no issue relating to environment is involved and that the alternative remedy contemplated by the Act even if available, the jurisdiction of this Court under Article 226 of the Constitution of India is not ousted thereby. As in some cases issues involving the Combined Effluent Treatment Plant (CETP) and Jodhpur Pradushan Niwaran Trust (for short, hereinafter referred to as "the Trust") are involved, it has been contended that no environmental aspect is associated therewith and thus, those cases do not merit transfer.
Mr.Mehta, learned counsel for the Trust in particular has urged with reference to Articles 322A and 323B of the Constitution of India that in absence of any provision in the Act mandating transfer of cases relating to environment, as envisaged under section 14 thereof, this Court is under no obligation to do so. To reinforce this plea, he has 7 referred to a compilation of the various enactments made under the aforementioned constitutional provisions embodying as well specific legislative prescriptions for such transfer. According to Mr.Metha, the observations/enjoinments made/recorded in the decision of the Hon'ble Apex Court in Bhopal Gas Peedith Mahila Udyog Sangathan and ors. V/s Union of India and ors. ((2012) 8 SCC 326) have to be essentially interpreted in the textual facts and are not for general application.
Mr.Punia, learned Additional Advocate General has submitted that in all the proceedings on board, substantial questions relating to environment are involved and thus, in view of the mandate of Sections 14 and 29 of the Act read with the ruling in Bhopal Gas Peedith Mahila Udyog Sangathan and ors. V/s Union of India and ors. (supra), these are to be essentially transferred to the learned Tribunal.
Mr.Shishodia, learned counsel for the Board while endorsing the stand of the State-respondents has urged that as would be apparent from the reply filed by his respondent in the related cases, violations of the provisions of the legislations enumerated in Schedule-I of the Act more particularly the Act of 1974 are writ large for which it (Board) has taken necessary actions, which have since been assailed before this Court. While referring to the decisions of the Delhi High Court and the Karnataka High Court rendered in Mahavir Singh V/s Union of India & ors. (WP(C) No.7302/2009 decided on 6.2.2013) and H.S.Neelakantappa V/s State of Karnataka and ors. (WP No.47599/2011 (GM-RES-PIL) and WP No.25255/2012 (GM-RES-PIL) decided on 8.7.2013) respectively transferring the cases contemplated under section 14 of the Act to the learned Tribunal, in similar 8 circumstances, the learned counsel has drawn the attention of this Court as well to the amendments obligated to the legislations catalogued in Schedule-III of the Act and also to the corresponding insertions in the related legislations to contend that having regard to the avowed purpose of the National Green Tribunal Act, 2010, the instant proceedings ought to be transferred to the learned Tribunal equipped with the necessary expertise to settle the disputes involved therein.
The arguments advanced have received our due consideration. To reiterate, it has not been pleaded before us that the issues raised in the instant proceedings have no nexus whatsoever with the environmental aspect or the laws relatable thereto. Be that as it may, the Act has its roots as the statement of objects and reasons would reveal, in the United Nations Conferences on environment and development held in 1972 and 1992 in which India participated calling upon the States to take appropriate steps for the protection of the human environment. Therein the necessity of providing effective access to judicial and administrative proceedings, including redress and remedy and of developing national laws regarding liability and compensation for the victims of pollution and other environmental damage, was emphasized. Having regard to the ambit of right to life under Article 21 of the Constitution of India encompassing healthy environment and to actualize the same and also taking into account the large number of environmental cases pending in the higher courts involving multi- disciplinary issues, the Hon'ble Apex Court requested the Law Commission of India to consider the need for constitution of the 9 specialized environmental courts. Consequently, on the necessary recommendation of the Law Commission of India, a specialized Tribunal with original and appellate jurisdictions relating to environmental laws and equipped to handle multi-disciplinary issues involving environmental cases was set up vide the Act with the objective of expeditious disposal of cases relating to environmental protection and conservation of forests and other natural resources including enforcement of any legal right relating to environment. The National Green Tribunal Bill, 2009 followed which provided for establishment of the National Green Tribunal consisting of Chairperson and Judicial and Expert Members as the Central Government would notify. A person either an expert in physical sciences or life sciences or engineering or having administrative experience in dealing with environmental matters, was considered to be qualified for appointment as Expert Member. The comprehensive jurisdiction of the learned Tribunal commensurate to the task entrusted was outlined as well.
This Bill having been passed by both the Houses of Parliament and on receiving the assent of the President of India, was integrated in the Statute Book as the National Green Tribunal Act, 2010. The preamble thereof proclaims that it has been enacted to provide for the establishment of a National Green Tribunal for the effective and expeditious disposal of cases relating to environmental protection and conservation of forests and other natural resources including enforcement of any legal right relating to environment and for giving relief and compensation for damages to persons and property and for matters connected therewith or incidental thereto. The recital following 10 the preamble amongst others demonstrates that in order to eventuate the resolutions adopted in the aforestated conferences and to fructify the comprehension of right to healthy environment as an integrant of life envisaged under Article 21 of the Constitution of India, the National Green Tribunal has been set up to settle the disputes involving multi- disciplinary issues relating to environment. Section 2(c) defines "environment" as hereunder:-
"2(c) "environment" includes water, air and land and the inter- relationship, which exists among and between water, air and land and human beings, other living creatures, plants, micro-organism and property;"
The 'substantial question relating to environment' has been defined in Section 2(m), which is extracted hereinbelow for ready reference:-
"2(m) "substantial question relating to environment" shall include an instance where,-
(I) there is a direct violation of a specific statutory environmental obligation by a person by which,- (A) the community at large other than an individual or group of individuals is affected or likely to be affected by the environmental consequences; or (B) the gravity of damage to the environment or property is substantial; or (C) the damage to public health is broadly measurable;
(ii) the environmental consequences relate to a specific activity or a point source of pollution;"
Section 4 of the Act, which deals with the composition of the Tribunal, obligates that it would comprise of not less than ten but subject to maximum of twenty, full time Expert Members, as the Central 11 Government may from time to time notify. Apart therefrom, the Tribunal has to essentially consist of a full time Chairperson and not less than ten but subject not maximum of twenty full time Judicial Members as the Central Government may from time to time notify.
Sections 14 and 15 of the Act, which occupy the centre stage of the debate, also deserve extraction:-
"14. Tribunal to settle disputes.-(1) The Tribunal shall have the jurisdiction over all civil cases where a substantial question relating to environment (including enforcement of any legal right relating to environment), is involved and such question arises out of the implementation of the enactments specified in Schedule I. (2) The Tribunal shall hear the disputes arising from the questions referred to in sub-section (1) and settle such disputes and pass order thereon......."
15. Relief, compensation and restitution.-(1) The Tribunal may, by an order, provide,-
(a) relief and compensation to the victims of pollution and other environmental damage arising under the enactments specified in the Schedule I (including accident occurring while handling any hazardous substance);
(b) for restitution of property damaged;
(c) for restitution of the environment for such area or areas, as the Tribunal may think fit.
(2) The relief and compensation and restitution of property and environment referred to in clauses (a), (b) and (c) of sub-section (1) shall be in addition to the relief paid or payable under the Public Liability Insurance Act, 1991 (6 of 1991)........."
Whereas Section 16 confers appellate jurisdiction on the Tribunal against the orders as enumerated therein, Section 29 bars the jurisdiction of the civil court to settle disputes or entertain any 12 question relating to any claim for granting any relief or compensation or restitution of property damaged or environment damaged that may be adjudicated upon by the Tribunal. Similar bar is also vis-a-vis any appeal by such civil court on the said issues. Thereby, the civil courts are also prohibited from issuing any injunction in respect of any action taken or to be taken by the Tribunal in such matters. Section 34 reserves to the Central Government the power by notification to amend Schedule-I by including therein any other Act, enacted by Parliament having regard to the objective of environmental protection and conservation of natural resources, or omitting therefrom any Act already specified therein. Schedule-I to the Act catalogues the following enactments traceable to Section 14(1) of the Act the questions arising out of the implementation whereof would be within the purview of the learned Tribunal:
'SCHEDULE I (See sections 14(1), 15(1), 17(1)(a), 17(2), 19(4)(j) and 34(1))
1. The Water (Prevention and Control of Pollution) Act, 1974;
2. The Water (Prevention and Control of Pollution) Cess Act, 1977;
3. The Forest (Conservation) Act, 1980;
4. The Air (Prevention and Control of Pollution) Act, 1981;
5. The Environment (Protection) Act, 1986;
6. The Public Liability Insurance Act, 1991;
7. The Biological Diversity Act, 2002."
A bare perusal of Schedule-III authenticates the amendments introduced in the legislations contained in Schedule I of the Act pursuant to Section 36 thereof. Section 33 of the Act in no uncertain terms assigns an over- riding effect thereof over any other Act inconsistent therewith for the time being in force or any instrument having the effect by virtue of any 13 law and inconsistent therewith. A plain reading of Section 14 of the Act would irrefutably justify that thereby the learned Tribunal has been conferred with the jurisdiction over all civil courts where a substantial question relating to environment including enforcement of any legal right relating to environment is involved and where such question arises out of the implementation of the enactments specified in Schedule I, the learned Tribunal is to hear the dispute arising from such question and settle the same and pass order thereon.
Considering the ambit and expanse of the definition of the expressions "environment" and "substantial question relating to environment" as engrafted in Section 2(c) and 2(m) respectively, we are unable to persuade ourselves to conclude that any constricted approach to scuttle the otherwise attributed wide jurisdiction of the learned Tribunal is either envisaged by the Parliament or is intended. Not only the environment includes water, air and land as defined and their inter- relationship alongwith human beings, other living creatures, plants, micro-organism and property, the substantial question relating to environment includes amongst others the eventualities set out in clauses
(i) and (ii) of section 2(m) of the Act. The definition "substantial question relating to environment" as provided in section 2(m) is an inclusive one and by no means can be ascribed a connotation to limit the scope and sphere thereof. Apropos the factual backdrop of the legislation and the salubrious accomplishments thereof as intended, any endeavour to muzzle the legislatively intended contour thereof would be antithetical thereto and cannot receive judicial imprimatur. A purposive interpretation has to be essentially provided to the relevant 14 provisions of the Act so as to facilitate the wholesome implementation of its enjoinments lest the same is rendered otiose. The words contained in Section 14 delineating the jurisdiction of the learned Tribunal therefor have to be assigned the desired flexibility and amplitude to achieve the objectives thereof. Section 16 by no means ousts or regulates or circumscribes the ambit of Section 14.
The reliefs grantable by the learned Tribunal and enlisted in Section 15 are also couched in compendious terms with adequate discretion to the learned Tribunal to mould the same within the framework thereof. The reliefs contained in clauses (a), (b) and (c) of Section 15(1) therefore do not admit of literal interpretation to circumvent the otherwise intended wide ambit thereof.
Though the Act does not contain any provision in particular mandating transfer of any pending case or proceeding otherwise within the purview of the jurisdiction of the learned Tribunal to it, having regard to the framework thereof and the interplay of the relevant provisions, with the Tribunal as the envisaged fora to settle the disputes involving substantial questions relating to environment, in our view, the non-existence thereof (provision of transfer) is suggestive of impermissibility of such transfer.
To reiterate, the Act has been given an over-riding effect. Though the same per se would not oust the jurisdiction of the superior courts contemplated by the Constitution of India, the plea of inadequacy or inefficacy of the remedy provided by the Act does not weigh with us. The reference of Articles 323A and 323B of the Constitution of India and the enactments made thereunder ipso facto 15 also do not, in our estimate, outweigh the otherwise unmistakable edict of the Act and the inbuilt exclusion of the jurisdiction of the civil courts in matters within the purview of the learned Tribunal for its adjudication. The contention that this Court is beyond the concept of civil court and thus, the provisions of the Act do not apply to the proceeding under Article 226 of the Constitution of India is to be recorded only to be rejected. There is no repugnance or conflict between the provisions of the Act and the jurisdiction of the learned Tribunal outlined thereby with that of the superior courts under the Constitution of India. No ouster of the writ jurisdiction of this Court as well is either conceived of or intended. This, however, does not detract from the necessity of transfer of the proceedings also under Article 226 of the Constitution of India to the learned Tribunal in view of the avowed mission of the Act and for the settlement of disputes relating to environment with suitable reliefs as a corollary thereof.
It has been contended on behalf of the Board in its pleadings that the facts involved pertain to water pollution due to discharge of sewage and untreated trade effluent by the industries involved. Not only these outrages are due to conscious violations of the Act of 1974 and other environmental laws, remedial actions taken by it (Board) form the subject matter of challenge in the instant writ proceedings as well. Accusation of environmental pollution and ecological damage has been made. Having regard to the definitions of "environment" and "substantial question relating to environment" as adverted to hereinabove, we are thus of the unhesitant opinion that substantial questions relating to environment and arising out of the implementation 16 of the enactments amongst others the Act of 1974 is involved in the proceedings in hand warranting transfer of the cases to the learned Tribunal.
The Hon'ble Apex Court in Bhopal Gas Peedith Mahila Udyog Sangathan and ors. V/s Union of India and ors. (supra) while dilating on the provisions and the scheme of the Act and the essentiality of transfer of proceedings as contemplated therein to the learned Tribunal, has propounded as hereunder:-
"40. Keeping in view the provisions and scheme of the National Green Tribunal Act, 2010 (for short "the NGT Act") particularly Sections 14, 29, 30 and 38(5), it can safely be concluded that the environmental issues and matters covered under the NGT Act, Schedule I should be instituted and litigated before the National Green Tribunal (for short "NGT"). Such approach may be necessary to avoid likelihood of conflict of orders between the High Courts and NGT. Thus, in unambiguous terms, we direct that all the matters instituted after coming into force of the NGT Act and which are covered under the provisions of the NGT Act and/or in Schedule I to the NGT Act shall stand transferred and can be instituted only before NGT. This will help in rendering expeditious and specialized justice in the field of environment to all concerned.
41. We find it imperative to place on record a caution for consideration of the courts of competent jurisdiction that the cases filed and pending prior to coming into force of the NGT Act, involving questions of environmental laws and/or relating to any of the seven statutes specified in Schedule I of the NGT Act, should also be dealt with by the specialized tribunal, that is, NGT, created under the provisions of the NGT Act. The courts may be well advised to direct transfer of such cases to NGT in its discretion as it will be in the fitness of administration of justice."
17
Not only the text of the above quoted extract would evince a mandate by their Lordships to transfer matters covered by the provisions of the Act to the learned Tribunal whether pending prior to the coming into force of the Act or instituted thereafter, in order to avoid conflict of orders by it and the High Courts, but also in the interest of expeditious and specialized justice in the field of environment to all concerned. Their Lordships have further observed that the courts may be well advised to direct transfer of such cases to the learned Tribunal in their discretion as it would be in the fitness of administration of justice.
As in our comprehension, the proceedings on board do involve environmental issues relatable to the legislation(s) as the case may be, and set out in Schedule I of the Act and are best suited to be adjudicated upon by the specialized fora (learned Tribunal) equipped with the essential expertise as visualized by the Act, we construe it appropriate to transfer the same to it forthwith. Ordered accordingly.
The petitions are disposed of on transfer. A copy of this order be placed in all the files.
(P.K. LOHRA), J. (AMITAVA ROY), CJ. Parmar


Always a Gentleman, sometimes a Scholar.
I was born in the middle of a freak March snowstorm in small town in southern Illinois. The winds were fierce that day, but I was fiercer.
I was educated in the streets. Nay! Below the streets. My turtle brothers and I trained under the guidance of our sensei. No big deal.


Pacha tracks all permissions related to files and directories that it tracks. This is where the tool starts to separate from the versioning engine.
Usually, DVCS (Distributed Versioning Control Systems) do not track permissions, but since Pacha is able to rebuild hosts, it needed to be able to track granular permissions on files and directories.
When you issue a --watch or --watch-single command option Pacha not only versions, commits, and pushes the files, but it also adds every bit of permissions related to every single file.
We track the sticky bit, what are the rwx permissions related to the owner, group and everyone else. This would allow us to match exactly the original permissions regardless of what changed when the files moved or where handled by the DVCS.
Files and directories can have an owner and a group owner. In this case we track both.
So if a file is owned by root and the group owner is admins, at the time of rebuilding both should be “applied” to the file.
There are certain ocassions where tracking or setting permissions might not work correctly. There are basically 2 scenarios where this would happen:
- Insuficcient rights to read the permissions
- user or group does not exist in the host when rebuilding.
The first scenario is simple, you try to watch a directory that is owned by a user that has a higher level of permissions and doesn’t allow you to properly read the files. Usually, Pacha would tell you it couldn’t read and version the files correctly, but in certain cases you might be allowed to push the files but not the metadata associated with them.
The second case, would happen when rebuilding a host. If host-1 has a bunch of tracked files owned by admin-one and group owned by group-one and you try to rebuild a host where both the user and group do not exist, then Pacha would simply skip setting the permissions.
If in that host, by some reason you had admin-two and group-two the ownership would still not be able to be applied.
A way around this problem would be to use the pre and post hooks provided with Pacha.


module CGI::HtmlExtension
Mixin module providing HTML generation methods.
For example,
cgi.a("http://www.example.com") { "Example" } # => "Example"
Modules Html3, Html4, etc., contain more basic HTML-generation methods
(#title
, #h1
, etc.).
See class CGI for a detailed example.
Public Instance Methods
Generate an Anchor element as a string.
href
can either be a string, giving the URL for the HREF
attribute, or it can be a hash of the element's attributes.
The body of the element is the string returned by the no-argument block passed in.
a("http://www.example.com") { "Example" } # => "Example" a("HREF" => "http://www.example.com", "TARGET" => "_top") { "Example" } # => "Example"
# File lib/cgi/html.rb, line 96 def a(href = "") # :yield: attributes = if href.kind_of?(String) { "HREF" => href } else href end super(attributes) end
Generate a Document Base URI element as a String.
href
can either by a string, giving the base URL for the HREF
attribute, or it can be a has of the element's attributes.
The passed-in no-argument block is ignored.
base("http://www.example.com/cgi") # => "<BASE HREF=\"http://www.example.com/cgi\">"
# File lib/cgi/html.rb, line 114 def base(href = "") # :yield: attributes = if href.kind_of?(String) { "HREF" => href } else href end super(attributes) end
Generate a BlockQuote element as a string.
cite
can either be a string, give the URI for the source of the quoted text, or a hash,
giving all attributes of the element, or it can be omitted, in which case
the element has no attributes.
The body is provided by the passed-in no-argument block
blockquote("http://www.example.com/quotes/foo.html") { "Foo!" } #=> "
Foo!

# File lib/cgi/html.rb, line 133 def blockquote(cite = {}) # :yield: attributes = if cite.kind_of?(String) { "CITE" => cite } else cite end super(attributes) end
Generate a Checkbox Input element as a string.
The attributes of the element can be specified as three arguments,
name
, value
, and checked
.
checked
is a boolean value; if true, the CHECKED attribute
will be included in the element.
Alternatively, the attributes can be specified as a hash.
checkbox("name") # = checkbox("NAME" => "name") checkbox("name", "value") # = checkbox("NAME" => "name", "VALUE" => "value") checkbox("name", "value", true) # = checkbox("NAME" => "name", "VALUE" => "value", "CHECKED" => true)
# File lib/cgi/html.rb, line 179 def checkbox(name = "", value = nil, checked = nil) attributes = if name.kind_of?(String) { "TYPE" => "checkbox", "NAME" => name, "VALUE" => value, "CHECKED" => checked } else name["TYPE"] = "checkbox" name end input(attributes) end
Generate a sequence of checkbox elements, as a String.
The checkboxes will all have the same name
attribute. Each
checkbox is followed by a label. There will be one checkbox for each value.
Each value can be specified as a String, which will be used both as the
value of the VALUE attribute and as the label for that checkbox. A
single-element array has the same effect.
Each value can also be specified as a three-element array. The first element is the VALUE attribute; the second is the label; and the third is a boolean specifying whether this checkbox is CHECKED.
Each value can also be specified as a two-element array, by omitting either the value element (defaults to the same as the label), or the boolean checked element (defaults to false).
checkbox_group("name", "foo", "bar", "baz") # <INPUT TYPE="checkbox" NAME="name" VALUE="foo">foo # <INPUT TYPE="checkbox" NAME="name" VALUE="bar">bar # <INPUT TYPE="checkbox" NAME="name" VALUE="baz">baz checkbox_group("name", ["foo"], ["bar", true], "baz") # <INPUT TYPE="checkbox" NAME="name" VALUE="foo">foo # <INPUT TYPE="checkbox" CHECKED NAME="name" VALUE="bar">bar # <INPUT TYPE="checkbox" NAME="name" VALUE="baz">baz checkbox_group("name", ["1", "Foo"], ["2", "Bar", true], "Baz") # <INPUT TYPE="checkbox" NAME="name" VALUE="1">Foo # <INPUT TYPE="checkbox" CHECKED NAME="name" VALUE="2">Bar # <INPUT TYPE="checkbox" NAME="name" VALUE="Baz">Baz checkbox_group("NAME" => "name", "VALUES" => ["foo", "bar", "baz"]) checkbox_group("NAME" => "name", "VALUES" => [["foo"], ["bar", true], "baz"]) checkbox_group("NAME" => "name", "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"])
# File lib/cgi/html.rb, line 233 def checkbox_group(name = "", *values) if name.kind_of?(Hash) values = name["VALUES"] name = name["NAME"] end values.collect{|value| if value.kind_of?(String) checkbox(name, value) + value else if value[-1] == true || value[-1] == false checkbox(name, value[0], value[-1]) + value[-2] else checkbox(name, value[0]) + value[-1] end end }.join end
Generate an File Upload Input element as a string.
The attributes of the element can be specified as three arguments,
name
, size
, and maxlength
.
maxlength
is the maximum length of the file's
name, not of the file's contents.
Alternatively, the attributes can be specified as a hash.
See multipart_form() for forms that include file uploads.
file_field("name") # <INPUT TYPE="file" NAME="name" SIZE="20"> file_field("name", 40) # <INPUT TYPE="file" NAME="name" SIZE="40"> file_field("name", 40, 100) # <INPUT TYPE="file" NAME="name" SIZE="40" MAXLENGTH="100"> file_field("NAME" => "name", "SIZE" => 40) # <INPUT TYPE="file" NAME="name" SIZE="40">
# File lib/cgi/html.rb, line 275 def file_field(name = "", size = 20, maxlength = nil) attributes = if name.kind_of?(String) { "TYPE" => "file", "NAME" => name, "SIZE" => size.to_s } else name["TYPE"] = "file" name end attributes["MAXLENGTH"] = maxlength.to_s if maxlength input(attributes) end
Generate a Form element as a string.
method
should be either “get” or “post”, and defaults to the
latter. action
defaults to the current CGI script name. enctype
defaults to
“application/x-www-form-urlencoded”.
Alternatively, the attributes can be specified as a hash.
See also multipart_form() for forms that include file uploads.
form{ "string" } # <FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded">string</FORM> form("get") { "string" } # <FORM METHOD="get" ENCTYPE="application/x-www-form-urlencoded">string</FORM> form("get", "url") { "string" } # <FORM METHOD="get" ACTION="url" ENCTYPE="application/x-www-form-urlencoded">string</FORM> form("METHOD" => "post", "ENCTYPE" => "enctype") { "string" } # <FORM METHOD="post" ENCTYPE="enctype">string</FORM>
# File lib/cgi/html.rb, line 309 def form(method = "post", action = script_name, enctype = "application/x-www-form-urlencoded") attributes = if method.kind_of?(String) { "METHOD" => method, "ACTION" => action, "ENCTYPE" => enctype } else unless method.has_key?("METHOD") method["METHOD"] = "post" end unless method.has_key?("ENCTYPE") method["ENCTYPE"] = enctype end method end if block_given? body = yield else body = "" end if @output_hidden body << @output_hidden.collect{|k,v| "<INPUT TYPE=\"HIDDEN\" NAME=\"#{k}\" VALUE=\"#{v}\">" }.join end super(attributes){body} end
Generate a top-level HTML element as a string.
The attributes of the element are specified as a hash. The pseudo-attribute “PRETTY” can be used to specify that the generated HTML string should be indented. “PRETTY” can also be specified as a string as the sole argument to this method. The pseudo-attribute “DOCTYPE”, if given, is used as the leading DOCTYPE SGML tag; it should include the entire text of this tag, including angle brackets.
The body of the html element is supplied as a block.
html{ "string" } # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">string html("LANG" => "ja") { "string" } # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">string html("DOCTYPE" => false) { "string" } # string html("DOCTYPE" => '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">') { "string" } # <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">string html("PRETTY" => " ") { "" } # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> #  #  #  #  html("PRETTY" => "\t") { "" } # <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> #  #  #  #  html("PRETTY") { "" } # = html("PRETTY" => " ") { "" } html(if $VERBOSE then "PRETTY" end) { "HTML string" }
# File lib/cgi/html.rb, line 402 def html(attributes = {}) # :yield: if nil == attributes attributes = {} elsif "PRETTY" == attributes attributes = { "PRETTY" => true } end pretty = attributes.delete("PRETTY") pretty = " " if true == pretty buf = "" if attributes.has_key?("DOCTYPE") if attributes["DOCTYPE"] buf << attributes.delete("DOCTYPE") else attributes.delete("DOCTYPE") end else buf << doctype end buf << super(attributes) if pretty CGI::pretty(buf, pretty) else buf end end
Generate an Image element as a string.
src
is the URL of the image. alt
is the
alternative text for the image. width
is the width of the
image, and height
is its height.
Alternatively, the attributes can be specified as a hash.
img("src", "alt", 100, 50) #  img("SRC" => "src", "ALT" => "alt", "WIDTH" => 100, "HEIGHT" => 50) #
# File lib/cgi/html.rb, line 473 def img(src = "", alt = "", width = nil, height = nil) attributes = if src.kind_of?(String) { "SRC" => src, "ALT" => alt } else src end attributes["WIDTH"] = width.to_s if width attributes["HEIGHT"] = height.to_s if height super(attributes) end
Generate a Form element with multipart encoding as a String.
Multipart encoding is used for forms that include file uploads.
action
is the action to perform. enctype
is the
encoding type, which defaults to “multipart/form-data”.
Alternatively, the attributes can be specified as a hash.
multipart_form{ "string" } # <FORM METHOD="post" ENCTYPE="multipart/form-data">string</FORM> multipart_form("url") { "string" } # <FORM METHOD="post" ACTION="url" ENCTYPE="multipart/form-data">string</FORM>
# File lib/cgi/html.rb, line 499 def multipart_form(action = nil, enctype = "multipart/form-data") attributes = if action == nil { "METHOD" => "post", "ENCTYPE" => enctype } elsif action.kind_of?(String) { "METHOD" => "post", "ACTION" => action, "ENCTYPE" => enctype } else unless action.has_key?("METHOD") action["METHOD"] = "post" end unless action.has_key?("ENCTYPE") action["ENCTYPE"] = enctype end action end if block_given? form(attributes){ yield } else form(attributes) end end
Generate a Password Input element as a string.
name
is the name of the input field. value
is
its default value. size
is the size of the input field
display. maxlength
is the maximum length of the inputted
password.
Alternatively, attributes can be specified as a hash.
password_field("name") # <INPUT TYPE="password" NAME="name" SIZE="40"> password_field("name", "value") # <INPUT TYPE="password" NAME="name" VALUE="value" SIZE="40"> password_field("password", "value", 80, 200) # <INPUT TYPE="password" NAME="name" VALUE="value" SIZE="80" MAXLENGTH="200"> password_field("NAME" => "name", "VALUE" => "value") # <INPUT TYPE="password" NAME="name" VALUE="value">
# File lib/cgi/html.rb, line 541 def password_field(name = "", value = nil, size = 40, maxlength = nil) attributes = if name.kind_of?(String) { "TYPE" => "password", "NAME" => name, "VALUE" => value, "SIZE" => size.to_s } else name["TYPE"] = "password" name end attributes["MAXLENGTH"] = maxlength.to_s if maxlength input(attributes) end
Generate a sequence of radio button Input elements, as a String.
This works the same as checkbox_group(). However, it is not valid to have more than one radiobutton in a group checked.
radio_group("name", "foo", "bar", "baz") # <INPUT TYPE="radio" NAME="name" VALUE="foo">foo # <INPUT TYPE="radio" NAME="name" VALUE="bar">bar # <INPUT TYPE="radio" NAME="name" VALUE="baz">baz radio_group("name", ["foo"], ["bar", true], "baz") # <INPUT TYPE="radio" NAME="name" VALUE="foo">foo # <INPUT TYPE="radio" CHECKED NAME="name" VALUE="bar">bar # <INPUT TYPE="radio" NAME="name" VALUE="baz">baz radio_group("name", ["1", "Foo"], ["2", "Bar", true], "Baz") # <INPUT TYPE="radio" NAME="name" VALUE="1">Foo # <INPUT TYPE="radio" CHECKED NAME="name" VALUE="2">Bar # <INPUT TYPE="radio" NAME="name" VALUE="Baz">Baz radio_group("NAME" => "name", "VALUES" => ["foo", "bar", "baz"]) radio_group("NAME" => "name", "VALUES" => [["foo"], ["bar", true], "baz"]) radio_group("NAME" => "name", "VALUES" => [["1", "Foo"], ["2", "Bar", true], "Baz"])
# File lib/cgi/html.rb, line 684 def radio_group(name = "", *values) if name.kind_of?(Hash) values = name["VALUES"] name = name["NAME"] end values.collect{|value| if value.kind_of?(String) radio_button(name, value) + value else if value[-1] == true || value[-1] == false radio_button(name, value[0], value[-1]) + value[-2] else radio_button(name, value[0]) + value[-1] end end }.join end
Generate a reset button Input element, as a String.
This resets the values on a form to their initial values.
value
is the text displayed on the button. name
is the name of this button.
Alternatively, the attributes can be specified as a hash.
reset # <INPUT TYPE="reset"> reset("reset") # <INPUT TYPE="reset" VALUE="reset"> reset("VALUE" => "reset", "ID" => "foo") # <INPUT TYPE="reset" VALUE="reset" ID="foo">
# File lib/cgi/html.rb, line 719 def reset(value = nil, name = nil) attributes = if (not value) or value.kind_of?(String) { "TYPE" => "reset", "VALUE" => value, "NAME" => name } else value["TYPE"] = "reset" value end input(attributes) end
Generate a submit button Input element, as a String.
value
is the text to display on the button. name
is the name of the input.
Alternatively, the attributes can be specified as a hash.
submit # <INPUT TYPE="submit"> submit("ok") # <INPUT TYPE="submit" VALUE="ok"> submit("ok", "button1") # <INPUT TYPE="submit" VALUE="ok" NAME="button1"> submit("VALUE" => "ok", "NAME" => "button1", "ID" => "foo") # <INPUT TYPE="submit" VALUE="ok" NAME="button1" ID="foo">
# File lib/cgi/html.rb, line 749 def submit(value = nil, name = nil) attributes = if (not value) or value.kind_of?(String) { "TYPE" => "submit", "VALUE" => value, "NAME" => name } else value["TYPE"] = "submit" value end input(attributes) end
Generate a text field Input element, as a String.
name
is the name of the input field. value
is
its initial value. size
is the size of the input area.
maxlength
is the maximum length of input accepted.
Alternatively, the attributes can be specified as a hash.
text_field("name") # <INPUT TYPE="text" NAME="name" SIZE="40"> text_field("name", "value") # <INPUT TYPE="text" NAME="name" VALUE="value" SIZE="40"> text_field("name", "value", 80) # <INPUT TYPE="text" NAME="name" VALUE="value" SIZE="80"> text_field("name", "value", 80, 200) # <INPUT TYPE="text" NAME="name" VALUE="value" SIZE="80" MAXLENGTH="200"> text_field("NAME" => "name", "VALUE" => "value") # <INPUT TYPE="text" NAME="name" VALUE="value">
# File lib/cgi/html.rb, line 781 def text_field(name = "", value = nil, size = 40, maxlength = nil) attributes = if name.kind_of?(String) { "TYPE" => "text", "NAME" => name, "VALUE" => value, "SIZE" => size.to_s } else name["TYPE"] = "text" name end attributes["MAXLENGTH"] = maxlength.to_s if maxlength input(attributes) end
Generate a TextArea element, as a String.
name
is the name of the textarea. cols
is the
number of columns and rows
is the number of rows in the
display.
Alternatively, the attributes can be specified as a hash.
The body is provided by the passed-in no-argument block
textarea("name") # = textarea("NAME" => "name", "COLS" => 70, "ROWS" => 10) textarea("name", 40, 5) # = textarea("NAME" => "name", "COLS" => 40, "ROWS" => 5)
# File lib/cgi/html.rb, line 807 def textarea(name = "", cols = 70, rows = 10) # :yield: attributes = if name.kind_of?(String) { "NAME" => name, "COLS" => cols.to_s, "ROWS" => rows.to_s } else name end super(attributes) end


Sign up
Sign up
Or
Facebook
Google plus
By creating an account, you agree with the
Terms and Conditions
.
© 2017 Your Company
Welcome to
Maisonette
Enjoy
Don't have an account?
Sign Up


These functions have been created to aid in compiling the HAB reports by creating a conditionally formatted table in pptx format.
Phytoplankton count data in its raw form (hereafter called raw data) provides count and other information for a multitude of species. This data is analysed and provided to us by the Department of Water and Environmental Regulation's Phytoplankton Ecology Unit. In order to compile the HAB report the data needs to be summarised to reflect only HAB related data. This first stage undertakes this process and outputs summaries that are used in stage two.
An important parameter for these functions is the "mngt_response_triggers" csv. This is a csv file containing a table that reflects current summary groups, included species and trigger threshold values for the HAB report. This information not only guides the summary but its layout also guides the final format of the output pptx file. Below is an example.
The table variables are:
table_ord
this is the ordering of the table_name
groupings as they will appear in the final output. Each unique group must have its own table_ord
number.table_name
this is a broad grouping to which individual species will be assigned to. Multiple species can be assigned to a single group. This table_name
reflects exactly the desired format for the output pptx file.spp_name
this is the species names and should follow the same format, i.e. snake_case. Make sure the spelling is as is reported in the raw phytoplankton data.surveillance
any value equal to this number and less than or equal to the notification
value will be classified as "surveillance" and coloured orange in the output pptx file.notification
any value greater than this will be classified as "notification" and will be coloured red in the output pptx file.To make things easier to setup, the rivRmon
package comes with an example. This can be read in, adjusted accordingly to reflect current trigger species and thresholds and then saved to csv for later use. To do this follow the example below.
#load the package
library(rivRmon)
#assign the internal data to an object called triggers
triggers <- mngt_response_triggers
#you can then save straight to csv and edit as you would an excel file
readr::write_csv(triggers, path = "C:/some_file/path")
After making sure you have access to either the current management trigger info, or have created your own, you need to supply two file paths. One to the raw data xlsx spreadsheets and a file path to the desired location of the exported summary data. This summary data will be written to a HAB_tables/
directory and if it doesn't already exist it will be created. Your next function call should look something like the below.
#run the hab_groupR function
hab_groupR(pathin = "C:/path/to/raw_data", pathout = "C:/path/for_export",
mngt_triggers = "C:/path/to/trigger/data")
The only thing to be careful of is ensuring that if you are copying a fiile path from a Windows OS you will need to double all the backslashes for the path to be recognised. The above example is the alternative method where the backslashes are converted to a single forward slash.
Lastly there are two parameters that have default values.
skip
defaults to 5. The format of the raw data has 5 lines of unrequired metadata at the top. If the format changes this can be changed too.shell
refers to a possible new site on the Canning River. The default for this is FALSE. If this site becomes a permanent addtion to the monitoring then changing this value to TRUE will ensure this site is reflected in the summaries and output pptx file.This next stage reads in all the summary HAB data csv's and based on the date provided, generates a table containing the current and prior week's cell counts for the groupings indicated in the trigger data with conditionally coloured text to indicate classification.
To accomplish this, run code similar to the below.
#run the hab_tablR function
hab_tablR(hab_tables = "C:/path/to/HAB_tables", date = "20190715",
mngt_triggers = "C:/path/to/trigger/data")
The hab_tables =
input for the hab_tablR()
function is a file path to the location of the HAB_tables/
directory not the summary csv's themselves. This is essentially the pathout parameter that you specified when running hab_groupR()
. Note that the format for the date is "yyyymmdd" and can be presented as above in the code snippet or contain separators (e.g. "2019/07/15" or "2019-07-15").
The output will be a single page of a PowerPoint with a table of different coloured counts per site (depending on the river). This table can be then either incorporated into an existing report and formatted for page size and any other tweaks or values can be copied out and put into a "pre-formatted" table.


Table of content
Introduction
Usage instructions for test implementers
Usage instructions for framework maintenance
Web support in TAF |
Documentation for test automation solution TAFThis document tries to explain the concepts applied to the test automation solution as well as the intention and the structural layout of the system and how to get started using the framework, both as a tester who implements test cases, or a test automation framework maintenance person. Basic conceptsThe solution is intended to reside on fundamentally sound architecture principles, with thought given to independence and integration of concerns internally in code and components. The test automation framework was developed with ease of use and minimum maintenance in mind. It is developed around a few central concepts and ideas that has been turned into features. ExtendabilityThis solution is implemented with object factory patterns and a plug-in structure for implementing different driver support to ease extendability and adaptation. Separation of concerns
The framework is component based and should be a different entity than the test and the application description all-together. Page classes with object definitionsElement descriptions defined as static objects in classes - and not their actual run time version. This makes it possible to only update in one place when the GUI changes. Abstraction between driver, runner and frameworkThis makes it possible to update driver or runner when new tools come in fashion or the technology in the system under test is updated so the driver has do be updated. Ease of debugging
Logging levels for different types of testCaseLog entries, both navigational, verificational or framework derived ones as well as screenshots and extra info to the testCaseLog when errors occur. Ease of understanding test resultSummary report is presented in different channels, with statistics, links to detailed test results, grouping of similar errors, presentation of known errors and more. No nagging
Support for grouping of errors if several test cases encounter similar errors and support for managing known errors that are treated different from new errors. Basically only the information you kneed, when you need it. Ease of test case implementation for non-technical staffThe use of Test Actions and pre-defined GUI-objects makes script creation intuitive through IDE auto-completion. Portable tool solution
Included tools are all open-source and Java compatible for platform support, scalability and portability. Support for CI/CDUsing standard Java and standard Java components integration with CI servers are ensured. Intended structural layoutGiven that this documentation is included in the code itself, the code itself might be alterable. However, the intended structural layout is described below.
The user describes the tests in test specifications. The test specifications consist of test action calls. The test actions make use of GUI elements described in page objects and navigational components that also make use of GUI elements of page objects, but possibly also from test data factories. The use of these application description components are not mandatory, but encouraged. The framework makes sure the test runs and the results are reported correctly. The framework make sure the interaction with the GUI elements are carried out by the driver abstraction layer. The driver abstraction layer is simply a layer that makes shifting driver easier when new technologies or test tools come in fashion. The framework is a component that can be version managed apart from application related code for the system under test. Application related code are the test part above and the application description part. Information structureThe information entities in the system include:
Each test execution is a new test run. Known errors can be stated for both test cases and test sets. Displaying known errors are suppressed unless they are encountered. If encountered they are displayed both in the summary report and the test case logs for the test cases where they were identified. Test case logging
Information about events during execution of a test case is gathered in a test case testCaseLog
of the Log class, consisting of testCaseLog posts. After execution of a test case the testCaseLog
is saved as HTML document and/or a test document for the test case. Screenshots that has been
taken during execution is referenced into the testCaseLog files. Test run summary reportAfter each test case execution the test testCaseLog is being analyzed for the summary report that is produced after each test run if the test case count for test cases executed is more than one. This number is chosen due to debugging or creation of test cases often makes you run single test cases, and the fact that a summary makes minimum sense if only one test case has been executed. At the end of a test run the test summary report is being compiled and saved, if more than one test case has been executed. Test case dataEach test case has a list of test data used during test execution. This mechanism is implemented for ease of debugging, and is displayed in the test case testCaseLog generated after test case execution. If no test case data is saved during execution the test case data section of the test case testCaseLog is suppressed. SettingsDefault settings are saved in a runSettings.properties file at first run. These settings may be altered from the file itself, or overridden when the test automation solution is used from the command line.
Usage instruction for test implementersThis chapter contain usage instructions for people mainly interested in using this framework. It aims at describing ways of working and best practices. Interpreting logsThe better one get at analyzing the logs, the easier it get to perform maintenance tasks for the test automation, and lesser time is spent on debugging. A lot of effort has been put into get the logs easily read. Logs are saved to a testRunLogFolder in the baseLogFolder specified in the settings. The test run log folder is named from the time it ran and the test set name. 20160923_165101_se.claremont.homepage.admintests There are several types of logs and the information in the logs depend on the situation. Generally a lot of data is assessed but only relevant data is displayed. Screenshots taken during test run, and other debugging info, is also saved to the test run log folder. Test summary reportThe test summary report is produced as the last step of a test run, but only if two or more test cases has been run. Running a single test case is assumed to be a script debugging activity, and a summary report makes minimal sense if only one test case is run. The summary report is always saved to the testRunLogFolder in the baseLogFolder specified in the settings. It always has the same name: _summaryReport.html The underscore character in the report name is there to make sure the summary is always on top if the folder content is listed in alphabetical order. The summary report always shows a statistics summary of the test cases executed and a listing of the results of each test case - with links to the test case logs. If known errors are registered for test cases or test sets in the test run they are displayed as encountered (marked with yellow color) if encountered, or listed as not encountered - and possibly fixed - bugs if not encountered. New errors are displayed in their own section - with the test cases where they were encountered as well as links to the test case logs. Test case logsThere are two types of test case logs. One is purely text based. It is used to print output to console, for ease of debugging from an IDE. The other is HTML based for a friendlier format and to be able to present test results better. Both log types are saved in the testRunLogFolder that is created in the baseLogFolder the beginning of a test run. The test case logs includes test data used during execution, timestamps and log rows. If known errors are encountered during execution these are marked separately. If screenshots are taken during test execution a thumbnail picture of the screenshot is displayed in the HTML log. On mouse-over it gets slightly larger, and if it is clicked it is opened in full size in a new browser window or browser tab. Log level usages explained
Debug log posts are considered unimportant if the test case is passed and are suppressed when creating the test case logs if execution and all verifications are successful. Implementing a test classTest classes is the runner entity of a collection of test cases. In this framework the test classes generally extend the TestSet class in order to get full logging possibilities. The syntax of the test runner (for example JUnit) is fully usable in a test class. An example of a test class would be: public class DemoTests extends TestSet { @Rule public TestName currentTestName = new TestName(); private DemoTestActions app; @Before public void testSetup(){ startUpTestCase(currentTestName.getMethodName()); app = new DemoTestActions(currentTestCase); name = this.getClass().getSimpleName(); } @After public void testTearDown(){ wrapUpTestCase(); } @AfterClass public static void ClassTearDown(){ CliTestRunner.testRun.htmlSummaryReport.evaluateTestSet(CliTestRunner.testRun.currentTestSet); CliTestRunner.testRun.htmlSummaryReport.writeReport(); } @Test public void dummyTest1(){ app.logIn(); app.logOut(); } } It might be worth noting that the technology specific classes of the test automation is being kept away from the test class. Instead this is used in the test action class. Implementing test casesA test class can consist of many test cases. The test case is run to completion, or until some error that is considered to severe to continue is encountered. If a test case is interrupted so severely that it can't continue it will be closed down and reported before the execution of the next test case will be performed. Test cases are marked with the '@Test' keyword of the test runner (JUnit) in order to be able to be discovered as tests by the runner. @Test public void dummyTest1(){ app.logIn(); app.logOut(); } The convention of using app as the test action object instance eases for non-programmers to implement test cases since the auto-completion feature of modern IDEs is very helpful to know what to do. Implementing a test actions classSince several test cases might share test steps it is beneficial to gather the test steps as test actions in a test actions class for the application under test. An example of a test actions class can be seen below. This class also utilizes a separate navigation mechanism class in order to keep the test actions short and reduce code maintenance. The navigation mechanism class also has the benefit of turing navigation into a pattern, making logging more consistent and thorough. It also makes test execution robust since checks for correct application state can be implemented with ease. class DemoTestActions { final WebInteractionMethods web; final DemoNavigationMechanism nav; final TestCase testCaseResult; public DemoTestActions(TestCase testCaseResult){ this.testCaseResult = testCaseResult; web = new WebInteractionMethods(testCaseResult); nav = new DemoNavigationMechanism(web); } public void logIn(){ nav.navigateToLoginPage(); web.click(DemoLoginPage.loggaInButton()); web.verifyTextOnCurrentPage("Logged in"); } public void logOut(){ nav.loggedIn(); web.click(DemoLandingPage.loggaUtButton()); web.verifyTextOnCurrentPage("Logged out"); } } Inside the test actions class technology specific commands are issued and most verifications are being made. The test actions class should be able to keep package-private in most cases. Adding a known error
It's annoying having the test automation solution reporting deviations from expected results when you know about the error already. @Test public void testCaseNumber1() { currentTestCase.addKnownError("My pages cannot yet be opened.", "The current page title was expected to be 'My pages', but was*"); ... }If this error is triggered (all the stated pattern strings are found on testCaseLog rows for the test case) the test case is considered to have triggered a known error. Known errors can also be stated for full test sets: public class DemoTests extends TestSet { DemoTestActions demoTestActions ; @BeforeClass public void ClassInitialize(){ addKnownError("My pages cannot yet be opened.", "The current page title was expected to be 'My pages', but was*"); }
Using the command line interfaceA command line interface is provided with this solution. For some instances this might be helpful for continuous integration and continuous deploy purposes. The runnable jar file that can be produced from the solution can be used in a few different ways. If used straight off it will run the test classes provided as arguments. Example: C:\>java -jar autotest.jar MyTestClass.class However, any argument containing an equal-sign ('=') will be treated as a test run parameter. If a test run parameter with the same parameter name exist in the test run settings file the given parameter value will be used instead of the one in the file. Example: C:\>java -jar autotest.jar MyTestClass.class emailRecipients=firstname.lastname<EMAIL_ADDRESS>If the word 'diagnostics' is encountered among the arguments this will trigger a self-check by running both the unit tests and the smoke tests checking the installation environment (read ability for file locations and so forth). If the jar is invoked without parameters, or with parameters like 'help' or 'man' a short help text will be displayed. Position based object identificationIn some systems it's hard to identify elements from for example id's - either from developer laziness or from technology obstacles. Hence TAF contains a mechanism for identifying elements from their relative position to other elements, based on their location in the GUI. An exampleof how this could be applied would for example be: PositionBasedIdentificator.fromAllTheElements(elementsInWindow("Demo")).keepElementsOfType("button").atTheSameHeightAs(Button_Start).theObjectMostToTheLeft(); This mechanism always starts with a collection of elements, narrowing it down until a solid identification can be performed. Of course this identification mechanism is slower than most other identification mechansims and should therefore only be used when really nessesary. Usage instruction for framework maintenanceNaming conventionsDriverA driver is a component that interacts with an interface for us. Most drivers are third party drivers, like Selenium WebDriver, Jasmine, SoapUI, Sikuli or similar. RunnerA runner is the component used to run the test and to collect and gather test result status as well as providing assert library at runtime. This test automation solution utilizes JUnit as a test runner. The reason for choosing JUnit is the possibility for parallel test execution and the Assume command providing the possibility to mark some test case results as suspect at runtime. FrameworkA framework provides structure and enhanced logging to the test automation solution. It's basically the stuff between the driver and the test in the top most figure of this document. Data factory
A data factory is a helper class that manages test data and makes sure a test case has valid test data to work with. The data factory might for example use mechanisms like:
Coding guidelinesSelf-contained solutionMake sure all dependencies are taken care of through the maven pom file. Also pay attention to the code structure and make sure it can run as a runnable jar file from the command line. CommentsWrite javadocs style comments for all public methods of any class. Scan for security weaknessesScan all code for weak access restrictions to classes and methods. Document code structure in readable formatDescribe conceptual design of features in this document to make it easy for new people to understand code structure. Write unit tests for framework methods
Methods and classes in framework and support classes should be covered with unit tests.
Unit tests should be placed in the same package as the classes they test to keep separation of concerns
while enabling package-private access to ensure testability.
Run the unit tests before check-inThe unit tests should be run green before each check-in. Anyone who breaks the build when it could have been prevented by running proper tests will have to provide compensation in beer, stuffed animals, cookies or cake. Logging element namesWhen designing a glue class for a new driver it's beneficial to use log identification strings for elements without any quotation marks around the object name since the log file is split for quotation marks to understand what is data element in data elements. Generally this is not beneficial for log row similarity checking for error grouping. Naming syntax
Classes are substantives written with initial capital letter, and capital letters for all words in classes MyClass. Creating a plug-inThis framework support three kinds of plugins. Either new driver plugins, or new reporting plugins for test runs, or new reporting plugins for test cases.
GUI Driver pluginsSupport for new third party drivers can be achieved by creating a "glue class" that makes the driver methods implement the GuiDriver interface. It is strongly encouraged to also implement an abstraction of GUI elements used, by letting them imlement the GuiElement interface. In the long run this makes it easy to substitute driver when new ones emerge.
Generally speaking the GuiDriver interface implementation methods could be grouped in a few categories. Navigational methodsMethods like for example click(), or write(). These are used to drive the test flow forward. Generally speaking the navigational methods return void, and only log the following log levels to the test case log.
Navigational methods might stop further test case execution if the problems are severe. Flow control methdosMethods like for example isDisplayed(), isNotDisplayed() act to support execution and flow in a test case. These methods return true or false and only log debug log levels. Verification methodsVerification methods are used to assess states of something, like verifyObjectIsDisplayed(). They generally doesn't have return values, but log results to the test case log in the following log levels.
Reporting pluginThis framework has its own reporting mechanism out of the box, but you might want to propagate test results to a test management system in order for the test results to be easily followed up upon, or for ease of communication purposes. Currently reporting plugins are only implemented at the test case level and the test run level. Implementing a new test case reporter pluginTo introduce new reporting mechanism for test cases, or to discontinue some of the old ones, create a class implementing the TestCaseLogReporter interface, and make sure the TestCase class 'reporters' field adds an instance of that class. Implementing a new test run reporter pluginTo introduce new reporting mechanisms for test runs, or to discontinue some of the old ones, create a class implementing the TestRunReporter interface, and make sure the TestRun class 'reporters' field adds an instance of that class. Packages in frameworkThe framework code has been divided into packages for ease of understanding. Packages:
Current dependenciesSeveral dependencies are used in the solution. These are referenced via the maven pom-file. Current dependencies include:
Web testing with TAFOne of the key areas for TAF is the web testing part. TAF for web has been developed with robustness and precise and valuable logging in mind. Key conceptsReplacable driverCurrently Selenium WebDriver is used as a driver. The primary motivator behind the choice of Selenium is that it is versatile, supports many browsers, has an active community, is comprehensive, is easy to find competence around. However, since implementation of methods are based upon the GuiDriver interface and the DomElement class rather than the WebElement class of Selenium itself, makes it easier to substitute the driver, should the need arise. Separation of method intent by naming conventionMethods for interaction with web are generally divided into a few sub-groups, depending on their intent.
When things do not go as expected, screenshots are saved, as is the html source of the current page. If the error is severe enough for valid continued testing the execution is ended for the rest of the test case. Ease of getting startedThe method called mapCurrentPage() can be inserted into any script. It is useful for creating page objects for new pages. It parses the source code of a page and produces the DomElement object declarations it can identify on the current page. These are saved to a file and can be copied into any page class. Technical test information with a single line of codeOne of the main concerns for multi-browser support is that different browsers treat html errors differently. With the verifyCurrentPageSourceWithW3validator() method the page source of the current page is validated with the W3C validator service through a REST call in the background. You can choose if the report should be verbose (including errors, information and warnings), or not (including only errors). Versatile execution by executing javascriptsWeb technologies are developing fast. As one resort TAF has the mechanism to execute javascript directly in the test run, on the page you are corrently interacting with. This is done via the method executeJavascript(). Example: web.executeJavascript("document.findElementById('demoStrangeRadioButton').innerHTML = 'changed'"); REST testing with TAFOne of the most common methods for communicating between systems or between parts of a system is through REST. It is a stateless HTTP mechanism for transfering data. Almost all REST based communication has XML or JSON as data formats. Since REST is HTTP based (a protocol created for text transfering) it uses the PUT, GET, POST, or DELETE methods of the HTTP protocol to insert, update, query or delete data in the service at the other end. TAF utilizes the third party library OkHttp3 for HTTP support and the JSON library of Java itself for JSON management. The choice of OkHttp3 was based on it's ease of implementation, and for it being quite light-weight. The choice of JSOn library was out of laziness. Closing remarksAttributionsThis framework was developed and is being maintained by Claremont AB. References and other documentation
Method documentation can be generated from comments in the code. |


Flippy Media Streamer
Search and browse podcasts. Stream or listen offline.
What's New In This Release
Bla


Local sandwich shop offers Maurkice Pouncey job as bouncer during suspension
by Marcelo VillaIf Maurkice Pouncey doesn’t win his appeal against the three-game suspension he got from the NFL, there’s a local business willing to offer him a job until he can come back.
On Friday, the NFL handed out punishments for the melee that occurred in the closing seconds of Thursday night’s game between the Steelers and Browns, and Pouncey was among the players to get hit with a suspension and a fine.
Primanti Bros., a Pittsburgh-based restaurant known for its legendary sandwiches, commended the Steelers center for protecting his quarterback during the brawl, and offered him a job as a bouncer. Pouncey had a hilarious response to the offer.
That isn’t the only offer Pouncey has gotten to help pay for his fines, either. Steelers fans have also started a GoFundMe for Pouncey.


Class vfsStreamDirectoryTestCase
Test for org\bovigo\vfs\vfsStreamDirectory.
- PHPUnit_Framework_TestCase
- org\bovigo\vfs\vfsStreamDirectoryTestCase
Namespace: org\bovigo\vfs
Located at vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php
Located at vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
renameToInvalidNameThrowsvfsStreamException( )
renaming the directory to an invalid name throws a vfsStreamException |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
childHandlingWithSubdirectory( )
test that adding, handling and removing of a child works as expected |
public
|
|
public
|
#
explicitTestForSeparatorWithNestedPaths_Bug_24( )
When testing for a nested path, verify that directory separators are respected properly so that subdir1/subdir2 is not considered equal to subdir1Xsubdir2. |
public
|
|
public
|
|
public
|
|
public
|
protected
|
$dir
instance to test |


The October 2019 security update will be the end of the road for the OnePlus 3/3T
by Jared PetersThe OnePlus 3 and OnePlus 3T were both very solid phones from a few years ago, before OnePlus really starting to hit the mainstream market. They were really some of the first phones to launch OnePlus into a competitive place, and they’ve been receiving security updates ever since.
But all good things must come to an end. OnePlus has announced that the October 2019 security patch will be the last update that the phone ever sees.
That’s a long time for any phone, especially when most manufacturers only commit to two years of security updates. OnePlus guaranteed an extra year, making the OnePlus 3/3T a very well-supported family of phones.
OnePlus will be rolling out this update in stages, so don’t be alarmed if you don’t get it right away. When you do see it, keep in mind that this is a very small update; we’re looking at an update to the latest security bulletin, plus a couple bug fixes.
-
System
- Updated Android security patch to 2019.10
- Updated GMS apps
- General bug fixes and improvements
You had a good run, OnePlus 3.
source: XDA Developers


This document describes use cases that justify the extension of RDF in the current work in RDF star community group. It is collaborative work and is a non normative part of this group output.
This document is a community working draft.
This document collects together use cases and requirments for RDF* (RDF Star). These use case were provided by members of the W3C RDF Community Group on the RDF* mailing list and issue 29 of the community's GitHub repository.
Add a comment to issue 29
It is helpful to include some text in the form:
WHO: As anWHAT: I want a WHY: So that
This is not mandatory.
From EasierRDF-RDFstar/RDFStarUCandRequirements.html .
Richard Cyganiak.
I want to be able to annotate triples that are not in the graph
As an web user, I want to be able to annotate any triples, regardless of whether they are in the same graph or not. Then I can annotate triples in a graph elsewhere on the web.
Andy Seaborne
As an information engineer, I want to be able to manage annotation triples separately from the data triples themselves. I wish to have a separategraph in the same RDF dataset. This will make data management more convenient - e.g. publishing without annotations; e.g. querying the data without the annotations visible.
Dan Brickley
I want to use an RDF* triple to capture something like, e.g., "the graph denoted by IRI ex:mygraph contains the edge/triple (ex:Bob, foaf:knows, ex:Alice)."
Ghislain Atemezing
I want to combine TriG notation / Named Graph / RDF* all together. What is feasible or not with RDF*?
Jeff Lerman


Answer Details
Question (en)
Question (ru)
Wording (en)
Wording (ru)
Answer Type
Source
Source Details
Comment
Edit Answer
Add Key Term
Key Terms
Name


The Cheesy Floofs were born out of a group of friends with a love for STEM. They all attended
Vincent Massey Secondary School and were all taking similar courses. They heard of SPARC and
decided to sign up, thus the Cheesy Floofs were born.
This is the Cheesy Floofs first competitive season at SPARC, but we do have goals for expanding
our team. Inclusivity is a main tenet of the Cheesy Floofs as such all students will be invited
regardless of socioeconomic status or gender. We are a first year team at SPARC and we can use
the excitement of being new to drive recruitment up and hopefully ride the wave into the future.
Our mission as the Cheesy Floofs is to encourage and promote STEM to youth across the
universe.
Sponsors
"With the help of Mr. Goose, I finally discovered my inner engineer! <3"


BICYCLES
ACCESSORIES
COMPONENTS
CLOTHING
Ut enim ad minim veniam quis nostrud
BIKE REPAIR
BIKE FITTING
PICK UP & DELIVERY


consulting
Simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a...
Read Moreconsulting
Simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a...
Read Moreconsulting
Simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a...
Read More


Home
About Us
Theme
Events
Flagship Events
Register
Team Registration
Login
Profile
Our Team
OUR SPONSORS


Update Zebra and Giraffe to .NET Core 3.1.1 by forki · Pull Request #5421 · TechEmpower/FrameworkBenchmarks Just small fixes to update Zebra and Giraffe to .NET Core 3.1.1
.NET Design Review: System.CommandLine /player_ias-vfl0m8XVi/en_US/base.js","css":"/yts/cssbin/player-vflnCF_bL/www-player-webp.css"},"args":{"cos":"Windows","player_response":"{
Globally Require Authenticated Users By Default Using Fallback Policies in ASP.NET Core tldr; You can use Fallback Policies in ASP.NET Core 3.0+ to require an Authenticated User by default. Conceptually, you can think of this as adding an [Authorize] attribute by default to every sing…
Excluding health check endpoints from Serilog request logging: Using Serilog.AspNetCore in ASP.NET Core 3.0 - Part 4 In this post I show how to skip the summary log for some requests when using Serilog.AspNetCore's request logging middleware
Kids and Code: Object Oriented Programming with Code Combat Geez time flies. It's just a tad under 4 years ago that I wrote about teaching kids to code with code.org which is an amazing resource for young ones to start learning programming basics. In that post I shared a photo of my then 6-year-old son Ari holding...
tmds/Tmds.LibC Raw bindings to Linux platform APIs for .NET Core. Contribute to tmds/Tmds.LibC development by creating an account on GitHub.
.on() | jQuery API Documentation Description: Attach an event handler function for one or more events to the selected elements.
Archived MSDN and TechNet Blogs We're no longer updating this content regularly. Check the Microsoft Product Lifecycle for information about how this product, service, technology, or API is supported.
Colouring Numbers - Numberphile Fields Medallist Sir Timothy Gowers discusses Van der Waerden's theorem. Interview continues on Numberphile2 at: https://youtu.be/hHIfJcwipAY More links & stuff in full description below ↓↓↓ Timothy Gowers website: https://gowers.wordpress.com And his T...
Pupils praise 'maths whisperer' teacher after entire class achieves A* in GCSE A school in Cardiff is celebrating after an entire class achieved A* in their maths GCSE, after sitting the exam six months early. The Year 11 group at Fitzalan High School now refer to teacher Francis Elive as "the maths whisperer" as some of the class...
Transatlantic ping faster than sending a pixel to the screen? John Carmack tweeted, I can send an IP packet to Europe faster than I can send a pixel to the screen. How f’d up is that? And if this weren’t John Carmack, I’d file it under “the interwebs being
Dotnet-Boxed/Templates .NET project templates with batteries included, providing the minimum amount of code required to get you going faster. - Dotnet-Boxed/Templates
Invoking non-HTTP Azure Functions over HTTP to make development easier This week, I was presenting at IglooConf (Indexing and searching NuGet org with Azure Functions and Search). During one of the demos, I casually used a feature we shipped with the latest Azure Toolkit for JetBrains Rider: when the Azure Functions host is ...
.NET everywhere apparently also means Windows 3.11 and DOS - Scott Hanselman I often talk about how .NET Core is open source and runs 'everywhere.' MonoGame, Unity, Apple Watches, Raspberry Pi, ...
Roam Research – A note taking tool for networked thought. As easy to use as a word document or bulleted list, and as powerful for finding, collecting, and connecting related ideas as a graph database. Collaborate with others in real time, or store all your data locally.
Penn and Teller's How to Play with Your Food: Penn Jillette:<PHONE_NUMBER>837: Amazon.com: Books Penn and Teller's How to Play with Your Food [Penn Jillette] on Amazon.com. *FREE* shipping on qualifying offers. What kid of any age can resist a book guaranteed to make fellow diners blanch at restaurants or at the family dinner table? Mean
Vagrant by HashiCorp Vagrant enables users to create and configure lightweight, reproducible, and portable development environments.
NASM - The Netwide Assembler This manual documents NASM, the Netwide Assembler: an assembler targetting the Intel x86 series of processors, with portable source.
How to write a simple operating system in assembly language This document shows you how to write and build your first operating system in x86 assembly language. It explains what you need, the fundamentals of the PC boot process and assembly language, and how to take it further. The resulting OS will be very small ...
Package Hosting and Distribution - feedz.io Store, replicate and distribute your private NuGet packages with no user limit and transparent pricing
DotNetAnalyzers/StyleCopAnalyzers An implementation of StyleCop rules using the .NET Compiler Platform - DotNetAnalyzers/StyleCopAnalyzers


|
DESERT
3.0
|
Go to the source code of this file.
Classes | |
| class | MS2C_EvoLogics |
Macros | |
| #define | MIN_NOISE_PROBE_FREQ 3 |
| #define | MIN_MULTIPATH_PROBE_FREQ 2 |
Header of the main class that implements the general interface between ns2/NS-Miracle and the S2C EvoLogics modem.
Definition in file mS2C_EvoLogics.h.
| #define MIN_MULTIPATH_PROBE_FREQ 2 |
Definition at line 45 of file mS2C_EvoLogics.h.
| #define MIN_NOISE_PROBE_FREQ 3 |
Definition at line 44 of file mS2C_EvoLogics.h.


A Class for Dev Bootcamp Boots
Yah. I did it. Oh and it's my birthday!!!! @devbootcamp pic.twitter.com/IZNV74E5Nm
— Lorena Mesa (@loooorenanicole) March 7, 2014
Class is an important concept in Ruby. As Boots are important at DBC, it's only fitting that they should have their own Ruby Class.
Class is one of the most important concepts in the Ruby languange. Classes allow us to define objects. We instantiate an object in Ruby by calling [Class Name].new and when we do so, we have created a new object with the Class of whatever we named it. We can even alter existing Classes in Ruby by opening and defining them again.
We can create a Class to model real world objects. If you are writing a program for something, you will most likely pick at least one real world element to model with a Class, and in most instances, you will model more than one with a Class.
To demonstrate this, I thought it would be fun and helpful to model a real world object that is very near and dear to my heart. The Boot is also a very important part of the Dev Bootcamp system. One could certainly argue that it is the most important part.
So, how do we know when to use a Class to model an object? Well, anytime that we have an object that needs to be manipulated and have it's own characteristics or methods, then we need to create a Class for it.
Take a look at the Boot Class below and I think it will start to make more sense. Keep in mind that I have added quite a bit of non-essential code to this. It's kind of a Rube Goldberg edition. I think if you copy and paste this into a new .rb document and play with it for awhile, it might help you to understand classes and how they work.
class Boot
def initialize(name, start_date)
@name = name
@start_date = start_date
@dogtags = false
@this_day = nil
@this_week = week
unless @dogtags == true
puts "\nThis is week ##{@this_week} and this is day ##{@this_day}"
puts "#{@name} will receive his/her Dev Bootcamp Dogtags in #{126 - @this_day} days"
puts "\nWould you like to see #{@name}'s schedule for today?"
choice = gets.chomp
day if choice.downcase == "yes"
end
end
def day
puts
eat("Breakfast", 0.75)
code(4)
eat("Lunch", 1.25)
code(5)
eat("Supper", 1.0)
code(5)
sleep(7)
end
def sleep_faster
puts "\nHow many hours does #{@name} like to sleep each night? "
preferred_sleep_hours = gets.chomp
if preferred_sleep_hours.to_i > 7
puts "\n\"My advice would be to sleep faster\" - Arnold Schwarzenegger"
else
puts "#{@name} will get plenty of sleep at Dev Bootcamp"
end
end
def sleep(hours)
sleep_faster if hours < 8
puts "\n7.0 hr: Sleep\n\n"
end
def eat(meal, time)
puts "#{time} hr: #{meal}"
end
def code(hours)
hours.times { puts "1.0 hr: Coding..." }
end
def week
@this_day = (DateTime.now - @start_date).to_i
this_week = ((DateTime.now - @start_date).ceil.to_i / 7)
if this_week > 18
@dogtags = true
get_your_dogtags
end
this_week
end
def get_your_dogtags
puts "\nHas #{@name} completed all of their work at Dev Bootcamp? "
completion = gets.chomp.downcase
if completion == "yes" && @dogtags == true
puts "\n\nYay! #{@name} has earned his/her Dogtags!\n\n\n"
else
puts "Sorry, #{@name} has not met all of the requirements to receive his/her Dogtags yet."
end
end
end
puts "Name: "
name = gets.chomp
puts "Phase 0 Start Date (MM/DD/YYYY): "
date = gets.chomp
date = date.split("/")
month = date[0].to_i
day = date[1].to_i
year = date[2].to_i
start_date = DateTime.new(year,month,day,12,0)
boot = Boot.new(name, start_date)
puts boot.get_your_dogtags
Line yy, Column xx
Spaces: 4 RUBY
We start off with the 'initialize' method. This is a special method that runs automatically when an object of this class is instantiated. So, when we call 'Boot.new(name, start_date)' we are instantiating a new object with a Class of Boot. Everything in the 'initialize' method is run immediately including any methods which are called inside the 'initialize' method.
Any of the methods defined inside the Class are also available to be called on the object outside of the class. I think you can see now why the ability to create Classes is so powerful. They allow us to add a great deal of complexity to a program with a very simple call.
On the last line in this code snippet, we call 'get_your_dogtags' from outside the class, on our 'boot' variable which is holding an instance of the 'Boot' Class. As we already have an instance of the class, we can very easily access this method with dot notation and find out if, in fact, our current boot has earned their dogtags.
Use of the instance variable is very important in a Class. If you define a local variable inside a method, it will not be available in the rest of the Class. In order to be able to access a variable anywhere in the Class you must designate it as such with an '@' symbol as the first character.
Any arguments which are passed in during instantiation are passed to the 'initialize' method and it is typical to initialize new instance variables with the same name as the local argument variable. This is good practice and ensures that these variables will be accessible in the entire class. It is also possible to initialize instance variables outside of the 'initialize' method.
The more you use Classes, the more you will understand them. If you are still struggling to wrap your head around this, try to pick a real world object and start replacing elements of this Class with whatever object you want to model. With a little experimentation, you should start to understand how and why Class is so powerful and important in the Ruby language.
Let's do something EPIC!


Theme Options
Light Version
Dark Version
12
Welcome to Photon UI!
Not a Member?