Tuesday, December 31, 2019

How to Tell if a File Exists in Perl

Perl has a set of useful file test operators that can be used to  see whether a file exists or not. Among them is -e, which checks to see if a file exists. This information could be useful to you when you are working on a script that needs access to a specific file, and you want to be sure that the file is there before performing operations. If, for example, your script has a log or a configuration file that it depends upon, check for it first. The example script below throws a descriptive error if a file is not found using this test. #!/usr/bin/perl$filename /path/to/your/file.doc;if (-e $filename) {print File Exists!;} First, you create a string that contains the path to the file that you want to test. Then you wrap the -e (exists) statement in a conditional block so that the print statement (or whatever you put there) is only called if the file exists. You could test for the opposite—that the file does not exist—by using the unless conditional: unless (-e $filename) {print File Doesnt Exist!;} Other File Test Operators You can test for two or more things at a time using the and () or the or (||) operators. Some other Perl file test operators are: -r checks if the file is readable-w checks if the file is writeable-x checks if the file is executable-z checks if the file is empty-f checks if the file is a plain file-d checks if the file is a directory-l checks if the file is a symbolic link Using a file test can help you avoid errors or make you aware of an error that needs to be fixed.

Monday, December 23, 2019

Cell Phone Addiction and Face to Face Conversation

As cell phones have become more and more common in todays society, some people have a significant issue with not being able to disengage from their cell phone. So-called â€Å"smart phones,† which combine functionality of an organizer, browsing the Internet, playing tunes, and taking pictures, only worsen the reliance on one’s cell phone. Cell phones are no longer just a privilege but now have become a necessity. While using such devices for everyday tasks, work, and socializing with friends and family is perfectly normal, not being able to put them down while engaged in a conversation with your significant other or a friend who’s sitting in front of you may denote an increasing problem. In todays society, cell phones have become an addiction and affect our lives in more negative ways than positive ones, causing face to face communication to become less prevalent and loneliness to become the most common ailment of the modern world. With every passing day, technol ogy continues to takeover daily lives. Regardless of ones gender, age, ethnicity, career or financial status, most people own a cell phone. In fact, 91percent of Americans own a cell phone (Archer). 51 percent of which have opted for a smart phone over a standard cell phone and these numbers are rising. The phone, tablet, computer and other high tech devices have become not just an object, but for many people, their best friend. Many of them begin to feel uneasy if they lose their cell phone, even if it is only forShow MoreRelatedHow Cell Phones Affect Social Behavior1282 Words   |  6 PagesEffects of Mobile Phones on Social Skills Kelly Schriever, Matt Seeberger, Mary Sweet, Emily Putnam Elizabethtown College March 17, 2014 Today we live in a world where communication through modern technology is almost required. Everywhere people are texting, emailing, writing blogs, and tweeting. It’s hard to go anywhere without seeing someone using a phone or the internet to connect with others. Most people would feel lost without the use of their phones. Of course theRead MoreThe Social Impact of Cell Phones Essay1465 Words   |  6 Pagesclosest thing to â€Å"cellular technology† was a car phone made by the ATA Company but, Martin and his determined Motorola group yearned higher heights and deeper depths for communication- and thus the birth of the first cell phone was in process. Cooper wanted to exceed the limitations of just simple â€Å"car conversation†. After consistent tedious hours of production, lasting a several month long period of building, critiquing, and finalizing, the first cell phone was born. The first mobile device was the sizeRead MoreImpact Of Cell Phones On Society1509 W ords   |  7 Pagesinternet highlights the latest technology that captivates both young and old. Mobile phones have become an integral part of our society. Primarily, the development of cellphones which combine different sophisticated features has made the device one of the necessities of life. So far, statistics indicate that the number of cell phones in the world supersedes the total population of people. Most people consider cell phones beneficial because of the level of interconnectedness it creates between people aroundRead MoreHow Does Technology Negatively Affect Daily Lives?1304 Words   |  6 Pagesour conversation because it was fragmented. After that, I logged on Facebook, on which I had already spent all my spare time, trying to catch up with my 1000+ â€Å"friends†. Unfortunately, I found most of them I barely know or see. Oh wait, it’s not a dream. It’s happening in reality. With the rapid development of communication technology, new methods of communication, for example cell phones and the Internet, are popularizing in daily lives and are replacing the old way of communication – face-to-faceRead MoreCell Phone Use Hurts Parent-Child Bonding890 Words   |  4 Pages Most people over the age of forty know life without a cell phone, have survived, and thrived. However, today parents are too busy talking or texting on the cell phone and ignoring their children. Distracted parents are to blame for many near drownings and injuries at home, because they were so deep in conversation. Children are deliberately misbehaving to get their parents’ attention. Obviously, as soon as an infant is born bonding begins between baby and parents. Before babies can talk, adultsRead MoreOur Distracted Culture : What Was It?1643 Words   |  7 Pagesdevices, specifically cell phones, that correlates with social media and how it affects relationships and everyday life. He claims, The harsh truth is we Americans have become addicted...is taking a toll on everything from nurturing our authentic relationships to simply paying attention to what matters during our brief lifetimes† (5H). In other words, these distractions, mainly cell phones, withdrawal us fr om life and lead us to fail to communicate with others face to face.. He states examples toRead MoreNegative Effects of Cell Phone of Society1609 Words   |  7 PagesSteve Sheridan Professor Simakowicz 1st Draft Paper 13 April 2010 â€Å"Do Cell Phones Help or Hinder Society?† Times have changed tremendously in the last twenty five years in regards to how the world communicates with each other. The birth of new technology such as cell phones with internet capability, laptop computers, and even the recently released I-Pad has made communication with anyone outside of talking distance immediately accessible. Even though to many people this seems like a movement in theRead MoreInternet Addiction Essay765 Words   |  4 Pagesand social. Nowadays a lot of teenagers have their own phone and laptop which is convenient to keep contact with friends and family, but they use it to play video game most frequently and there are lots of violent video game affect adolescences have bad habits, the main reason is they get addicted to the internet. Huge negative effects appear if teenagers get addicted to the internet, including can not live without a cell phone, internet addiction disorder and there are negative effects of the internetRead MoreTechnology Has Made Our Liv es1684 Words   |  7 Pages According to Pew Research Center (2015), 91 percent of Americans own cell phones.   For people under the age of 44, the number is closer to 97 percent.   64 percent of those phones are smartphones.   Ã‚  With these phones, we have the world at our fingertips.   We can shop on Amazon and Ebay, get live news updates, and get in touch with our â€Å"friends† from all around the globe on Facebook.   Our cell phones have replaced calculators, cameras, and alarm clocks.   If we want to track our calories, thereRead MoreTexting Is Not Safe ! Haha1430 Words   |  6 Pagesis due to both the psychological damage and danger that smartphones place on their children whose brains are not yet fully developed. According to a study conducted on 404 undergraduate students, three-fourths felt that they are dependent on their phones.() The increasing use and popularity of smartphones are an issue that can cause relationship issues, safety concerns, and distractions all which can be detrimental to society. One of the most detrimental consequences of smartphones is the distraction

