Thursday, December 26, 2019

Using a Timer in MS Office VBA Macros

For those of us who have our minds deeply into VB.NET, the journey back to VB6 can be a confusing trip. Using a Timer in VB6 is like that. At the same time, adding timed processes to your code is not obvious to new users of VBA Macros. Timers For Newbies Coding a Word VBA macro to automatically time a test that was written in Word is a typical reason for using a timer. Another common reason is to see just how much time is being taken by different parts of your code so you can work on optimizing the slow sections. Sometimes, you might want to see if anything is happening in the application when the computer seems to be just sitting there idle, which can be a security problem. Timers can do that. Start a Timer You start a timer by coding an OnTime statement. This statement is implemented in Word and Excel, but it has different syntax depending on which one youre using.  The syntax for Word is: expression.OnTime(When, Name, Tolerance) The syntax for Excel looks like this: expression.OnTime(EarliestTime, Procedure, LatestTime, Schedule) Both have the first and second parameter in common. The second parameter is the name of another macro that runs when the time in the first parameter is reached. In effect, coding this statement is like creating an event subroutine in VB6 or VB.NET terms. The event is reaching the time in the first parameter. The event subroutine is the second parameter. This is  different from the way it is coded in VB6 or VB.NET. For one thing, the macro named in the second parameter can be in any code that is accessible. In a Word document, Microsoft recommends putting it in the Normal document template. If you put it in another module, Microsoft recommends using the full path: Project.Module.Macro. The expression is usually the Application object. The Word and Excel documentation states that the third parameter can cancel the execution of the event macro in case a dialog or some other process prevents it from running within a certain time. In Excel, you can schedule a new time in case that happens. Code the Time Event Macro This code in Word is for the administrator who wants to display a notification that the testing time has expired and print the result of the test. Public Sub TestOnTime()Debug.Print The alarm will go off in 10 seconds!Debug.Print (Before OnTime: Now)alertTime Now TimeValue(00:00:10)Application.OnTime alertTime, EventMacroDebug.Print (After OnTime: Now)End SubSub EventMacro()Debug.Print (Executing Event Macro: Now)End Sub This results in the following content in the immediate window: The alarm will go off in 10 seconds!Before OnTime: 12/25/2000 7:41:23 PMAfter OnTime: 12/25/2000 7:41:23 PMExecuting Event Macro: 2/27/2010 7:41:33 PM Option for Other Office Apps Other Office applications dont implement OnTime. For those, you have several choices. First, you can use the Timer function, which simply returns the number of seconds since midnight on your PC, and does your own math, or you can use Windows API calls. Using Windows API calls has the advantage of being more precise than Timer. Heres a routine suggested by Microsoft that does the trick: Private Declare Function getFrequency Lib kernel32 _Alias QueryPerformanceFrequency (cyFrequency As Currency) As LongPrivate Declare Function getTickCount Lib kernel32 _Alias QueryPerformanceCounter (cyTickCount As Currency) As LongSub TestTimeAPICalls()Dim dTime As DoubledTime MicroTimerDim StartTime As SingleStartTime TimerFor i 1 To 10000000Dim j As Doublej Sqr(i)NextDebug.Print (MicroTimer Time taken was: MicroTimer - dTime)End SubFunction MicroTimer() As Double Returns seconds.Dim cyTicks1 As CurrencyStatic cyFrequency As CurrencyMicroTimer 0 Get frequency.If cyFrequency 0 Then getFrequency cyFrequency Get ticks.getTickCount cyTicks1 SecondsIf cyFrequency Then MicroTimer cyTicks1 / cyFrequencyEnd Function

Wednesday, December 18, 2019

Breaking Barriers Towards Investment Of Renewable Energy...

