text:
Community Values & Restorative Practices
Section III. Student Code of Conduct
Section I: Definitions
Section II: Student Code Authority
The student conduct system at the university exists to provide a living and learning environment which reflects the values of the institution. Through it, the university seeks to guide students toward the development of personal responsibility, respect for others, and mature behavior. While the university's conduct system may have some similarities with the legal system established in the broader community, it is essentially educational and administrative in nature and is not governed by narrow legalisms or the restrictions found in criminal or civil proceedings.
Any student found to have committed or to have attempted to commit the following violations is subject to the sanctions/educational measures outlined in Section VII. (The examples of misconduct contained in the footnotes are illustrative, not exhaustive.)
A. Conduct Affecting Persons
1. Causing physical harm, threatening harm to any person, or behaving in a manner that a reasonable person would find alarming or intimidating. Negligent conduct that results in injury to others violates the Student Code.
2. Behaving in a manner that endangers the health or safety of another person or in a manner that a reasonable person would consider indecent or disorderly.
3. Engaging in conduct that infringes on the rights of others.(2)
4. Holding or transporting another person against their will, or otherwise impeding a person's ability to exit any property.
5. Violating the university's Sexual Misconduct Policy.
6. Engaging in Harassment or Sexual Harassment. (3)
7. Driving a vehicle under the influence of alcohol or with a blood alcohol level (as shown by a lawfully administered blood or breath test) in excess of that permitted for driver by Virginia law or driving under the influence of marijuana/cannabis or another controlled substance as defined by Virginia Law.(4)
8. Hazing, including acts that endanger the mental or physical health or safety of a student, or that destroy or remove public or private property, for the purpose of initiation, admission into, affiliation with, or as a condition of continued membership in, a group or organization. Apathy or acquiescence in the presence of hazing is not considered a neutral act; it is a violation of this policy. Tradition, intent, or the express or implied consent of the victim of such acts is not a valid defense.
a. Amnesty from Allegations and Protection from Retaliation When Reporting Hazing or Participating as a Witness in an Investigation
In order to encourage reporting of hazing, the university will extend amnesty from student conduct allegations and sanctions to parties and witnesses for minor violations of the alcohol and drugs policies, such as underage consumption of alcohol, public intoxication, and possession or ingestion of illegal drugs for reporting parties, witnesses or respondents where such disclosures are made in connection with a good faith report or investigation of hazing or retaliation.
This amnesty provision does not apply to more serious allegations such as physical abuse of another or illicit drug or alcohol distribution that contributed to the commission of a policy violation.
The university also considers retaliation to parties and witnesses to be a serious violation and will investigate and hold accountable students found to have retaliated against another student as a result of that student's reporting of, or participation in an investigation of, hazing.
9. Disrupting or obstructing the normal living and work environments of other members of the university community or the functions or activities of the university (as well as activities conducted on the university's property with its permission).(5)
a. Classroom Disruption. Instructors are vested with the primary responsibility for managing the classroom environment. The instructor may direct a student to leave the classroom for the remainder of class if the student engages in prohibited acts resulting in disruption of a class. Longer separations from a class must be preceded by formal conduct action resulting either from the Interim Measures Policy or from a finding of a violation via the student conduct process.
See the university's Use of Campus Facilities Policy for additional regulations policies regarding disruption of campus events and activities.
10. Using electronic or other devices to make an audio or video recording of the private activities of any person without the person's prior knowledge or effective consent from the person.
11. Violating the University's Firearms, Combustibles, Weapons and Explosives Policy (see Appendix I)
B. Conduct Affecting Property
1. Damaging Property of the university and/or members of the university community or other personal or public property, on or off campus.
2. Possessing property of another person, the university, or another entity without proper authorization. (6)
3. Violating the university's Fires/Emergency Equipment policies.(7)
4. For reasons of safety and security, all roofs, balconies, porches, window ledges, mechanical equipment areas, and steam tunnels of university buildings are closed to all but authorized employees.
C. Conduct Affecting the University Community
1. Breaching Campus Safety or Security, including intentionally damaging door locks, and unauthorized possession or use of university keys or access cards.
2. Unauthorized Entrance or Presence includes unauthorized entrance into, or presence in, university facilities, offices of a faculty member, administrative personnel, or other person on university property, or the private rooms of a student. Students also cannot remain in a facility when the facility is officially closed (examples include the library and student centers). Students cannot enter into or upon any restricted area; nor can any student assist or make possible the unauthorized entry of any person into any restricted area. Restricted areas include but are not limited to tunnels, roofs, monuments, posted or enclosed construction sites, and secreted utility areas.
3. Violating Information Technology's Acceptable Use Policy for Students.
4. Failing to comply with the directions of university officials or law enforcement officers acting in performance of their duties; failure to identify oneself to these persons when requested to do so;(8) and/or failing to comply with a sanction issued by an appropriate Case Administrator or panel.(9)
5. Violating any university policy, rule, or regulation published in hard copy or available electronically on the university website or disseminated via official means of communication (e.g., email or letter) including the terms of the Housing Agreement.
6. Failing to Disclose or Update Records of Convictions or Disciplinary Actions on Application. Students who do not comply with the university's requirement to disclose records of criminal conviction or disciplinary action taken by the student's school, either before or after applying but before matriculation, will be considered in violation of this section. Failure to disclose will be considered a serious violation and may include suspension or dismissal from the university.
7. Abusing the student conduct system.(10)
8. Knowingly abusing a position of trust or responsibility with the university.(11)
9. Hosting guests who violate university Policy. All guests are expected to abide by university regulations. Students are responsible for the behavior of their guests and may be sanctioned for violations committed by their guests.
D. Alcoholic Beverages and Drugs(12)
1. Violating the Alcoholic Beverage Policy. Use, underage possession, or distribution of alcoholic beverages (except as expressly permitted by university regulations), public intoxication, or driving under the influence of alcohol (see Appendix II).
2. Violating the Drug Policy. Use, possession, manufacturing, or distribution of drugs and/or drug paraphernalia. For the purpose of these regulations, drugs include any controlled substance, including marijuana/cannabis(13), cocaine, amphetamines, ecstasy, LSD compounds, mescaline, psilocybin (psychedelic mushrooms), DMT, narcotics, opiates, and other hallucinogens, except when taken under and pursuant to a physician's prescription in accordance with law.(14)
E. Violations of Local, State, or Federal Law
The university has an interest in respecting the safety and welfare of members of the university community and protecting its institutional integrity and resources. Conduct leading to arrest, charge, indictment, or conviction for violation of local, state, or federal law may result in conduct action by the university if the Dean of Students or designee determines such action affects a substantial interest of the university.
The Student Code of Conduct and its processes reflect its educational objectives and therefore differ from those of criminal courts. Therefore, it is not double jeopardy for the university to sanction conduct that also is sanctioned under local, state, or federal law. Proceedings under this Code can be carried out prior to, concurrently with, or following the resolution of criminal proceedings. Determinations made or sanctions imposed under this Code will not be subject to change because criminal charges arising out of the same set of facts were dismissed, reduced, or resolved in favor of or against the Respondent. When criminal charges are pending, the university may not be able to conduct its own investigation and/or hold a proceeding to resolve the Student Conduct allegations. In such cases, the university can delay its proceeding until it can obtain sufficient information upon which to proceed. The university reserves the option to impose interim measures, including interim suspension, in such circumstances.
F. Withdrawal Due to Pending Felony.
A Respondent accused of a felony criminal charge may determine it is in their best interest to withdraw from the university until the criminal charges are resolved. The university has an existing procedure for voluntary administrative withdrawals that may be applied, with the following conditions:
During the withdrawal, the student may not be present on University premises or attend University-activities.
The student cannot register for or attend any classes, including course offerings through remote learning.
The university will place a hold on the Respondent's registration, graduation, and/or transcripts.
The Respondent must agree that in order to be eligible to reenroll at the university, they must first be subject to and fully cooperative with a campus investigation (if conducted) and proceeding, and must comply first with sanctions, if assigned, that are administered arising from a proceeding. Re-enrollment in a specific academic degree program is subject to that program's approval.
Students prepared to meet these conditions may submit a written request to the Director seeking a voluntary withdrawal due to a pending felony. If the Director approves the request, the Director will forward the request for a withdrawal to Enrollment Support Services. A student granted a voluntary withdrawal while felony criminal charges are pending will follow the same procedures and will be subject to the same conditions as outlined in the Undergraduate and Graduate Catalogs, except as outlined in this section.
(2) Examples include: exposing one's own genitals, buttocks, or breasts in a public place (unless specifically authorized for activities such as theater productions or class) and entering a student's residence room without explicit or implicit permission
(3) Harassment includes conduct sufficiently severe, persistent or pervasive as to threaten an individual or limit the ability of an individual to work, study, or participate in the activities of the University. Prohibited conduct also includes, but is not limited to stalking (repeated conduct directed toward another person, including following that person or engaging in acts that harass); making unwanted obscene, abusive or repetitive telephone calls; electronic mail; instant messages; or similar communications with intent to harass.
Sanctions for sodomy, object penetration, or sexual intercourse without consent (whether by acquaintance or stranger) include indefinite suspension or permanent dismissal. Sanctions for intentional touching or fondling range from probation to dismissal.
(4) This does not include controlled substances taken in accordance with directions prescribed by a licensed treatment professional.
(5) Examples include: blocking entrances, corridors or exits; interfering with ongoing educational activities cultural events, or recreational, extracurricular or athletic programs; unauthorized presence in a building after normal closing hours or after notice that the building is being closed; interfering with vehicular or pedestrian traffic; and interfering with any other effort to protect the health and safety of members of the university community or larger public.
(6) Stealing is a violation of the Honor Code, and reports alleging stealing will be referred to the appropriate Honor Council.
(7) Including intentionally initiating or causing to be initiated any false report, warning or threat of fire, explosion or other emergency; tampering with fire safety or emergency equipment; intentionally, carelessly or recklessly causing a fire to be ignited ; intentionally interfering with or failing to follow emergency procedures; or entering or failing to evacuate a building when a fire drill is conducted or when an alarm is sounded.
Fires may not be started in campus buildings or elsewhere, including the University's woods, unless approved by the University's Fire Safety Officer. This prohibition includes the burning of personal or organizational property. The Fire Safety Officer may approve fires in fireplaces in residence halls.
(8) Such a request must be made by one who identifies them self and acts in the reasonable and good faith belief that compliance with the request is necessary for the safety and welfare of the person or persons or others, to prevent the disruption of any lawful activity carried on by the University, to maintain University or personal property, to maintain vehicular traffic, or to perform the official's duties.
(9) The Dean of Students Office may issue a hold on the student's record pending completion of any outstanding sanction.
(10) Including refusing to appear, provide information, or remain present during an official university proceeding or meeting with any person connected with the disciplinary or honor processes; distortion or misrepresentation of information before a committee, administrator, or the Honor Council; contacting witnesses or any other party to an incident to intimidate them or to get them to change their testimony; or institution of a Student Conduct or Honor proceeding in bad faith.
(11) Students holding positions of trust or responsibility include student workers (paid or unpaid), student leaders, Resident Advisors, Student Conduct Council and Honor Council members, and Orientation Aides. Students in these positions have a special relationship with the University and are expected to respect the privacy of other students and members of the University community, including by maintaining confidentiality of student records, abiding by University policies, and using resources in an ethical fashion.
(12) In situations where a student is seeking medical attention for self or others, the Good Griffin policy will apply with respect to allegations of violating the Alcoholic Beverages and Drugs policies. (Also see Appendix IV).
(13) Delta 8 and Delta 9 products are included in the definition of "Marijuana/Cannabis".
(14) The sanctions for manufacturing or providing drugs range from suspension to dismissal from the University. The sanctions for possession or use of drugs range from probation to dismissal from the university. Loss of housing can result for drug use in university residences. For freshmen and sophomore students, removal from residence may require disenrollment, as these students are not permitted to live off campus unless they receive an exception from the Dean of Students. (Also see Appendix V.)


text:
Wall Street Journal: Decoupling amid the pandemic?
Pakistan's peace offensive and India's no-dialogue posturing
Unconstructive criticism and military morale
All rich individuals are not essentially corrupt
Inam Ul Haque September 10, 2020
It was a post-funeral customary feast in the village when a bureaucrat cousin took a swipe at the military for some perceived act of omission and commission. Another cousin who lived in the village sprang to defend the military, saying that military morale is affected by such accusations; and all present supported him. However, for some time now, there is an alarming and increasing trend — especially on social media — where the military and its leadership is subjected to endless, mainly motivated and baseless criticism.
The stories churning out against this or that military personality affect morale of the institution at large, as military is not only the generals. The vast majority in the field is soldiers and junior officers. And it is difficult to criticise the general officer cadre without wider negative implications for the trust, confidence and morale of the rank and file. The masterminds of such inimical conspiracies know it. And those circulating such juicy stories need to know it. One hopes the media cells of political opposition and other social and political activists — yearning for moments of fame — see to this. And that the stakeholders realise that this endless propaganda is playing to the tune of our enemies.
In over four decades of life in uniform, one has witnessed the military being criticised mostly for [initially] the extra-constitutional and [subsequently] the constitutionally-enabled takeovers. In my piece "The Gordian Knot of Civil-Military Relations in Pakistan" published in this space on December 31, 2019, I wrote that in our constitutional history, generals were both usurpers and law-givers. And without condoning takeovers, the military in each case acted in supreme national interest, responding to the prevalent public sentiment, and mostly at the urging of the political opposition.
If one distils the present debate, it involves the basic premise of civilian supremacy of the military and perceived corruption within the military senior ranks. First thing first. One can see through the frustration of our political class for interference by the military in the so-called "guided democracy". But then who creates the space to be occupied by the military? The battle for civilian supremacy of our military cannot and will not be decided over media platforms. It will be decided in the streets of Karachi and elsewhere, once deliverance is visible, credible, irreversible and lasting by those in power yesterday, today and tomorrow.
The military will stay out of power and respect civilian supremacy if the political class — at least some visible segments of it — mirrors the nationalistic outlook of the military. When the power grab does not divide the country as in 1971; when we do not compromise national interests over parochial self-interests; and when we do not take foreign dictation to run our affairs; and when we throw our lot with Pakistan — lock, stock and barrel — and don't take and then hide dual nationalities; and when we do not do somebody else's bidding while in the corridors of power.
As for corruption. One can buy the argument that there may be some elements within the military (like all other organs of the state) that have resorted to overreach. But then there are processes and procedures to deal with them. Look at how the US dealt with Gen McCrystal and later Gen Petraeus — the luminaries of US Armed Forces in recent history, not to mention the scores of other erring senior military officers taken to task. However, these individual acts of omission and commission do not reflect upon the wider military. Our armed forces also have effective internal accountability that is ongoing, merciless, efficient and just. Blanket criticism is sinister and with an angle, aimed at discrediting the military leadership in the eyes of the public and its own rank and file.
All rich individuals are not essentially corrupt. Do not we believe in the divine dictum about rizq that is His calling and bestowment? Those on the high pedestal of opinion and judgment need to realise that every sensational breaking news inimical to our military chips away our national cohesion — brick by brick. If we close our eyes to the countless analyses about the military being our 'centre of gravity' and it being foundational to our national edifice, we have gone too far in bughz-e-Moawiya. Look at the storm President Trump has kicked in his unguarded comment about military 'losers' in our model democracy — the US. Our detractors go farther.
Do not those involved realise what such unrestrained criticism of our own military means for the morale of countless soldiers and officers deployed round the clock to protect us not only from the enemy on the borders — from the icy Siachen to the beaches of Balochistan – but also from the effects of floods, rains, earthquakes, et al. Generals head this military machine and ensure it runs at the optimum.
One understands that elements behind such anti-military malaise are few and far between. That their handlers are elsewhere, and that the ripples they create are at best storms in our national tea cup in urban Pakistan only and over sold-out TV channels. That the rural Pakistan, the middle class Pakistan, the silent majority of our cities love their armed forces with all their hearts. That the valiant military not only defends their geographic and ideological frontiers, delivers in crises, responds to calamities, endures criticism in stoic silence, but it also guides and supports the elected rulers for the political stability and systemic continuation — all in good faith. Had not the military backing enabled the Zardari-led democratic government to complete its constitutional term? Isn't the military on the same page with PM Imran Khan? Inter and intra-institutional cleavages serve only the enemy's interests.
As far as the military is concerned – for the enduring question of civilian supremacy – the military has to concede, comply and continue to cooperate. And, it has to punish those associated with it for any corruption or its appearance thereof. Else it needs to forcefully defend those falsely accused. And that a national debate about its role to be constitutionalised or otherwise, be undertaken.
We owe it to our future generations to hand over a healthy Pakistan that is not fractured, divided or bickering. And it is possible and doable if we know where the anti-Pakistan noise comes from and deal with it.
Muhammad Altaf | 1 year ago | Reply
A well written article. As rightly pointed out by the writer, military is undoubtedly the Center of Gravity of Pakistan hence anti state forces are trying to defame the senior military leadership which ultimately impact the morale of under Comd troops beside creating a divide between the led and leader.Recent incident of defamation of a senior retired military officer on social media was a part of this campaign.
Asif Kotla | 1 year ago | Reply
A very relevant article to prevailing environment in which undesirable elements are targetting to raise controversies.

redpajama_set_name: RedPajamaCommonCrawl


text:
THE UNITED STATES FLEET
CONTROL FORCE
CONTROL FORCE, U.S. FLEET
RADM M. M. Taylor
SAVANNAH (AS-8) (F)
SUBMARINE DIVISIONS, ATLANTIC
**Notes for Control Force:
Captain Berrien also served as Commander of the Naval Mine Depot and the Submarine Base at New London.
Commander Weaver also served as Commander of the Submarine Base at Coco Solo and Submarines, Coco Solo.
N-1, N-2, N-3, L-3, L-11 were in reduced Commission.
S-11, S-12, S-18 were not in Commission.
SUBMARINE DIVISION TWO
Lieutenant Commander G. C. Logan
N-3 (SS-55) (F)*
Lt. D. E. Cummins
N-1 (SS-53)*
Lt. W. O. Bailey
Lt. H. C. Fengar
L-3 (SS-42)*
L-11 (SS-51)*
R-9 (SS-86)
Lt. G. M. O'Rear
R-22 (SS-99)
Lt. Merrill Comstock
S-1 (SS-105)
Lt. Ralph W. Christie
SUBMARINE DIVISION THREE
S-18 (SS-123)*
S-19 (SS-124)
Lt. Cmdr. W. J. Butler
Lt. J. A. Brownell
SUBMARINE DIVISION FOUR
Commander R. P. Craft
S-49 (SS-160) (F)
Lt. I. C. Sowell
Lt. Cmdr. C. G. Gilliland
Lt. C. Withers
Lt. F. S. Low
Lt. Wilder D. Baker
Lt. S. E. Bray
Lt. Cmdr. J. A. Crutchfield
Lt. A. H. Donahue
SUBMARINE DIVISION TEN
Lieutenant Commander F. W. Scanland
O-11 (SS-72) (F)
Lt. J. B. Sykes
O-12 (SS-73)
Lt. E. W. Wunch
Lt. J. J. Hughes
Lt. J. H. Jenkins
Lt. Charles B. Momsen
Lt. L. G. Scheck
SUBMARINE DIVISION ELEVEN
Captain Ernest J. King
Lt. (j.g.) R. F. Goods
Lt. J. Y. Dreisonstok
Lt. Cmdr. Lewis E. Denfeld
Lt. Cmdr. George H. Fort
Lt. Edmund W. Burrough
SUBMARINE DIVISION ONE
R-21 (SS-98) (F)
Lt. Allan R. McCann
R-23 (SS-100)
Lt. C. W. Weitzel
Lt. H. W. Jackson
Lt. A. J. Moore
Lt. P. W. Warren
Lt. R. W. Gruelick
SUBMARINE DIVISION EIGHT
Lieutenant Commander Robert H. English
O-1 (SS-62) (F)
Lt. W. M. Downes
O-2 (SS-63)
Lt. E. Sparrow
Lt. G. Bannerman
Lt. L. E. Myers
Lt. H. Avery
Lt. J. W. Quackenbush
Lt. (j.g.) C. R. Price
Lt. H. Biesemeier
Lt. H. L. Challenger
Lt. C. R. Crutcher
MINE DIVISION ONE
MAURY (DM-5)
Lt. Cmdr. W. W. Wilson
MAHAN (DM-7)
Cmdr. A. S. Hickey
MINE DIVISION TWO
LARK (AM-21)
Lt. R. Rohange
MALLARD (AM-44)
Lt. C. Murray
SAVANNAH (AS-8) - Tender to SUBDIV 11
Cmdr. L. F. Kimball
BUSHNELL (AS-2) - Tender to SUBDIV 3
Lt. Cmdr. M. C. Bowman
CHEWINK (AM-39) - Tender, Sub Base, New London
Capt. F. D. Berrien*
QUAIL (AM-15) - Tender, Sub Base, Coco Solo
Cmdr. D. A. Weaver*
FULTON (AS-1) - at Coco Solo
Lt. Cmdr. S. S. Brown
USS R-26, as she appeared in 1923. National Archives Photo (19-N-10578) obtained from the
HazeGray Photo Gallery. As far as I know it is in the public domain.
USS S-1 in New York in October, 1923, testing a submarine based
seaplane. Photo from the HazeGray Photo Gallery. As far as I know it is
in the public domain.
MINE SQUADRON ONE
Captain John W. Greenslade
SHAWMUT (CM-4) (F)
Capt. J. W. Greenslade
USS SHAWMUT (CM-4), flagship of MINERON ONE, as photographed in 1924.
This photo is from the Naval History and Heritage Command On-Line Library.
As far as I know it is in the public domain.


text:
Q: Code crashes because object's .rad property becomes undefined I am creating an ecosystem with my code consisting of plants, herbivores, and carnivores being represented through circles. For some reason, my code has been crashing after a certain amount of time ranging from 30 seconds to 8 minutes but no more than that.
After doing some digging I have found out that the crash is a result of my object's .rad property becoming undefined for some reason. It's probably a result of me improperly setting up my functions but I haven't been able to find a solution.

var plantSpawn = 5;
var herbSpawn = 3;
var carnSpawn = 2;

var myPlants = new Array();
var myCarns = new Array();
var myHerbs = new Array();

  //////////////PLANTS//////////////////

function createPlants() {

 reproducePlants();
 setInterval(reproducePlants, 5000);

}

function reproducePlants() {

 for(var p=0; p<plantSpawn; p++){

  var rr = Math.round(Math.random() * 150);
  var gg = Math.round(Math.random() * 255);
  var bb = Math.round(Math.random() * 150);

  var plant = new Object();
   plant.x = Math.random() * canvas.width;
   plant.y = Math.random() * canvas.height;
   plant.rad = 2 + Math.random()*2;
   plant.skin = 'rgba('+rr+','+gg+','+bb+', 1)';

  myPlants.push(plant);

 }
}

function drawPlants(){
 var plantAmt = myPlants.length;

 for(var j=0; j<plantAmt; j++) {

  if (myPlants[j].x + myPlants[j].rad >= canvas.width) {
   myPlants[j].x -= 10;
  }

  if (myPlants[j].y + myPlants[j].rad >= canvas.height) {
   myPlants[j].y -= 10;
  }

  context.beginPath();
   context.arc(myPlants[j].x, myPlants[j].y, myPlants[j].rad, 0, Math.PI*2, false);
  context.closePath();

  context.fillStyle = myPlants[j].skin;
  context.fill();
 }
}

function killPlants() {
 plantDeath();
 setInterval(plantDeath, 30000); //play with inc
}

function plantDeath() {
 myPlants.splice(0,5);
}

  //////////////HERBS//////////////////

function herbsLife(){
 reproduceHerbs();
 setInterval(reproduceHerbs, 10000);

 herbsDeath();
 setInterval(herbsDeath, 90000); //1.5 minutes
 setInterval(herbsStarve, 10000); //10 seconds
}

function reproduceHerbs() {

 for (var h=0; h<herbSpawn; h++){

  var gg = Math.round(Math.random() * 100);
  var bb = Math.round(Math.random() * 255);

  var herbivore = new Object();
   herbivore.x = Math.random() * canvas.width;
   herbivore.y = Math.random() * canvas.height;
   herbivore.rad = 5 + Math.random()*3;
   herbivore.skin = 'rgba(0,'+gg+','+bb+', 1)';

   herbivore.speedH = -3 + Math.random()*1.2;
   herbivore.speedV = -3 + Math.random()*1.2;
   herbivore.dirH = 1;
   herbivore.dirV = 1;

  myHerbs.push(herbivore);
 }

}

function drawHerbs() {
 var herbAmt = myHerbs.length;

 for(var j=0; j<herbAmt; j++) {
  var hX = myHerbs[j].x;
  var hY = myHerbs[j].y;

  //HERB MOVEMENT//

  myHerbs[j].x += myHerbs[j].dirH * myHerbs[j].speedH;

  if (myHerbs[j].x > canvas.width + myHerbs[j].rad || myHerbs[j].x < 0){

   myHerbs[j].dirH *= -1;

  }

  myHerbs[j].y += myHerbs[j].dirV * myHerbs[j].speedV;

  if (myHerbs[j].y > canvas.height + myHerbs[j].rad || myHerbs[j].y < 0){

   myHerbs[j].dirV *= -1;

  }

  context.beginPath();
   context.arc(myHerbs[j].x, myHerbs[j].y, myHerbs[j].rad, 0, Math.PI*2, false);
  context.closePath();

  context.fillStyle = myHerbs[j].skin;
  context.fill();
 }
}

function herbsDeath() {
 myHerbs.splice(0,3);
}

function herbsEat() {
 for (var k=0; k<myPlants.length; k++){
  var pX = myPlants[k].x;
  var pY = myPlants[k].y;

 for (var h=0; h<myHerbs.length; h++){
  var hX = myHerbs[h].x;
  var hY = myHerbs[h].y;

  var eX = hX - pX;
  var eY = hY - pY;
  var dist = Math.sqrt(Math.pow(eX,2) + Math.pow(eY,2));

   if (dist < myPlants[k].rad*2) {
    myPlants.splice(k,1);
    myHerbs[h].rad += 1;
   }
  }
 }
}

function herbsStarve() {
 for (var s=0; s<myPlants.length; s++){
  myHerbs[s].rad -= 1;
  if (myHerbs[s].rad <= 2) {
   myHerbs.splice(s,1);
  }
 }
}

//////////////CARNS//////////////////

function carnsLife() {

 reproduceCarns();
 setInterval(reproduceCarns, 20000); //20 seconds

 carnsDeath();
 setInterval(carnsDeath, 60000); //50 seconds
 setInterval(carnsStarve, 7500); //10 seconds
}

function reproduceCarns() {
 for (var c=0; c<carnSpawn; c++){

  var rr = Math.round(Math.random() * 255);
  var gg = Math.round(Math.random() * 100);

  var carnivore = new Object();
   carnivore.x = Math.random() * canvas.width;
   carnivore.y = Math.random() * canvas.height;
   carnivore.rad = 7 + Math.random()*3;
   carnivore.skin = 'rgba('+rr+','+gg+',0, 1)';

    //bigger random = slower//
   carnivore.speedH = -3 + Math.random()*2;
   carnivore.speedV = -3 + Math.random()*2;
   carnivore.dirH = 1;
   carnivore.dirV = 1;

  myCarns.push(carnivore);
 }
}

function drawCarns() {
 var carnAmt = myCarns.length;

 for(var j=0; j<carnAmt; j++) {

  //CARN MOVEMENT//

  myCarns[j].x += myCarns[j].dirH * myCarns[j].speedH;

  if (myCarns[j].x > canvas.width + myCarns[j].rad || myCarns[j].x < 0){

   myCarns[j].dirH *= -1;

  }

  myCarns[j].y += myCarns[j].dirV * myCarns[j].speedV;

  if (myCarns[j].y > canvas.height + myCarns[j].rad || myCarns[j].y < 0){

   myCarns[j].dirV *= -1;

  }

  context.beginPath();
   context.arc(myCarns[j].x, myCarns[j].y, myCarns[j].rad, 0, Math.PI*2, false);
  context.closePath();

  context.fillStyle = myCarns[j].skin;
  context.fill();
 }

 }

function carnsDeath() {
 myCarns.splice(0,2);
}

function carnsEat() {
 for (var k=0; k<myCarns.length; k++){
  var cX = myCarns[k].x;
  var cY = myCarns[k].y;

 for (var h=0; h<myHerbs.length; h++){
  var hX = myHerbs[h].x;
  var hY = myHerbs[h].y;

  var eX = cX - hX;
  var eY = cY - hY;
  var dist = Math.sqrt(Math.pow(eX,2) + Math.pow(eY,2));

  if (dist < myCarns[k].rad*1.2 && myCarns[k].rad > myHerbs[h].rad) {
   myHerbs.splice(h,1);
   myCarns[k].rad += 1;
  }
  }
 }
}

function carnsStarve() {
 for (var q=0; q<myPlants.length; q++){
  myCarns[q].rad = myCarns[q].rad - 1;
  if (myCarns[q].rad <= 5) {
   myCarns.splice(q,1);
  }
 }
}
<!doctype html>

<meta charset="UTF-8">

<title> Ecosystem </title>

<canvas id="fmxCanvas" width="800" height="800"></canvas>

redpajama_set_name: RedPajamaStackExchange