Sunday, December 15, 2019

Engineering Failure Case Study Free Essays

Failure Analysis at DMRC On July 12th 2009 a metro bridge that was under construction collapsed due to negligence by an office in-charge of the Badarpur Metro line. The failure of the bridge killed 6 and injured another 15 when the pier cap sheared from the connecting pillars. The Delhi Metro Rail Corporation took major heat from this incident because the roadway was a major milestone of providing a reliable and easy mean of transportation to the capitol of India. We will write a custom essay sample on Engineering Failure Case Study or any similar topic only for you Order Now The DMRC is considered the most reputed infrastructure organization of India and neglecting roadways to the point where they fail is not an option. During that day the pier cap collapsed causing the collapse of the launching girder, span between p-66 and p-67 piers which had already been erected and pre-stressed, and also segments of the superstructure for the span between p-67 and p-68. The pier cap (p-67) sheared from the connecting point of the pier and pier cap. The top reinforcement of the cantilever beam did not have any development into the pier itself which caused the shear itself. The launching girder has failed due to the failure of the pier cap. This failure also caused the span between piers 67 and 68 causing it to be inclined supported by the ground on one end and the pier cap on the other. With the failure of the pier cap and span between piers the crane used for lifting the launching girder also failed on July 13th 2009. Bending of the crane shows the clear sign of overloading which was caused by not analyzing the amount of stress the crane could handle. The causes of the failure are many and once one portion of the roadway failed it caused a chain reaction to the entire infrastructure collapsing. The pier (p-67) was initially designed as a leg of a portal frame between piers but then was changed to support the pier cap. The same method was used for piers p-66 and p-68. The top reinforcement was poorly engineered; the pier cap had a reinforcement of 36mm diameter and a length of 500mm which was an insufficient bond length for the structure. During the launching operation the launching girder itself developed a crack that was grouted in crack areas and further strengthened by introducing prop or jacketing. During the launching of superstructure 6 segments where lifted and the whole system collapsed when the seventh segment was hooked up for lifting. It was concluded that the failure of the pier cap occurred to the improper jacketing done when a crack had occurred. This was also coupled with inadequate length of support and reinforcement of the cantilever pier cap. The failure of the cranes was the fact that the capacity of 2 cranes where not able to hold the weight of the superstructure which caused the larger 3rd crane to fail. The Delhi Metro Rail Corporation sacked the official in charge of the Badarpur Metro line, Vijay Anand for neglecting his duty. Structural designs should have been proof checked by an experienced structural engineer. Also once failure had been observed the structure should have been abandoned and a new structure should have been built. Make shift reinforcement to save a failed structure was a major neglecting issue and engineering failure. The lack of professionalism that lead to the superstructure failure started with trying to fix the failed pier cap and neglecting the fact that the cranes used to lift the structure where not engineered to hold the amount of weight that needed to be supported. The support reinforcement should have been checked by an experienced engineer that should have easily seen the reinforcement issue between the pier and pier cap. The information for this case study was found from www. engineeringcivil. com/theory/civil. engineering-disaster. com and www. thaindian. com. The entire structural failure was found on these sites including who was a fault and why the structure failed. How to cite Engineering Failure Case Study, Free Case study samples