Breaking Barriers towards Investment in Renewable Energy The year is 2015 – and all of the cars are zipping around in the air, Jetsons-style, due to a â€Å"hover conversion† (Back to the Future Part II). That is how the 1989 movie, Back to the Future, Part II envisioned our world would be like in 2015. Even though that theory was proven wrong by time, the race for fuel of the future is on. With an unstable market for oil and over exploitation of fossil fuels, it will not be long before humanity will face a crisis in the near future, desperate for an alternative fuel. Are countries working towards a â€Å"greener future†, or are they making things worse? A look into some of the alternate fuels being researched and analysis of their stock markets brings forth some interesting data. There needs to be a significant growth in the market for renewable fuels and it is not possible without changing the current market structure. Archeologists have traced fossil fuels as early as 3490 BC in China, where they have found evidence of surface mining and household usage of coal. The British started using coal during the Middle Ages, when they were starting to run out of firewood (Moore). The growing popularity of coal led to a significant decrease in its quantity on the surface of Earth, resulting in the creation of coal mines. It was later in 200 BC that the Chinese developed natural gas and used it as an energy source. During the same period, the Europeans harnessed water energy to power mills,Show MoreRelatedThe Effects Of Melting Glaciers On Canada s Coastline Essay1616 Words   |  7 PagesThe question is â€Å"How might the breaking up and melting of continental ice in Greenland and the Antarctic affect Canada’s coastline?†. In the following sections, we have gathered an abundance of information from a variety of sources from which we will discuss, and analyze. We will find out how this data c an help us understand the effect of melting glaciers on Canada’s coastline, as well as how and what we could do to stop or slow it down. 2.0 ISSUE OVERVIEW The breaking of continental ice from GreenlandRead MorePolitics Of Oil : Student s Name1807 Words   |  8 PagesName Institution Introduction Renewable energy has currently become a significant aspect in the countries generation, combination, and a constitution focus of government policy for energy, and environmental protection. As a result of public’s growing responsibility for the environment and constantly binding rules, and regulations of emission in the electric power industry, government has facilitated policies to boost the amount of renewable energy in the electricity generation portfolioRead MoreEconomic and Social Groupings Essay1244 Words   |  5 Pageschance to grow. The free movement of people also goes a long way to breaking down trade barriers, and enabling human resources to be shared between union members. The EU also has many other benefits, for one it has allocated funds to support the underdeveloped regions of the EU. They have provided funds to support their countries to conform to the standards of the EU. Poland for instance has benefitted greatly from the investment, which has served to shift to a greater market orientation from a state-controlledRead MoreEssay about The Effects of CO2 in Climate Change1562 Words   |  7 Pagessignificant threats facing the world today, there are many groups doing what they can to assist in slowing the climate change process or potentially halt it all together. This process, however, can be challenging as there are issues that stand as barriers that we as nations and world citizens need to work on together to change (The global climate, 2013). There are many different aspects to the global climate change which pose as impediments, however, two main aspects or impediments are more prominentRead MoreA Report On Bottled Water Market2109 Words    |  9 Pageshttps://www.dkit.ie) The production process of bottled water requires energy to make, package, transport, chill, use, and recycle the product and its packaging (see figure 1). The total amount of energy needed is complicated by many factors, including the location and type of the water source, the distance from the bottler to the consumer, the types of material and packaging used, the method of transportation, and much more. Figure 1: Energy requirement for production of bottled water. (Source http://iopscienceRead MoreIs Global Warming A Legitimate Problem? Essay2087 Words   |  9 Pagesdecades was recorded in the summer of 1988 as stated by UC San Diego Virtual Museum. Speculation had developed that man-made greenhouse effects were finally put in estimated speculation that the earth’s temperature might arise. After that year, record breaking temperatures kept being recorded, and people were afraid that global warming has been already upon us, and it was only going to get worse. Carbon dioxide, is one of the major, harmful gases that gets trapped in the greenhouse effect. CO2 gets releasedRead MoreStrategic Management Team Project : Team Report Final5048 Words   |  21 Pagescustomer expectations. Sony Corporation â€Å"At Sony, our mission is to be a company that inspires and fulfills your curiosity. Our unlimited passion for technology, content and services, and relentless pursuit of innovation, drives us to deliver ground-breaking new excitement and entertainment in ways that only Sony can. Creating unique new cultures and experiences. Everything we do, is to move you emotionally.† (About Sony: Sony Corporation, 2015) June 2015, Sony Corporation announced the establishmentRead MoreSony s Key Manufacturing Facilities3731 Words   |  15 Pagesproducts, home audio, wireless mobile pairing, recording media, robots, and more. Internal Analysis Mission and vision â€Å"Our unlimited passion for technology, content and services, and relentless pursuit of innovation, drives us to deliver ground-breaking new excitement and entertainment in ways that only Sony can.Creating unique new cultures and experiences. Everything we do is to move you emotionally.† June 2015, Sony Corporation announced the establishment of its Green Management 2020 group environmentalRead MoreSony s Key Manufacturing Facilities3654 Words   |  15 Pagesproducts, home audio, wireless mobile pairing, recording media, robots, and more. Internal Analysis Mission and vision â€Å"Our unlimited passion for technology, content and services, and relentless pursuit of innovation, drives us to deliver ground-breaking new excitement and entertainment in ways that only Sony can.Creating unique new cultures and experiences. Everything we do is to move you emotionally.† June 2015, Sony Corporation announced the establishment of its Green Management 2020 group environmentalRead MoreSony Corporation ( Sony )3760 Words   |  16 Pagesfrom their original line of products, home audio, to recording media to robots. Internal Analysis Mission and vision â€Å"Our unlimited passion for technology, content and services, and relentless pursuit of innovation, drives us to deliver ground-breaking new excitement and entertainment in ways that only Sony can.Creating unique new cultures and experiences. Everything we do is to move you emotionally.† June 2015,Sony Corporation announced the establishment of its Green Management 2020 group environmental

Monday, December 9, 2019

Sarah mceneaney Essay Example For Students

Sarah mceneaney Essay After several frustrating attempts to visit a local art gallery, I was glad I finally had the chance to see the work of artist Sarah McEneaney. The gallery was very unique and unlike any other galleries I have visited. Her work is being showcased at The Institute of Contemporary Art at the University of Pennsylvania. The artist currently lives in Chinatown and has a studio there. Most artists have something that makes their work distinct. Ms. McEneaney uses egg tempera and gouache instead of the traditional type paint I am used to seeing. She also uses wood, panels and paper instead of the usual canvas. The materials that she uses just made the work explode and the colors of the paint she used were vibrant and rich in color. This was one of the most vivid showing of colors that I have seen in any museum art. By using egg tempera which she mixes herself, on gessoed wood and a very small brush to paint so she can paint with both short and long strokes (crosshatching) the artist says this is considered a very old medium (www. missioncreep.com/sarah). Most of her works were of her and her pets or of where she lives or an event in her live. There were a lot of nudes of her in the shower or bath. She also does painting of herself in her house or of sites around Philadelphia and several other cities. She also does sculptures of her animals.Some of the works that I really enjoyed are Mojacar Night, My House, Summer 1998 and Wissahickon. Mojacar Night is a painting of Sarah lying on a couch at nighttime. This painting really overwhelmed me because this was one of the most vibrantly colored paintings in the collection. She used egg tempera on panel that was sixteen by twenty inches and it was painted in 2001. On the panel the room that she is in is red a really bright red. When you look out the windows there is a farm and hills that she painted. This adds a calming mood to the painting contrasting with the bright red. My House, Summer 1998 was done in 1999 using egg tempera on wood. This was one of her larger works measuring forty-eight by thirty-six inches. This is a painting of Sarah in her backyard reading a newspaper. I liked this painting because you can read whats on the paper and the plants look life like. There is a lot of attention to detail so to enjoy this painting you have to first be on top of the painting and then take a few steps back. She adds great detail for both points of view. It does not look like a photo but it is does have a lot of elements in it. She uses bright yellows, blues and reds but she also adds blacks and browns into this work creating a feeling of being right there. This adds a nice view for the onlooker. Wissahickon is another one of her other works that I really liked. It is done with egg tempera on wood with a size of twenty-four by twenty-four inches. This painting is of a park where Sarah is walking her dog. It seems to be a painting of her over time in the park on the same day. The park is a winter scene and she is wearing a yellow jacket, which makes her really stand out against the snow covered ground and the bare trees of the park. She adds detail to this painting too with the rays of sun light that shine down. She even puts in the paw prints from the dog running in the park. There is a bridge in the background that even shows visible stones. This painting has something that I really liked because it shows her not just walking in one scene but in three separate scenes like three paintings within this one painting. It is almost as if she is starting from the background walking toward you coming into the foreground of the painting. .ud96d253ef6c7333349cb94e68e9c0b10 , .ud96d253ef6c7333349cb94e68e9c0b10 .postImageUrl , .ud96d253ef6c7333349cb94e68e9c0b10 .centered-text-area { min-height: 80px; position: relative; } .ud96d253ef6c7333349cb94e68e9c0b10 , .ud96d253ef6c7333349cb94e68e9c0b10:hover , .ud96d253ef6c7333349cb94e68e9c0b10:visited , .ud96d253ef6c7333349cb94e68e9c0b10:active { border:0!important; } .ud96d253ef6c7333349cb94e68e9c0b10 .clearfix:after { content: ""; display: table; clear: both; } .ud96d253ef6c7333349cb94e68e9c0b10 { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #95A5A6; } .ud96d253ef6c7333349cb94e68e9c0b10:active , .ud96d253ef6c7333349cb94e68e9c0b10:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #2C3E50; } .ud96d253ef6c7333349cb94e68e9c0b10 .centered-text-area { width: 100%; position: relative ; } .ud96d253ef6c7333349cb94e68e9c0b10 .ctaText { border-bottom: 0 solid #fff; color: #2980B9; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .ud96d253ef6c7333349cb94e68e9c0b10 .postTitle { color: #FFFFFF; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .ud96d253ef6c7333349cb94e68e9c0b10 .ctaButton { background-color: #7F8C8D!important; color: #2980B9; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://artscolumbia.org/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .ud96d253ef6c7333349cb94e68e9c0b10:hover .ctaButton { background-color: #34495E!important; } .ud96d253ef6c7333349cb94e68e9c0b10 .centered-text { display: table; height: 80px; padding-left : 18px; top: 0; } .ud96d253ef6c7333349cb94e68e9c0b10 .ud96d253ef6c7333349cb94e68e9c0b10-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .ud96d253ef6c7333349cb94e68e9c0b10:after { content: ""; display: block; clear: both; } READ: Wuthering Heights3 Essay She makes you feel that you are there watching her walk toward you. This artist is someone that I may not have normally gone to see, but I really liked and enjoyed seeing her work. The colors and how she did the paints and the materials that she uses are just something that you need to go to see to believe. These works have colors that I have never seen in paintings even though I have visited several large and small galleries and museums. A lot of her paintings make the viewer feel that you are there. I enjoyed the painting but after seeing her sculptures I feel that she is a stronger painter. This is one gallery you dont want to miss because Sarah McEneaneys work is so unique she is a local artist.

Monday, December 2, 2019

Men And Women Why Are We So Different Essays - Gender, Sex

Men And Women: Why Are We So Different? It is an undeniable fact that there are many differences between males and females, but we should be weary of making claims of superiority placing the importance of one gender over another. We should not view these differences as an absence of equality, but rather as the driving force that enables society to function in a more complete and diverse manner. When interviewed by Natalie Angier, professor Virginia Valian showed that these differences are inherent by saying You can take a person at random and list a bunch of adjectives- assertive, has high leadership ability, is kind to children - and the person would have no trouble matching them up with one sex or the other. This shows that society views certain characteristics as being distinctly male and others as being distinctly female. We, as men, should be careful not to undervalue women as Dr. Valian says we do. We should hold them as equals and as partners. In doing this, it is necessary to examine some of these differences and t o show that though these do exist, neither is superior to the other, and society should strive to reflect this. The first difference that we will examine is the very core that makes us different. That core is biology. In biology, there are two distinct sets of genes: male (XX) and female (XY). Though these are distinctly different, there can already be seen some similarity in the two. Both carry the X chromosome. These different sets of chromosomes cause us to form distinct male and female physical characteristics. These differences enable males to be more suited to certain tasks. Males usually develop stronger muscles than do females, making us more suited to certain tasks such as heavy lifting. This in turn leads to genderization of careers. Jobs that utilize this extra strength, such as construction or auto-mechanics are therefore classified as basically masculine careers. Other jobs, such as librarians or beauticians, are classified as feminine. Though some would argue that the distinction between masculine and feminine careers stems from societal influence, it can be seen that biology plays a huge role in making this differentiation. Another biological difference unites the two sexes in importance. That difference is in our reproductive systems. It's a given that humans, like most other species-bananas, sharks, ducks, any rabbit you pull out of a hat- rely on two sexes for reproduction. So basic is that requirement that we have chromosomes whose primary purpose is to deliver the genes that order up a male or female(Blum 46). Here, there is no distinction of importance. Both are equally necessary for the continuation of the human race. Though biology may account for many of the differences between males and females, it can by no means, account for all of them. Many outside factors cause these differences. These factors are influenced by hidden assumptions about sex and gender [that] remain embedded in cultural discourses, social institutions, and individual psyches. They influence and shape how people perceive, conceive, and discuss social reality(Greenbaum 97). The articles by Sanders and Farrell seemed to cast men as victims of these cultural influences. I believe it important to look at us, not as victims, but rather as inheritors of a sociological gift that enables and ensures the continuance of humanity as a whole. Angier uses the term gender gap in making these distinctions. Indeed, there is a gap, but this should not necessarily be viewed as a negative thing. I believe the concepts of masculinity and femininity to walk hand in hand. Both feed the other and neither can exist independently. Though this gap exists, it is continually bridged by both parties' dependence on the other. Simply put, though both roles are undeniably different, neither is more important than its companion role. Though society places a kind of predestination, to some extent, on what role we will assume as men, we are not victims because of this. To classify us as victims in turn places a concept of one gender as being superior. Since both genders are reliant on the other and neither can be viewed as more important, we must view the two as partners and this predestination as a blessing that