Saturday, December 7, 2019

Physics Absolute Zero Essay Example For Students

Physics Absolute Zero Essay A According to this website, what is the definition of absolute zero? NAS: Absolute Zero, is when the molecules of the object can no longer oscillate/shake, due to the temperature being too cold, that kinetic energy Is too weak to do anything. The time when the escalation is slowed to the point it can no longer be slowed down, that is when it has reached absolute zero, but even then, escalation can never really be put to a stop. B Why is the Kelvin scale especially helpful when studying absolute ere? NAS: Because it is the same as the others, but it shifts downwards. Water boils at 373 K and freezes as 273 K, and is absolute zero at exactly O. C What is the value of absolute zero on the Kelvin scale? The Celsius scale, and the Fahrenheit scale? NAS: On the Kelvin scale, it is O. Celsius scale is -CHIC. And finally Fahrenheit is -OFF. 2 Visit the following URL: Physician. Com Absolute Zero or Ask a Scientist: Absolute Zero A According to this website, what type of experiments led to the idea of absolute zero? NAS: It was when people were investing the behavior of gas pressure vs.. Temperature, did they find out how the lowest temperature it could get to on a graph was -273 degrees centigrade. B Describe scientists attempts to reach absolute zero. NAS: They would increase the temperature of a gas they are using, and would measure the pressure emitted from it. 3 Visit the following URL: New State of Matter Seen Near Absolute Zero . What is a Bose-Einstein condensate? NAS: It is the experiment the JILL did, and created a far more colder temperature than the other ones which were recorded. They created a new matter which Albert Einstein and Indian Physicist predicted years ago. 4 According to the information you have obtained, you know that absolute zero is about -273 degrees Celsius. You will now use your graph to predict this value based on the laboratory data presented in this activity. A Think back to the Galileo Gardens activity Graphing Tips. You will be using the same prediction techniques to find the value of absolute zero. Go back to your graph from step 5 above. Be sure that the graph window is active. From the menu bar at the top of the screen, select Analyze. Choose Automatic Curve Fit. Select the proper function based on the arrangement of the data points. B Now select Interpolate from the Analysis menu. You can view this in the graphic on the right. Move your cursor along the line of the graph until the y axis value is zero. The corresponding x value is the predicted value of absolute zero. What is the predicted value of absolute zero shown on your graph? NAS: I got -271. 35 degrees centigrade. Physics Absolute Zero By Peacetime