text:
Advanced Interactive Media/A New Challenge: Ethics and Morality for Future Media

Copyright or Copy Wrong?
Applying copyright laws written 100 years ago to creative content produced today (or even laws created in the 1980's, for that matter) is futile - no one during that time period was trying to protect content on their websites. There was no "copy, paste" option on people's manual typewriters and the thought of "working around the computer system" in order to download video clips or photos did not even exist. Who knows, "Bit Torrent" could have been slang for a rambunctious, rebellious preadolescent than a term for illegal downloads.

Drawing the Line
I was sitting in a future media class and I listened to a discussion about sharing music and how long it will last. Mixed with my own opinion and personal experience I wanted to type a few ideas down. First of all P2P sharing is illegal. There is no way to argue that fact, the law forbids sharing of music without paying the artist.

Are Today's Challenges Tomorrow's Problems?
In order to go forward a person must "go backward" to fully understand where they came from. When one talks about ethics and morality it hits the very core of a human being. In a sense, these words "ethics" and "morality" almost form our existence because they help to form personal views, both culturally and as a society. While their meanings never change, to each occupation the meanings are dissected in many different parts to fit that particular industry.

Ethics and morality as it relates to the media industry seem to have taken a negative turn. Instead of forming its own ethical values, the media industry often does what is accepted within society. When I think a few years back it seems as if the media of today has evolved to something completely different to that of past generations. Before it was unusual for a movie to have obscene language the exposure of private parts for the indulgence of a sexual scene. However, nowadays this behavior seems to be common place. The media portrays this behavior as commonplace; these things are no longer a taboo but have become culturally acceptable. But this very stigma has contaminated the very fabric of our morals. Children now see this as being the norm and instead of allowing the teachings of their parents to permeate them they instead turn to the media and in turn begin to experiment with the things that they are seeing in the media. If this trend continues it has the potential to have an adverse impact on our future generations. With these changes it is now up to society and to the media industry to accept the responsibility and take a stand by restoring integrity and morale. We can take steps to preserve the future of the media industry now by reversing the negative components that are presently acceptable and raise the standard so that anything does not go.

In today's culture, it is hard to anyone to define the words ethics and morality. In fact, dictionary.com states that ethics are: a system of moral principals. It also defines morality as: conformity to the rules of right conduct. There is a reason why no one can truly say without a shadow of a doubt what these two words mean, as shown by their definitions. These words mean different things to different people. Some people may believe that cussing is not a challenge to their morals while others may believe that is a dark sin. As religion is fading out and becoming less conservative and more liberal, these words are becoming more and more vague, even to those who consider themselves Christians.

How then, with no concrete definition can we define this in terms to Media? The more advanced the media becomes, people are choosing for themselves what is moral and what is ethical according to their own "right of conduct". Those who consider themselves Christians should go back to the one source of ethics- the Bible. The Bible is the ultimate "right of conduct". It defines what is moral and what is not. We should cling to those words when dilemmas are presented to us that pull us in question of our morals.

When it comes to today’s technology and fancy software programs, people must be aware of the power that they have at their fingertips. This is not in reference to the power of the program itself – surely that is understood to some degree. Producers and editors must be careful to present the truth as it is – unedited and unchanged. There was an article in the Houston Chronicle a while ago and it was talking about photojournalists using Photoshop to “touch up” their pictures. They were not using Photoshop to just make their pictures look good, but to give a false reality to the people that read their columns or saw their work. There have been a number of documentary movies whose producers and editors have taken what a person has said, twisted it for their own end, and released it. Sure someone may have said something, but anything can be taken and used inappropriately, thus creating a lie. The future producers and editors and videographers must make sure that they present reality as it is played out. Even if changing just one thing someone says can “help further the gospel,” it’s a lie and whoever changed it will be held accountable for that in the end.

Cost-Free College?
More than a decade ago MIT put all of the content for their classes online. It just didn't make sense that such an expensive product should be made available to anyone with an internet connection. Of course, content is nearly worthless without someone to explain the meaning of things - students still had to enroll in classes to make sense out of MIT's content. Then MIT made all of their CLASSES available at no cost through online courses! More and more businesses are discovering that giving away their most valuable information online can become a big moneymaker. How can copyright laws be enforceable in such an inconsistent and confusing environment? Why does MIT seem to be more successful than ever? If I published everything I know about how to become an iconic rock star, could my website evolve into a great online university like MIT's?

Why Do Wierdos Use The Cool Tools First?
Exciting new emerging media technologies can be lucrative but some of the most perverted minds seem to realize this before anyone else. How can video games and some of the most promising on-line features (streaming video, social networking, immersive/virtual experiences, etc.) be encouraged, cultivated and promoted when the industry leaders for these technologies seem to care about nothing more than profits, violence, sex, entertainment value and immediate gratification?

MP3 Jail Terms?
In November 2007, a marketing vice president for one of the major television networks said "My industry paid attention to what just happened during the startling collapse of Tower Records. I predict that the music industry, as we know it, will be completely unrecognizable within the next eighteen months." Whether I agree with his forecast or not, no one can deny the middleman is almost gone. A talented musician in the right place at the right time can go platinum after recording in their living room, being discovered on YouTube, forming their own record company and distributing their albums on the net. But how can this same musician reap the rewards of success when one of her songs is duplicated 50,000 times by people using the same technology that the artist used to bypass alhil of the systems created by the music recording industry? Was it illegal, immoral and unfair for 50,000 people to rip off her hit song? Were you one of them? What would be a reasonable jail term?

Likewise, the same questions may be posed about the record industry before mp3s became widespread: how can a musician "reap the rewards of success" when s/he is only paid the slightest fraction of the actual proceeds of her song, while the record company and the music establishment take the lion's share of her profits through historically inequitable contracts? "Was it illegal, immoral and unfair for" all these executives and affiliates "to rip off her [or his or their] hit song? Were you one of them? What would be a reasonable jail term?"

In response to this I would like to quote something a rather prescient friend of mine wrote just over a year ago as his new year's prediction: 'Caving in on itself, the MPAA will inevitably file a lawsuit over the RIAA’s violation of the MPAA’s copyrighted ability to file lawsuits for misuse of copyrighted materials. Citing that the RIAA did it first, the MPAA (and the courts of America) will not care, due to the fact that the RIAA did not copyright the act properly, thus nullifying the copyright. The RIAA will file countersuit for royalties not paid on their “poor man’s copyright” of mailing the idea to themselves in a USPS metered envelope.'

The absurd lengths to which these two organisations have pursued copyright infringement is well captured by my friend's satire! The result has been a developing public perception that they are no better than the greedy moguls their products so often malign and warn us about. It's one thing to go after those who deliberately rip off stuff for their own pecuniary gain and no reasonable person should begrudge such an effort; it is entirely another when we start hearing of lawsuits against grandmothers, whose granddaughters may have used their PC's to download something or other, and not relenting even after the facts become clear. That’s not justice; it’s greed. Attacking one’s own customer base is a really dumb business move, but the entertainment industry has fallen prey to an entitlement mentality, that by God, they're going to get back every last dime they’re due. It is also completely futile, as one of the other entries so well points out, because they will never be able to keep up with the prolific growth of networks. So in their frustration, rather than take a deep breath, they have attacked the creators of the software, and so the merry-go-round continues! Additionally, when the same industry continues to pay out literally millions to its top stars, it’s cries of lost revenue are liable to fall on deaf ears when it comes to working people who can only ever imagine such riches! There is a case, as I noted above, for legitimate prosecution, but what about the new artist worried that all their potential livelihood might be sucked away by the evil cybernet black hole? Contrary to the nightmare described above, the reality has actually given cause for hope in that regard: When Death Cab for Cutie found that the record label did not want to produce the record they had just been paid $500,000 to create, since they had the rights, they posted it on their website to be downloaded for free! In just a short time, they were being inundated by email from fans wanting to pay for the product! A far cry from the stereotypical legions of lecherous downloaders that we are led to believe inhabit the internet and which the above writer clearly believes are dominant. Contrary to the paranoia of the MPAA, RIAA and myriad others who take such a dim view of their fellow man, technology has always turned out to be the friend of the entertainment industry. Particularly when their efforts are akin to the sticking of a finger in a leaking dike, the industry should be embracing further progress rather than trying to stifle and tame it, simply because some revenue is being lost. The sad fact, which they apparently are determined to not face, is that such practices will always go on by people determined enough. They could however endear themselves to their customers, and so ellict some help in that fight, rather than the current policy of alienation that treats us all as if we are just a bunch of dirty thieves! The more the media industry resists the rampant technological progress in distribution, the more it's simply going to get left behind.

To further expound on this, and to provide a brief example, the music entertainment industry has gone to great lengths within the last decade to ensure that its music is copyright protected in a process known as digital rights management (DRM). This effort at combating piracy has arguably done little to maintain the surmounting number of illegal file sharing between computers and removable data copied from the CD format which files are DRM-free. In an unprecedented move, Apple CEO Steve Jobs proposed a new initiative in early 2007 following the release of his provocative essay entitled "Thoughts on Music," conditioning for the adoption of a DRM-free system, allowing users interoperability and a greater freedom to distribute files without fear of retribution. Apple launched what became iTunes Plus in May, featuring high quality 256 kbps AAC encoding music files indistinguishable from the original recordings. Of the four major distribution companies: EMI, Universal, Sony BMG, and Time Warner, only EMI has contracted to distribute its catalog through the iTunes DRM-free store, while Universal, Sony and Time Warner have signed deals with competitors, hoping to loosen Apple's hold on the market. DRM-free music offered through such competitors as Amazon mp3 and Wal-Mart however are encoded at a variable kbps rate, falling short of iTunes consistent 256 kbps, which is unsettling to the listener and a dangerous business move for the three remaining companies who have found it still unnecessary to fully satisfy the wants of the consumer they are trying to reach.

Living in a Virtual World
In October 2007, comedy website Cracked.com published an article by David Wong and Steve Woyach called "The Next 25 Years of Video Games." The article, though humorous in tone, is a serious look at predicted technological expansions in five-year increments from 2008-2033. Citing technology currently being constructed, the article theorizes that by 2033, the cost of constructing a computer on level with the human brain will be about $1. It concludes by predicting that, in less than thirty years, computers will directly interface with the human brain without surgery, and living and interacting with a virtual world will become more commonplace than actually leaving the house to interact with the actual "real" world.

Modern computing devices have only existed since the 1940s. If civilization has existed since roughly 10,000 BC as suggested by most historical research, 60 years is .005% of the history of human civilization. To suggest that, in that five thousandths of a percent, human life could change so dramatically, is fairly audacious. However, the changes brought about in both technological advancement and social perspectives during the twentieth century are astounding. For the first time in human history, information is available freely and readily to anyone all over the planet without leaving the comforts home, the office or the schoolroom. Throughout the world, the Western Hemisphere in particular, emphasis is being placed on the individual rather than a mass group. Government criticism comes frequently and freely, and even a solitary individual with no connections or friends could have an online readership numbering in the millions. Before 1908, the first, and perhaps only, mass media device was the printing press. In 2008, mass media and instant access to new information can be acquired through devices smaller than any book.

Going back to the Wong/Woyach article, it is not particularly radical to suggest that human beings will be living in completely virtual environments by the year 2033. The technological and social changes brought about in the past 150 years have proven that complete lifestyle change can be abrupt and severe. Is it so absurd, then, to suggest that in twenty-five years human beings will shake hands with pixels instead of flesh and bone?

Assuming that the future of social interactions is a complete virtual world, does this change the way we should even govern people? Could a parent send their child into the virtual world to avoid the responsibility of raising them? Could said child construct their own ideal parents in their tiny, virtual world? If this child grows up into an angry, hostile individual with violent tendencies, who could he hurt in a world made of ones and zeros?

Could we send people to prisons for real-world crimes, but let them roam free in a virtual world? Could a person be prosecuted for stealing a virtual stereo?

Could there be a couple married forty years that have never met face-to-face? Is there anything wrong with that?

The Future of Commercials
It is becoming common to see a particular product strategically placed on TV shows, movies or online content. Computers, cell phones, foods and even the weirdest of products have made "cameo appearances" with the help of these mediums. The product’s manufacturer has usually paid a large sum of money to have their product displayed or have arranged some type of agreement with the producer of the media. The placement may be very subtle like a bag of chips on the table or as obvious as a logo cleverly integrated into the design of a website. The audience does not realize that they are subconsciously being influenced by this growing form of marketing. Although it appears to be an effective strategy for advertisers, ethical questions arise about its influence on children and others who may be easily influenced by seeing their favorite stars using or talking about a particular product. With commercial-skipping DVR technology and the rise of shows available online without ads, product placement may be the commercials of the future. Is it fair to the audience the hide advertising inside their favorite shows? How much can advertisers place in a show before the show just becomes one big ad itself? These questions remain to be answered as the future of advertising takes shape.

The New Interpersonal Interactive Ethic
One issue that arises with the advent of newer and more interactive media types is that of hospitable, interpersonal communication and action. With technologies such as the Internet, which is fast approaching a stage where it will become the source of all subsequent communications that were once relegated to other means, one can easily find themselves mistreating or misjudging the other user due to the lack of personal interaction. Just as driving on a busy highway causes many to lose their manners and treat other drivers as nuisances instead of fellow human beings, so this new highway of interactive communication can become a place of selfishness and hostility, instead of helpfulness and hospitality. The key is to discover ways to make these new emerging forms of communication more natural and interpersonal so the average user will remain in the proper composure which ethics demand. This, however, may become a natural side effect of increasing realism within the realm of Interactive Media.


text:
Celestia/Celx Scripting/CELX Lua Methods/Celx object

= Celx Scripting: Object =

object
An "Object" object in CELX does not refer to a general object (like Object in Java), but to a celestial object like a planet, star, spacecraft, location, etc..

Within a CELX script, the object methods can be used on an "object" object, by separating the "object" object from the object method with a semicolon.

The following methods can be used to obtain an "object" object:
 * Using the celestia:find method.
 * Using the celestia:getselection method.
 * Using the celestia:getstar method.
 * Using the celestia:getdso method.
 * Using the observer:gettrackedobject method.
 * Using the frame:getrefobject method.
 * Using the frame:gettargetobject method.

Methods
This chapter contains a list of all available object methods, which can be used on "object" objects.

radius
number

Return the radius of the object in kilometers, as a number.

Notes:
 * 1) For ellipsoidal objects, the radius is the long semi-axes.
 * 2) For irregular objects, the radius is the longest axis of an aligned bounding box.
 * 3) The radius of an object can be set by using the  object:setradius method.

Example: Determine and print the radius of our Moon.

moon = celestia:find("Sol/Earth/Moon") rmoon = moon:radius celestia:print("The radius of our Moon is: " .. rmoon .. " km.", 5.0, -1, -1, 2, 4) wait(5.0)

Return to the object method index.

type
string

Return the type of an object as a string. The type can be one of:
 * planet
 * moon
 * asteroid
 * comet
 * spacecraft
 * star
 * location
 * null (refers to the origin of the universal coordinate system)
 * invisible (refers to a reference point)
 * diffuse
 * deepsky
 * galaxy
 * nebula
 * opencluster
 * surfacefeature
 * component
 * dwarfplanet
 * minormoon

Example: Determine and print the type of M33

m33 = celestia:find("M 33") type = m33:type celestia:print("The type of M33 is: " .. type, 5.0, -1, -1, 2, 4) wait(5.0)

Return to the object method index.

spectraltype
string

Return the spectral type of a star as a string.

If the object is NOT a star, nil will be returned.

Notes:
 * 1) The spectral type tells something about the spectral class, subcategory and luminosity class of stars.
 * 2) Celestia knows the following spectral classes for stars:
 * 3) * The Morgan-Keenan spectral classes: O, B, A, F, G, K, M.
 * 4) * The following rara/unusual classes: L, T, R, S, N, C, WC, WN, D (white dwarf), Q (neutron star), X (black hole).
 * 5) The spectral classes are further divided into subclasses by adding a numerical value between 0 and 9 to the letter.
 * 6) Celestia knows the following luminosity classes: I-a0, I-a, I-b, II, III, IV, V, VI, sd and D.
 * 7) The STC-Scripting Guide for Celestia contains a lot of additional information about spectral types of stars.

Example:

sun = celestia:find("Sol") spectraltype = sun:spectraltype celestia:print("Our own Sun is of spectraltype: " .. spectraltype, 5.0, -1, -1, 2, 4) wait(5.0)

Return to the object method index.

absmag
number

Return the absolute magnitude of a star as a number.

If the object is NOT a star, nil will be returned.

Notes:
 * 1) The absolute magnitude of a star is a measure of its brightness it would have at a standardized distance of 10 parsec (~32.616 light years), so the absolute magnitude of a star will not change with distance.

Example:

redgiant = celestia:find("Betelgeuse") celestia:select(redgiant) obs = celestia:getobserver obs:goto(redgiant) magnitude = redgiant:absmag celestia:print("The absolute magnitude of Redgiant Betelgeuse is: " .. magnitude, 5.0, -1, -1, 2, 4) wait(5.0)

Return to the object method index.

name
string

Return the name of the object as a string.

Example:

polestar = celestia:find("Polaris") celestia:select(polestar) obs = celestia:getobserver obs:goto(polestar) starname = polestar:name celestia:print("The name of our current Northpole star is: " .. starname, 5.0, -1, -1, 2, 4) wait(5.0)

Return to the object method index.

getinfo
table

Return a table with the available information on this object.

The exact contents of the table depend on the type of object. The information returned includes the information available via other object methods.

 * 1) For a star the table may include these keys:
 * 2) * type
 * 3) * name
 * 4) * catalogNumber
 * 5) * stellarClass
 * 6) * absoluteMagnitude
 * 7) * luminosity
 * 8) * radius
 * 9) * temperature
 * 10) * rotationPeriod
 * 11) * bolometricMagnitude
 * 12) * orbitPeriod
 * 13) ** orbitPeriod is only available in case of a star in a binary or multiple star system.
 * 14) For a body (e.g. a planet ) the table may include these keys:
 * 15) * type
 * 16) * name
 * 17) * oblateness
 * 18) * albedo
 * 19) * radius
 * 20) * lifespanStart
 * 21) * lifespanEnd
 * 22) * rotationPeriod
 * 23) * orbitPeriod
 * 24) * atmosphereHeight
 * 25) ** Only valid if body has an atmosphere.
 * 26) * atmosphereCloudHeight
 * 27) ** Only valid if body has an atmosphere.
 * 28) * atmosphereCloudSpeed
 * 29) ** Only valid if body has an atmosphere.
 * 30) * parent
 * 31) ** parent is an "object" object, which may be a body or a star (not printable)!
 * 32) * hasRings
 * 33) ** hasRings is a Boolean (not printable)!
 * 34) * The following keys were initially mentioned to be valid for a body, but they return an invalid/nil value or cause a Fatal Error in or crash in previous releases. When fixed, the documentation of these keys will be adjusted accordingly. Until then, skip the usage of the following keys:
 * 35) ** mass
 * 36) ** infoURL
 * 37) ** rotationOffset
 * 38) ** rotationEpoch
 * 39) ** rotationObliquity
 * 40) ** rotationAscendingNode
 * 41) ** rotationPrecessionRate
 * 42) For a deepsky object, the table may include these keys:
 * 43) * type
 * 44) * name
 * 45) * radius
 * 46) * catalogNumber
 * 47) * hubbleType
 * 48) * absoluteMagnitude
 * 49) For a location object, the table may include these keys:
 * 50) * type
 * 51) * name
 * 52) * size
 * 53) * importance
 * 54) * infoURL
 * 55) * featureType
 * 56) * parent
 * 57) ** parent is an "object" object, which may be a body (not printable)!

Notes:
 * 1) Mind the case sensitivity of celestia, regarding the keys for this object method !!!
 * 2) Some keys may not be available because they don't apply to the body in question (e.g. it doesn't have an atmosphere etc.), or contain no useful data. Those keys contain a nil value and can for instance not be printed.

Example:

planet = celestia:find("Sol/Venus") celestia:select(planet) obs = celestia:getobserver obs:goto(planet) name = planet:name table = planet:getinfo celestia:print("The available information on " .. name .. ":\n" ..               "Type: " .. table.type .. "\n" ..                "Name: " .. table.name .. "\n" ..                "Oblateness: " .. table.oblateness .. "\n" ..                "Albedo: " .. table.albedo .. "\n" ..                "Radius: " .. table.radius .. "\n" ..                "Lifespan Start: " .. table.lifespanStart .. "\n" ..                "Lifespan End: " .. table.lifespanEnd .. "\n" ..                "Rotation Period: " .. table.rotationPeriod .. "\n" ..                "orbit Period: " .. table.orbitPeriod .. "\n" ..                "atmosphere Height: " .. table.atmosphereHeight .. "\n" ..                "atmosphere Cloud Height: " .. table.atmosphereCloudHeight .. "\n" ..                "atmosphere Cloud Speed: " .. table.atmosphereCloudSpeed, 30.0, -1, -1, 2, 25) wait(30.0)

Return to the object method index.

mark

Place a marker on an object.

Notes:
 * 1) You can also use the celestia:mark method instead, but that method has much less  possibilities.
 * 2) Markers are only shown when Celestia's markers renderflag option is turned on, using the celestia:setrenderflags method.
 * 3) If you want to change a marker on an object, you have to unmark it first, using the celestia:unmark or object:unmark method and then mark it again with the changed marker.`
 * 4) Although all arguments of this method are optional, if you are using an argument that is placed further in the argument list, you need to give the previous arguments to this method too.

Example-1: Place a blue circle marker on Sirius

celestia:setrenderflags{markers = true} obs = celestia:getobserver sirius = celestia:find("Sirius") sirius:mark("blue", "circle", 15) obs:center(sirius) wait(10.0) celestia:unmarkall celestia:setrenderflags{markers = false}

Example-2: Place a large red 'you are here' arrow on the Earth

celestia:setrenderflags{markers = true} obs = celestia:getobserver home = celestia:find("Sol/Earth") home:mark("#ff0000", "leftarrow", 20, 1, "You are here") obs:center(home) wait(10.0) celestia:unmarkall celestia:setrenderflags{markers = false}

Return to the object method index.

unmark
Remove marker from the object.

Notes:
 * 1) If you don't unmark objects and turn the markers renderflag off, using the celestia:setrenderflags method, Celestia still remembers the marked objects. Next time turning the markers renderflag on, all the objects will be marked again.
 * 2) You may want to use the celestia:unmark method instead.

Example: Find, center end mark star Polaris with a blinking marker for 10 seconds

selection = celestia:find("Polaris") celestia:getobserver:center(selection) celestia:setrenderflags{markers = true} for i = 1, 10 do   selection:mark("cyan", "disk", 15, 0.25, "Polaris", false) wait(0.5) selection:unmark wait(0.5) end celestia:setrenderflags{markers = false}

Return to the object method index.

getposition
position

Return the position of the object at the specified time in universal coordinates, as a "position" object.

Notes:
 * 1) Celestia's native coordinate system is based on the J2000 ecliptic, but it's rotated by 90 degrees from the conventional definition.
 * 2) Position components (X,Y,Z) in Celestia are stored in millionths of a light year. So when you want your positions defined in km or miles, you have to convert these positions. Therefore, you can use a constant, which must be initialized first within your script:
 * 3) * From millionths of a light year to km, use a constant uly_to_km = 9460730.4725808.
 * 4) * From millionths of a light year to miles, use a constant uly_to_mls = 5912956.5453630.
 * 5) Next you can convert millionths of a light year to km or miles as follows:
 * 6) * km = number:millionths_of_a_light_year * uly_to_km
 * 7) * miles = number:millionths_of_a_light_year * uly_to_mls
 * 8) A CELX "position" object contains the exact coordinates of a point in space. A position is relative to a coordinate system and may need to be converted to or from universal coordinates before further use.
 * 9) The position methods can be used on a CELX "position" object. "Position" objects can also be used in other methods, requiring a "position" object as an argument.

Example: The function retrieves the position of the object 'obj' relative to another object 'center' at time t. The position is in units of kilometers and is in the standard J2000 ecliptic coordinate system (where the z-axis is the northward pointing normal to the J2000 ecliptic plane, and the x axis is out along the ascending node of the ecliptic plane and Earth equator.)

function position_ecl_j2000(obj, center, t)   local uly_to_km = 9460730.4725808 local p0 = center:getposition(t) local p = obj:getposition(t) -- Convert to kilometers local v = (p - p0) * uly_to_km -- Convert from Celestia's internal coordinate system return celestia:newvector(v.x, -v.z, v.y) end -- Retrieve the heliocentric ecliptic coordinates of Earth at the current simulation time sun = celestia:find("Sun") earth = celestia:find("Sun/Earth") vec = position_ecl_j2000(earth, sun, celestia:gettime)

Return to the object method index.

getchildren
table

Return a table containing all children of this object, as "object" objects.

Notes:
 * 1) The object methods can be used on a CELX "object" object. "Object" objects can also be used in other methods, requiring an "object" object as an argument.

Example: Goto an overview position on our Solar System and increase the size of all planets for about 20 seconds. Then reset to normal planet sizes again.

-- Render planets and planet orbits and show planet labels celestia:setorbitflags{ Planet = true } celestia:setrenderflags{ planets = true, orbits = true, smoothlines = true } celestia:setlabelflags{ planets = true } celestia:setminorbitsize(3) -- Find and select our Sun and goto position to have a good overview on our Solar System sol = celestia:find("Sol") celestia:select(sol) obs = celestia:getobserver obs:gotolonglat(sol, 0, math.rad(70), 1.3e10, 1.0) wait(1.0) -- Return all children of our Sun in table sol_children sol_children = sol:getchildren -- Create table to save original size of all planets iRadius = {} for k, child in pairs(sol_children) do   if child:type == "planet" then -- Save original size of planet iRadius[k] = child:radius -- Increase planet size child:setradius(iRadius[k] * 4e3) end end -- Have this overview for the specified wait time wait(20.0) -- Reset original size of all planets sol_children = sol:getchildren for k, child in pairs(sol_children) do   if child:type == "planet" then child:setradius(iRadius[k]) end end -- Clear rendering of orbits and hide planet labels celestia:setrenderflags{ orbits = false } celestia:setlabelflags{ planets = false }

Return to the object method index.

preloadtexture
Load all textures for the object from disk into the memory of your graphic card.

Notes:
 * 1) Using this method can be useful for producing smoother running scripts, as preloading textures will reduce delays when approaching an object.

Example: Preload the texture of Titan, before going to this moon of Saturn.

titan = celestia:find("Sol/Saturn/Titan") titan:preloadtexture celestia:select(titan) obs = celestia:getobserver obs:gotodistance(titan, 20000, 5.0) wait(5.0)

Return to the object method index.

setradius

Set the new radius of the object.

Notes:
 * 1) The actual radius of an object can be obtained by using the object:radius method.

Example1: Goto a position in the Earth–Moon system and make both the Moon and Earth ten times their actual size for about 10 seconds. Then reset the Moon and Earth to their original sizes again.

obs = celestia:getobserver -- Set frame of reference to "universal". obs:setframe(celestia:newframe( "universal")) -- Find the actual position of the Earth. earth = celestia:find("Sol/Earth") earthpos = earth:getposition -- Find the actual position of the Moon. moon = celestia:find("Sol/Earth/Moon") moonpos = moon:getposition -- Calculate new position halfway Earth - Moon to look at. newpos1 = earthpos + 0.5 * (moonpos - earthpos) -- Calculate new position to goto newpos2 = newpos1 + celestia:newvector(0, 0.2, 0) obs:goto(newpos2, 1.0) wait(1.0) obs:lookat(newpos1, celestia:newvector(0, 0, 1)) -- save, set and reset the radius of the Moon and Earth earthradius = earth:radius moonradius = moon:radius earth:setradius(10*earthradius) moon:setradius(10*moonradius) wait(10.0) moon:setradius(moonradius) earth:setradius(earthradius)

Example2: Increase the size of Planets for an educational view of our solar system. -- Callback to restore original size of Planets. function celestia_cleanup_callback sol_children = sol:getchildren for k, child in pairs(sol_children) do      if child:type == "planet" then child:setradius(iRadius[k]) end end end -- Render planets, orbits and planet labels celestia:setorbitflags{ Planet = true } celestia:setrenderflags{ planets = true, orbits = true, smoothlines = true } celestia:setlabelflags{ planets = true } celestia:setminorbitsize(3) -- Goto position above the Solar System sol = celestia:find("Sol") celestia:select(sol) obs = celestia:getobserver obs:gotolonglat(sol, 0, 70, 1e10, 5) wait(5) -- Enlarge the planets sol_children = {} iRadius = {} sol_children = sol:getchildren for k, child in pairs(sol_children) do   if child:type == "planet" then iRadius[k] = child:radius child:setradius(iRadius[k] * 4000) end end while true do   wait(0) end

Return to the object method index.

localname
string

Return the localized name of the object as a string.

Return "?" if there is no localized object name available.

Notes:
 * 1) From version, Celestia fully supports internationalization. For each language, all the strings used in the program can be translated and one of them is the name of the object.
 * 2) "Sol", along with the name of all other stars and many DSOs are not localized.

Example: Display the localized name of the current selection.

while true do   sel = celestia:getselection name = sel:name lname = sel:localname celestia:print("The localized name of " .. name .. " is: " .. lname, 1.0, -1, -1, 2, 4) wait(0) end

Return to the object method index.

visible
boolean

Return a boolean, indicating whether or not the object is visible.
 * true if the object is visible.
 * false if the object is NOT visible.

Notes:
 * 1) The  object:setvisible method can be used to turn on/off the object visibility.
 * 2) Objects within the Solar System are only shown when Celestia's planets renderflag option is turned on, by using the celestia:setrenderflags method. The actual setting of the planets renderflag option does NOT influence the result of this object:visible method.
 * 3) A star will always stay visible, regardless the usage of this method. The rendering of all stars can only be turned on/off, by using the celestia:setrenderflags method.

Example: If Earth is visible, make it invisible for 5 seconds and vice versa.

obj = celestia:find("Sol/Earth") obj_rad = obj:radius obs = celestia:getobserver obs:gotodistance(obj, 4*obj_rad, 1.0) wait(1.0) obj_visible = obj:visible if obj_visible then celestia:print(obj:localname.." set to invisible for 5 seconds", 5.0, -1, -1, 2, 4) obj:setvisible(false) wait(5.0) obj:setvisible(true) else celestia:print(obj:localname.." set to visible for 5 seconds", 5.0, -1, -1, 2, 4) obj:setvisible(true) wait(5.0) obj:setvisible(false) end

Return to the object method index.

setvisible

Set the object visibility flag.

Notes:
 * 1) The  object:visible method can be used to determine whether or not an object is visible.
 * 2) Objects within the Solar System are only shown when Celestia's planets renderflag option is turned on, by using the celestia:setrenderflags method.
 * 3) A star will always stay visible, regardless the usage of this method. The rendering of all stars can only be turned on/off, by using the celestia:setrenderflags method.

Example: Toggle object visibility for specified object by using the [Shift + T] keys on the keyboard. Press the [Esc] key on the keyboard to terminate the example.

-- Edit the next line to define another object obj = celestia:find("Sol/Earth") -- obj_rad = obj:radius obs = celestia:getobserver obs:gotodistance(obj, 4*obj_rad, 1.0) wait(1.0) function toggleObjVisibility obj:setvisible(not obj:visible) if obj:visible then celestia:print(obj:localname.." visible") else celestia:print(obj:localname.." invisible") end end -- Edit the next line to define another key than the [T] key keyhandlers = { T = toggleObjVisibility } function handlekey(k) handler = keyhandlers[k.char] if handler ~= nil then handler return true else return false end end celestia:registereventhandler("key", handlekey)

Return to the object method index.

setorbitcolor

Set a specific orbit color for this object.

Notes:
 * 1) Orbits are only shown when Celestia's orbits renderflag option is turned on, using the celestia:setrenderflags method.
 * 2) Specific orbits are only shown when Celestia's orbitflags are turned on, using the celestia:setorbitflags method.
 * 3) The visibility of the orbit of this object can also be set by using the  object:setorbitvisibility method.
 * 4) The specified orbit color for this object will only be shown if the default orbit color for this object may be overridden, as set by using the  object:setorbitcoloroverridden method.
 * 5) As long as the object is also the current selected object, the orbit will be displayed in the red color!

Example: Set the orbit color of Earth to yellow.

-- Render planets and planet orbits and show planet labels celestia:setorbitflags{ Planet = true } celestia:setrenderflags{ planets = true, orbits = true, smoothlines = true } celestia:setlabelflags{ planets = true } celestia:setminorbitsize(3) -- Find and select our Sun and goto position to have a good overview on our Solar System sol = celestia:find("Sol") celestia:select(sol) obs = celestia:getobserver obs:gotolonglat(sol, 0, math.rad(70), 7e9, 1.0) wait(1.0) earth = celestia:find("Sol/Earth") earth:setorbitcolor(1, 1, 0) earth:setorbitcoloroverridden(true)

Return to the object method index.

orbitcoloroverridden
boolean

Return a boolean, indicating whether or not the object orbit color may be overridden.
 * true if the object orbit color is overridden.
 * false if the object orbit color is NOT overridden.

Notes:
 * 1) To set whether or not the default orbit color of an object may be overridden, the  object:setorbitcoloroverridden method can be used.

Example: If orbit color of Earth may be overridden, set orbit color of Earth tot aqua. Else print a message.

earth = celestia:find("Sol/Earth") obs = celestia:getobserver -- Uncomment the next line if you want colors to be overridden -- earth:setorbitcoloroverridden(true) obs:gotolonglat(earth, 0, math.rad(20), 5e8, 1.0) wait(1.0) celestia:select(nil) celestia:setorbitflags{ Planet = true } celestia:setrenderflags{ planets = true, orbits = true, smoothlines = true } earth_orbitcolor_yn = earth:orbitcoloroverridden if earth_orbitcolor_yn then earth:setorbitcolor(0, 1, 1) else celestia:print("The orbit color of Earth may NOT be overridden", 5.0, -1, -1, 2, 4) wait(5.0) end

Return to the object method index.

setorbitcoloroverridden

Determine whether or not the default orbit color of the object will be replaced with the color set in the object:setorbitcolor method.

Notes:
 * 1) Orbits are only shown when Celestia's orbits renderflag option is turned on, using the celestia:setrenderflags method.
 * 2) Specific orbits are only shown when Celestia's orbitflags are turned on, using the celestia:setorbitflags method.
 * 3) The visibility of the orbit of this object can also be set by using the  object:setorbitvisibility method.
 * 4) As long as the object is also the current selected object, the orbit will be displayed in the red color!

Example: Set the orbit color of Earth to yellow and default alternately.

-- Render planets and planet orbits and show planet labels celestia:setorbitflags{ Planet = true } celestia:setrenderflags{ planets = true, orbits = true, smoothlines = true } celestia:setlabelflags{ planets = true } celestia:setminorbitsize(3) -- Find and select our Sun and goto position to have a good overview on our Solar System sol = celestia:find("Sol") celestia:select(sol) obs = celestia:getobserver obs:gotolonglat(sol, 0, math.rad(70), 5e9, 1.0) wait(1.0) earth = celestia:find("Sol/Earth") earth:setorbitcolor(1, 1, 0) for i = 1, 10 do   earth:setorbitcoloroverridden(true) wait(0.5) earth:setorbitcoloroverridden(false) wait(0.5) end

Return to the object method index.

orbitvisibility
string

Return a string with the object's orbit visibility setting. The string will be one of:
 * "normal": Visibility is based on the orbit flags settings (see celestia:setorbitflags method).
 * "always": Visible whenever any orbits are turned on (see celestia:setrenderflags method).
 * "never": The object's orbit is never shown, regardless the settings of the celestia:setrenderflags and celestia:setorbitflags methods.

Notes:
 * 1) The object:setorbitvisibility method can be used to set the orbit visibility policy for this object.
 * 2) Orbits are only shown when Celestia's orbits renderflag option is turned on, using the celestia:setrenderflags method. The actual setting of the orbits renderflag option does NOT influence the result of this object:orbitvisibility method.

Example:

obj = celestia:find("Sol/Earth") obj_orbitvisible = obj:orbitvisibility celestia:print("The orbit visibility of " .. obj:name .. " is: " .. obj_orbitvisible, 5.0, -1, -1, 2, 4) wait(5.0)

Return to the object method index.

setorbitvisibility

Set the orbit visibility policy for this object.

Notes:
 * 1) The object:orbitvisibility method can be used to obtain the current orbit visibility policy for this object.
 * 2) Orbits are only shown when Celestia's orbits renderflag option is turned on, using the celestia:setrenderflags method.

Example:

-- Find and select our Sun and goto position to have a good overview on our Solar System sol = celestia:find("Sol") celestia:select(sol) obs = celestia:getobserver obs:gotolonglat(sol, 0, math.rad(70), 8e8, 1.0) wait(1.0) -- Render planets and show planet labels celestia:setrenderflags{ planets = true, smoothlines = true } celestia:setlabelflags{ planets = true } celestia:setminorbitsize(3) earth = celestia:find("Sol/Earth") -- Never render Earth's orbit earth:setorbitvisibility("never") celestia:setrenderflags{ orbits = true } celestia:setorbitflags{ Planet = true } celestia:print("Orbit of Earth is never rendered", 7.5, -1, -1, 2, 4) wait(7.5) -- Always render Earth's orbit earth:setorbitvisibility("always") celestia:setorbitflags{ Planet = false } celestia:print("Orbit of Earth is always rendered, ALTHOUGH planet orbits are NOT rendered.", 7.5, -1, -1, 2, 4) wait(7.5) -- Do not render orbits, also not Earth's orbit. celestia:setrenderflags{ orbits = false } celestia:print("No orbits are rendered at all.", 7.5, -1, -1, 2, 4) wait(7.5) -- Normal render Earth's orbit earth:setorbitvisibility("normal") celestia:setrenderflags{ orbits = true } celestia:setorbitflags{ Planet = false } celestia:print("Orbit of Earth is not rendered, BECAUSE planet orbits are NOT rendered.", 7.5, -1, -1, 2, 4) wait(7.5) celestia:setorbitflags{ Planet = true } celestia:print("Orbit of Earth is normally rendered, BECAUSE planet orbits are rendered.", 7.5, -1, -1, 2, 4) wait(7.5) -- Reset rendering of orbits and labeling of planets celestia:setrenderflags{ orbits = false } celestia:setlabelflags{ planets = false }

Return to the object method index.

addreferencemark

Display a variety of informational graphics for the object, similar to the online Reference Vectors options in the pop-up menu, when pointing with your mouse on a celestial object and pressing the right mouse button.

Notes:
 * 1) The refmark.type strings are NOT case sensitive: "Body Axes" is considered to be the same as "body axes".
 * 2) Be aware that not all referencemark types can be turned on/off online with your mouse. When such referencemark types are not removed from within the CELX script, the enduser stays looking at the referencemark. Without the knowledge of CELX scripting such endusers are not able to remove the referencemark other than restarting Celestia !!!

Example: Goto the Moon and show which region on the Moon is visible from Earth.

moon=celestia:find("Sol/Earth/Moon") earth=celestia:find("Sol/Earth") obs = celestia:getobserver obs:gotodistance(moon, 15000, 1.0) wait(1.0) -- refmarktable={} refmarktable.type = "visible region" refmarktable.size = 1000 refmarktable.color = "green" refmarktable.opacity = 1.0 refmarktable.tag = "Earthvisible" refmarktable.target = earth -- moon:addreferencemark(refmarktable) wait(10.0) moon:removereferencemark("Earthvisible")

Or shorter:

moon=celestia:find("Sol/Earth/Moon") earth=celestia:find("Sol/Earth") obs = celestia:getobserver obs:gotodistance(moon, 15000, 1.0) wait(1.0) -- note the curly braces moon:addreferencemark{type = "visible region", size = 1000, color = "green", opacity = 1.0, tag = "Earthvisible", target = earth} wait(10.0) moon:removereferencemark("Earthvisible")

Return to the object method index.

removereferencemark
or

Remove the informational graphics for the specified object, that are previously displayed using the object:addreferencemark method.

Notes:
 * 1) Multiple reference marks can be removed at once by giving multiple string arguments to this method.

Example: Show Moon visible region from Earth and Earth direction during about 1 month simulation time.

moon=celestia:find("Sol/Earth/Moon") earth=celestia:find("Sol/Earth") obs = celestia:getobserver obs:gotolonglat(moon, 0, math.rad(90), 12000, 1.0) wait(1.0) -- Show visible region from Earth refmarktable1={} refmarktable1.type = "visible region" refmarktable1.color = "green" refmarktable1.opacity = 1.0 refmarktable1.tag = "Earthvisible" refmarktable1.target = earth moon:addreferencemark(refmarktable1) -- Shof direction to Earth refmarktable2={} refmarktable2.type="body to body direction" refmarktable2.size = 1200 refmarktable2.color = "green" refmarktable2.opacity = 1.0 refmarktable2.tag = "Earthdirection" refmarktable2.target=earth moon:addreferencemark(refmarktable2) -- Accelerate time to simulate a month celestia:settimescale(180000) celestia:print( "During a Moon orbit the portion of the\n" ..                 "illuminated Hemisphere that is visible to Earth\n" ..                  "vary from 100% (Full Moon) to 0% (New Moon).", 10.0, -1, -1, 2, 6) wait(14.0) -- Remove the reference marks moon:removereferencemark(refmarktable1.tag, refmarktable2.tag) -- Reset timescale celestia:settimescale(1)

Return to the object method index.

catalognumber
number

Return the catalog number for a star in the specified catalog, as a number.

Notes:
 * 1) If the object is NOT a star, or the catalog string is NOT valid, or the star is NOT present in the catalog, nil will be returned.

Example: Print the HIP, HD and SAO catalog numbers of Polaris.

npstar = celestia:find("Polaris") celestia:getobserver:center(npstar) celestia:select(npstar) nHD = npstar:catalognumber("HD") nSAO = npstar:catalognumber("SAO") nHIP = npstar:catalognumber("HIP") celestia:print("Our current North Polestar " .. npstar:name ..                " has the following catalog numbers:\n" ..                "HIP " .. nHIP .. "\n" ..                "HD " .. nHD .. "\n" ..                "SAO " .. nSAO, 10.0, -1, -1, 2, 7) wait(10.0)

Return to the object method index.

locations
iterator

Return an iterator over all the locations associated with the object.

The object methods can be used on this itarator.

An iterator is an object that may be thought of as a type of pointer which has two primary operations: There must also be a way to create an iterator so it points to some first element as well as some way to determine when the iterator has exhausted all of the elements in an object collection.
 * 1) referencing one particular element in an object collection (called element access),
 * 2) modifying itself so it points to the next element (called element traversal).

Notes:
 * 1) Only Solar System bodies have locations. For all other object types, this method will return an empty iterator.

Example: Print all location names of the current selection to the Celestia log file. You can turn the display of the log layer on and off using the tilde [~] key on the keyboard. Up to ten lines are displayed on the screen, and you can scroll back and forward using the up/down arrow and page up/down keys. Mind that the size of the log is limited by the celestia.cfg file.

for loc in celestia:getselection:locations do   celestia:log(loc:name) end

Return to the object method index.

bodyfixedframe
frame

Return the body-fixed frame for this object as a "frame" object.

Notes:
 * 1) A CELX reference "frame" is an origin and set of axes which define the coordinate system used for a body's trajectory and orientation. The origin is some other body defined in a catalog file. There are a number of ways to set the coordinate system axes.
 * 2) The frame methods can be used on a CELX "frame" object. This section also gives more information about using reference frames. "Frame" objects can also be used in other methods, requiring a "frame" object as an argument.

Example: Get the body-fixed frame of the Earth

earth = celestia:find("Sol/Earth") e_bff = earth:bodyfixedframe

Return to the object method index.

equatorialframe
frame

Return the equatorial frame for this object as a "frame" object.

Notes:
 * 1) A CELX reference "frame" is an origin and set of axes which define the coordinate system used for a body's trajectory and orientation. The origin is some other body defined in a catalog file. There are a number of ways to set the coordinate system axes.
 * 2) The frame methods can be used on a CELX "frame" object. This section also gives more information about using reference frames. "Frame" objects can also be used in other methods, requiring a "frame" object as an argument.

Example: Get the equatorial frame of the Earth

earth = celestia:find("Sol/Earth") e_eqf = earth:equatorialframe

Return to the object method index.

orbitframe
frame

Return the frame in which the orbit for an object is defined at a particular time as a "frame" object.

Notes:
 * 1) A CELX reference "frame" is an origin and set of axes which define the coordinate system used for a body's trajectory and orientation. The origin is some other body defined in a catalog file. There are a number of ways to set the coordinate system axes.
 * 2) The positions of stars and deep sky objects are always defined in the universal frame.
 * 3) The frame methods can be used on a CELX "frame" object. This section also gives more information about using reference frames. "Frame" objects can also be used in other methods, requiring a "frame" object as an argument.

Example: Get the orbit frame of the Earth

earth = celestia:find("Sol/Earth") e_orbf = earth:orbitframe

Return to the object method index.

bodyframe
frame

Return the frame in which the orientation for an object is defined at a particular time as a "frame" object.

Notes:
 * 1) A CELX reference "frame" is an origin and set of axes which define the coordinate system used for a body's trajectory and orientation. The origin is some other body defined in a catalog file. There are a number of ways to set the coordinate system axes.
 * 2) The positions of stars and deep sky objects are always defined in the universal frame.
 * 3) The frame methods can be used on a CELX "frame" object. This section also gives more information about using reference frames. "Frame" objects can also be used in other methods, requiring a "frame" object as an argument.

Example: Get the current body frame for the International Space Station.

iss = celestia:find("Sol/Earth/ISS") issf = iss:bodyframe

Return to the object method index.

getphase
phase

Get the active timeline phase for this object at the specified time, as a "phase" object.

Notes:
 * 1) This method returns nil if the object is not a solar system body, or if the time lies outside the range covered by the object's timeline.
 * 2) The TDB time scale is a bit different from the more familiar UTC. By using TDB, Celestia places objects much more accurately. As of January 1, 2008, the difference between the two is about 65 seconds. For more information, see Celestia/Time_Scales.
 * 3) To convert between UTC and TDB times, you can use the  celestia:utctotdb and  celestia:tdbtoutc methods.
 * 4) To convert between normal calender dates and julian days, you can use the celestia:tojulianday and celestia:fromjulianday methods.
 * 5) The phase methods can be used on a "phase" object.

Example: Get the timeline phase for Cassini at midnight January 1, 2000 UTC

cassini = celestia:find("Sol/Cassini") tdb = celestia:utctotdb(2000, 1, 1) phase = cassini:getphase(tdb)

Return to the object method index.

phases
iterator

Return an iterator over all the phases in an object's timeline.

An iterator is an object that may be thought of as a type of pointer which has two primary operations: There must also be a way to create an iterator so it points to some first element as well as some way to determine when the iterator has exhausted all of the elements in an object collection.
 * 1) referencing one particular element in an object collection (called element access),
 * 2) modifying itself so it points to the next element (called element traversal).

Notes:
 * 1) Only solar system bodies have a timeline; for all other object types, this method will return an empty iterator.
 * 2) The phases in a timeline are always sorted from earliest to latest, and always cover a continuous span of time.
 * 3) The phase methods can be used on this itarator.

Example: Copy all of the current selected object phases into the array timeline.

timeline = { } count = 0 for phase in celestia:getselection:phases do   count = count + 1 timeline[count] = phase end

Return to the object method index.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Template:Celx:v160

1.6.0 /Templates

title: Template:Celx:v160


text:
C++ Programming/Code/Standard C Library/Functions/fclose

fclose
The function fclose closes the given file stream, deallocating any buffers associated with that stream. fclose returns 0 upon success, and EOF otherwise.

 * Related topics: fflush - fopen - freopen - setbuf


text:
C++ Programming/Code/Standard C Library/Functions/fflush

fflush
If the given file stream is an output stream, then fflush causes the output buffer to be written to the file. If the given stream is of the input type, the behavior of fflush depends on the library being used (for example, some libraries ignore the operation, others report an error, and others clear pending input).

fflush is useful when either debugging (for example, if a program segfaults before the buffer is sent to the screen), or it can be used to ensure a partial display of output before a long processing period.

By default, most implementations have stdout transmit the buffer at the end of each line, while stderr is flushed whenever there is output. This behavior changes if there is a redirection or pipe, where calling fflush(stdout) can help maintain the flow of output.

 * Related topics: fclose - fopen - fread - fwrite - getc - putc


text:
C++ Programming/Code/Standard C Library/Functions/putc

putc
The putc function writes the character ch to stream. The return value is the character written, or EOF if there is an error. For example:

Generates a copy of the file tmp.c called tmpCopy.c.

 * Related topics: feof - fflush - fgetc - fputc - getc - getchar - putchar - puts


text:
Flute/Playing the B♭, E♭ and A♭ Major scales

Flute/Playing the B♭, E♭ and A♭ Major scales
E♭ Major Scale

E♭ Major Scale has three flats E♭,A♭ and B♭ Click to listen to a midi file of E♭ Major Scale


text: User talk:204.29.111.62

title: User talk:204.29.111.62


text:
User talk:Nahraana

Welcome!
Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally.-- – Mike.lifeguard  | talk 23:09, 15 February 2008 (UTC)

title: User talk:Nahraana


text:
User:Webaware/monobook.css

body, div, p, td, li, dd, dt { font-family: "Bitstream Vera Sans", Arial, Helvetica, sans-serif; }

title: User:Webaware/monobook.css


text:
Talk:Using Wikibooks/Finding A Wikibook

excuser moi de vous deranger cest juste pour vous demander comment on li un livre (amos daragon de bryan perro)

title: Talk:Using Wikibooks/Finding A Wikibook


text:
User:Mamadoo~enwikibooks

mohamed adel egypt muslim male physiotherapist 21 y anterested in reading

title: User:Mamadoo~enwikibooks


text: User talk:59.88.64.244

title: User talk:59.88.64.244


text: User talk:70.158.51.100

title: User talk:70.158.51.100


text:
C++ Programming/Code/Standard C Library/Functions/gets

gets
The gets function reads characters from stdin and loads them into str, until a newline or EOF is reached. The newline character is translated into a null termination. The return value of gets is the read-in string, or NULL if there is an error.

 * Related topics: fgetc - fgets - fputs - puts


text:
C++ Programming/Code/Standard C Library/Functions/fgets

fgets
The function  reads up to   - 1 characters from the given file stream and dumps them into. The string that  produces is always null-terminated. will stop when it reaches the end of a line, in which case  will contain that newline character. Otherwise,  will stop when it reaches   - 1 characters or encounters the   character. returns  on success, and   on an error.

 * Related topics: fputs - fscanf - gets - scanf


text:
C++ Programming/Code/Standard C Library/Functions/fgetpos

fgetpos
The fgetpos function stores the file position indicator of the given file stream in the given position variable. The position variable is of type fpos_t (which is defined in cstdio) and is an object that can hold every possible position in a FILE. fgetpos returns zero upon success, and a non-zero value upon failure.

 * Related topics: fseek - fsetpos - ftell


text:
C++ Programming/Code/Standard C Library/Functions/setbuf

setbuf
The setbuf function sets stream to use buffer, or, if buffer is NULL, turns off buffering. This function expects that the buffer be BUFSIZ characters long - since this function does not support specifying the size of the buffer, buffers larger than BUFSIZ will be partly unused.

 * Related topics: fclose - fopen - setvbuf


text:
Russian/False Friends

False Friends

False Friends is a linguistics term given to words or letters that have similar appearance, but are pronounced differently. There are 9 such false friends between Russian and English: В, Ё, Н, Р, C', У and Х.

Russian name: вэ, Romanization: ve (veh) Audio:

This letter looks like a large and small uppercase English B, but represents the same sound as English V. This letter is often devoiced at the end of words or before voiceless consonants, meaning that it's pronounced like an F instead.

Example: Вы (VY) is pronounced VYH. It means "you (plural)". Автор (AFtor) is pronounced AFF-tor, meaning "author".

ё, yo

This letter represents the sound Yoh, like the greeting Yo without the w-glide at the end. It is always stressed in Russian words. Keep in mind that Russians often write this letter as Е in informal text.

Example: Ёлка (YOLka), pronounced YOLL-kah, means "Christmas tree".

ен, en

Though it looks like an uppercase English H, it represents the same sound as the English letter N.

Example: Нос (NOS), is Russian for "nose".

эр, er

Don't mistake this for the English letter P. This letter is usually transliterated with R, but it's not pronounced like the English R. Instead, it's trilled as in Spanish.

Example: Рок (ROK) is the genre "rock" in Russian.

эс, es

The English letter C has various pronunciations, but the Russian letter С is always like the English S.

Example: Суп (SUP), means "soup".

у, u

This letter is transliterated with U and represents the oo sound in English tool. Stressed У is only a bit longer than the unstressed counterpart; the pronunciation is the same otherwise.

Example: Утро (UTRO),pronounced Utra meaning is "morning".

ха, kha or ha

This sound doesn't really exist in English (apart from in loanwords like "loch" and "taoiseach" from Gaelic or names like "Bach" from German or "Don Quixote" from Spanish) and is usually transliterated using two letters: Kh ("Ch" is ambiguous as it could also represent "ч"). It's pronounced as a voiceless velar fricative, meaning that you should put your tongue in position to pronounce a K, but instead make a breathy, voiceless H-sound with the tongue in the same position.

Example: Хвост (KHVOST) means "tail".

title: Russian/False Friends


text:
Eac3to/Introduction

There is no doubt that eac3to has developed substantially since its introduction in May 2007. The first 5 months of development of eac3to were spent testing filters, available programs (both freeware and commercial), with the ultimate goal being the determination of the tools and development of methods of decoding and encoding to obtain the best “quality” audio extracted from HD DVD and BluRay audio sources.

In this development and testing period, I was very thankful to have the assistance of xkodi and A.Crowley for their technical knowledge and assistance with the testing required to determine the best decoders/encoders to use with eac3to and the limitations with respect to each. The contribution of their time, advice and knowledge in performing testing was invaluable to the development of eac3to. The main issues were as follows: i)TrueHD decoding issues: Problems with Sonic’s audio decoder crashing necessitating a switch to Nero, as well as determining that we could only use Nero 7 as the DirectShow filters in Nero 8 would not work with eac3to as well as the need to purchase the HD-DVD/Blu-Ray plugin for TrueHD decoding with Nero; ii)Determining best decoder to use for MLP, AC3 BluRay audio iii)Testing Sonic Versions 4.2 and 4.3 as to “discontinuities” errors in Sonic v. 4.2 in comparison to Sonic v. 4.3, testing with Audacity indicates the application of DRC by Sonic decoders on EAC audio files leading to conclusion that only the Nero decoder should be used to decode EAC3 iv)Identifying common problems with respect to each decoder i.e. Dynamic Range Control which according to Nero is required to fulfil the license with Dolby Digital, Dialog Normalization issues etc. v) Determination of problems with Surcode for DTS  decoding which would work for some people and not for others and failed to work automatically in eac3to vi)Attempting to deal with audio sync and delay issues

By September 29, 2007, the 18th version of eac3to v1.18 was made available and I was pleased to announce as “Big News” that:

“The TrueHD decoding is now perfect for all HD DVD and Blu-Ray 5.1 TrueHD tracks when using the latest eac3to version and Nero 7 !!” As well, full DTS-HD decoding support was now available for users of eac3to by using the Sonic Audio Decoder.”

At this point in time it was also determined that "DTS-HD Master Audio" decoding should work bit perfectly so re-encoding to FLAC was determined to make a lot of sense and "DTS-HD High Resolution" decoding worked mostly fine so re-encoding to FLAC also made sense even if it would greatly increase file size. As most DTS-HD from HD DVD and all DTS-HD from BluRay are lossless it made sense to convert them to FLAC as well.

For TrueHD decoding eac3to was programmed to check, after decoding, whether the decoded data contained only 16 bits of information or more than that. If there was only 16 bits of information in the raw 24 bit file, then eac3to strips the zero bytes and reduces the raw file to 16 bit. This was not really necessary, as it was determined that the space saving when encoding in FLAC was only about 0.1 percent. However, I just found it cleaner to have 16bit TrueHD tracks encoded in 16bit FLAC instead of 24bit FLAC.

On October 3, 2007, eac3to v1.22 was released. In addition to improvements to Os speaker settings and detection of 5.1 channel output when 6.1 expected, eac3to now always uses the Sonic Audio Decoder by default for DTS decoding. As well, it was determined that eac3to doesn't work with Nero 8 requiring Nero 7 if you want to do TrueHD and E-AC3 decoding with eac3to.

On November 17, 2007 eac3to v2.0 was released.

This was a total re-write of eac3to with many enhancements and bug fixes as follows:
 * AC3 decoding support (Nero's decoder without DRC/dialnorm)
 * resampling to 44.1/48/96 kHz (by using "r8brain")
 * apply/reverse PAL speedup (by using "r8brain")
 * "eac3to sourceFile" will print out source file details

Strongly enhanced features
 * dramatically improved performance (no intermediate files, anymore!)
 * proper 6.1/7.1 downmixing to 5.1 instead of just dropping the back surround channels
 * RAW/PCM file detection now auto detects channels, bitdepth and endian
 * WAV is now fully supported as source file format
 * destination file extension "PCM" creates Blu-Ray style LPCM tracks

DTS related improvements/changes
 * DTS-96/24 support added
 * "open bitrate" support added
 * strange channel configuration support added
 * removal of zero padding from DTS files added
 * eac3to can fix broken DTS-ES files (they decode to 5.1 instead of 6.1 without the fix)
 * dialog normalization can be removed without removing the additional DTS-HD data now
 * core extraction must be specifically asked for now (see "-core" switch)

AC3 related improvements
 * did I mention that eac3to can decode AC3 now?
 * strange channel configuration support added

TrueHD related improvements
 * delay problem (hopefully) solved
 * fixed: sometimes some audio data in the middle of a track was lost
 * TrueHD/AC3 interweaved file can be stripped to TrueHD only now

Various minor improvements/changes On November 24, 2007, eac3to v2.05 was released This is considered to be a very important release as after much testing I was able to report that “the libav TrueHD decoder seems to work well. In my quick tests it gave out bit perfect results compared to Nero's decoder.” However, with a 24bit TrueHD sample the libav decoder complained about a failing "lossless check". Still the data was bit perfect. But the complaint shows that it might still make sense to keep using the Nero TrueHD decoder for a while - at least for comparison purposes.
 * progress bar added
 * eac3to detects file format independently of file extension
 * multiple input files can be treated as one big file
 * "sox" is not needed, anymore
 * "dump" filter not needed, anymore
 * "aften.exe" replaced by "libAften.dll"
 * "flac.exe" replaced by "libFlac.dll"
 * DTS/DD+/AC3 source filter ships with eac3to now
 * added support for libav/ffmpeg decoding of TrueHD/MLP and E-AC3
 * added "-libav" switch to force libav decoding

“However, we might have a chance to get 7.1 TrueHD decoding now with the libav decoder. Does anybody have a sample of a 7.1 TrueHD track?”

The libav E-AC3 decoder is not usable yet imho. It sometimes gives out distorted sound for me. I've still enabled it so that you can play with it, if you like. Another problem of the libav E-AC3 decoder is that it always forcefully shortens the data to 16 bit. Besides, I've searched and didn't find a single HD DVD or Blu-Ray disc with a 7.1 TrueHD. It seems such a disc doesn't exist yet. I also didn't find any disc with a 7.1 E-AC3 track.

On November 26, 2007, eac3to v2.06 was released

 * doing FLAC -> FLAC now copies metadata from source to destination file
 * MLP files are correctly decoded now (by both Nero and libav/ffmpeg)
 * runtime for padded DTS files is shown correctly now

All of the above releases were very important leading up to the end of 2007 and the next significant event in the development of eac3to-the addition of “Full EVO demuxing /remuxing support” with the release of eac3to v2.09 on December 19, 2007.

Highlights of eac3to v.2.09 were as follows:

In conclusion, there is no doubt that eac3to has come a long way since its first availability in May 2007 and with the help and support of the Doom9 community and others, all of which is greatly appreciated, eac3to will continue to develop with enhancements to encode/decode etc. the “best quality audio” from available sources. Lastly, there are several people in particular that deserve mention and thanks as they have greatly assisted in answering forum questions, i.e. nautilus7, drmpeg??, others i.e. The_Keymaker which respect to the eac3toGUI, ……? which permits me to deal with programming, bug fixes and further enhancements to eac3to.
 * EVO demuxing added with proper delays for all audio tracks
 * EVO file joining/rebuilding added
 * automated EVO video remuxing (Matroska) added
 * automated rewriting of Matroska timestamps to 24p via mkvtoolnix added
 * multiple operations on the source file can now be run at the same time
 * switch "-test" tests all external DirectShow filters and tools
 * latest ffmpeg/libav TrueHD and E-AC3 decoder patches included
 * latest libAften build included
 * libav TrueHD decoder is now the default decoder for TrueHD/MLP
 * support for libav DTS decoding added
 * fixed a whole lot of bugs (and might have added a few new ones)

madshi

title: Eac3to/Introduction


text:
Spanish/Tenses/Indicative

The Indicative Mood
Simple Perfect Continuous Perfect continuous
 * Present
 * Preterite
 * Imperfect
 * Future
 * Conditional
 * Present
 * Preterite
 * Imperfect
 * Future
 * Conditional
 * Present
 * Preterite
 * Imperfect
 * Future
 * Conditional
 * Present
 * Preterite
 * Imperfect
 * Future
 * Conditional

title: Spanish/Tenses/Indicative


text:
Spanish/Tenses/Indicative/Simple/Preterite

Some things to note:
 * 1) Most significantly, the -ER and -IR verbs have exactly the same endings. This makes learning the preterite simpler.
 * 2) The nosotros forms of the -AR and -IR verbs appear exactly the same as they do in the present. You must figure out their meaning based on context.
 * 3) Accent marks are essential. Hablo and Habló are completely different; an accent mark makes the difference between "I speak" and "he spoke."


text:
Talk:Galileo's Science

Contribution Welcome
All Wikibookians interested in Physics, History of Physics, Philosophy or Galileo are welcome to contribute to Galileo's Science.Contributors are expected to feature specially on: Farhan Nasim (talk) 05:19, 16 February 2008 (UTC)
 * Outline of Aristotlean Philosophy
 * Galileo's treatment of free-falling bodies and uniform accelaration
 * Galileo's observation of Moon, Satellites of Jupiter, Phases of Venus
 * Galileo's idea of continuance of motion in a straight line and relativity of motion

title: Talk:Galileo's Science


text:
Spanish/Tenses/Indicative/Simple/Imperfect

Some things to note:
 * 1) The -ER and -IR verbs take exactly the same endings, just as they did in the preterite.
 * 2) There are only three irregular verbs (ser, ver, and ir) in this tense, making it by far the easiest tense to learn.
 * 3) The only difficulty with this tense arises because the yo and él forms are conjugated exactly the same (-aba and -ía). Although Spanish is a pro-drop language (meaning subject pronouns are usually excluded), it is often a good idea to include subject pronouns in these cases for clarity.


text:
Spanish/Tenses/Indicative/Simple/Future

Some things to note:
 * 1) Endings in the future tense are attached to the infinitive, not just the stem, of the verb.
 * -AR, -ER, and -IR verbs all take the same endings.

title: Spanish/Tenses/Indicative/Simple/Future


text:
Spanish/Tenses/Indicative/Simple/Conditional

Some things to note:
 * 1) Endings in the future tense are attached to the infinitive, not just the stem, of the verb.
 * -AR, -ER, and -IR verbs all take the same endings.
 * 1) If these endings look familiar, it is because they are the same as the -ER/-IR endings of the imperfect tense. And thus, as with the imperfect, the yo and él forms are the same and may use subject pronouns for clarity.


text:
User talk:Messtryganesh

-Ravichandar84 (talk) 06:32, 16 February 2008 (UTC)

title: User talk:Messtryganesh


text:
Talk:Investing/Tax advantaged investing

well, my ongoing pitch to see better explained potential pitfalls with tax-deferred investing. The easy way to get the thrust is to take the tax return of someone with children and mortgage interest, and re-run the return eliminating the child dependents and mortgage int (simulating home being paid off for retirement). Essentially I think MANY investors will be surprised that their tax bracket/liability will not go down in retirement, very possibly go up. Thus, post-tax investing becomes very attractive (eg Roth IRA), max these out before other pre-tax options.--Billymac00 (talk) 06:43, 16 February 2008 (UTC)

title: Talk:Investing/Tax advantaged investing


text:
Advanced Interactive Media/Hands-On Design Team

The Design Team is a vital part of a production and is in charge of creating designs to express a concept. The team provides a variety of color palettes, fonts, designs, and ways to complete a solid idea. The team creates innovative designs to help express the main idea given by the director and/or team. The Design Team works side by side with other teams to deliver an excellent project/production.


text:
Template:Cite conference/doc

This template is used to cite conference paper sources in Wikibooks books.

Usage
None of the parameters should be capitalized, in order to avoid the article being tagged as having a broken citation. For example, use "url", "title", etc. - not "URL", "Title", etc. When copying all parameters in either the vertical or horizontal layouts, delete those which are not needed.

Citations within a page should use consistent formats. However, there is no consensus about which format is best.

 * Common form with author(s) in a single parameter:

 * Common form with first and last:

 * All parameters, horizontal layout:

 * All parameters, vertical layout:

Required parameters

 * title: Title of article. This title will appear as the citation itself, hyperlinked to the URL (if any)

Optional parameters

 * url: URL of the online article or proceedings.
 * format: Format of the page cited, e.g., PDF. Don't specify this for HTML, which is implied as the default.
 * author: Primary author
 * last works with first to produce
 * authorlink works either with author or with last & first to link to the appropriate Wikipedia article. Does not work with URLs.
 * coauthors: allows additional authors
 * a date parameter:
 * either date: Full date of publication. Should not be wikilinked.
 * or year: Year of publication, and month: Name of the month of publication. If you also have the day, use date instead. Should not be wikilinked.
 * conference: Title of the conference.
 * conferenceurl: Website for the conference.
 * booktitle: Title of the collected proceedings, e.g., "Proceedings of the conference organizer"
 * editor: No text is added, so labels such as "(ed.)" have to be supplied by user.
 * others: Other contributors such as "illustrated by Smith" or "trans. Smith".
 * volume: If the proceedings are part of a series.
 * edition: Edition when the proceedings has more than one edition. eg: "2nd edition".
 * publisher: Publisher. Designations such is "Ltd" or "Inc" should not be included.
 * location: Location of the publisher (not the location of the conference). Produces location: publisher (ignored if the publisher field is not used).
 * a page parameter:
 * either page: Page number if a multi-page article and referencing a single page. "page=5" produces p. 5.
 * or pages: Page numbers if a multi-page article and referencing more than one page. "pages=5–7" produces pp. 5–7. This is for listing the pages relevant to the citation, not a total number of pages.
 * or at: When the page prefix is unwanted. "at=Table 5" produces Table 5.
 * language: language of publication (don't specify "English" as this is the default).
 * trans_title: A translated title of the article, in case the original title is in a foreign language. Would normally be used in conjunction with the 'language' parameter.
 * doi: A digital object identifier for the document, such as  10.1038/news070508-7
 * Doilabel: If the doi contains some characters that must be escaped, use "doilabel" for the unescaped version.
 * oclc: Online Computer Library Center ID number, such as 3185581
 * id: Other identifier such as   or
 * archive parameters (if used, must be used both of them together)
 * archiveurl: The URL of an archived copy of the page, if (or in case) the url becomes unavailable. Typically used to refer to services like WebCite and Archive.org.
 * archivedate: Date when the item was archived. Should not be wikilinked.
 * accessdate: Full date when item was accessed. Should not be wikilinked.
 * quote: Relevant quote from online item.
 * ref: ID for anchor. By default, no anchor is generated. The ordinary nonempty value ID generates an anchor with the given ; such a linkable reference can be made the target of wikilinks to full references, especially useful in short citations like shortened notes and parenthetical referencing. The special value harv generates an anchor suitable for the harv template; see anchors for Harvard referencing templates.
 * separator / postscript: The punctuation to use between fields / at the end of the citation

title: Template:Cite conference/doc


text: User talk:78.39.192.35

title: User talk:78.39.192.35


text:
Czech/Alphabet and Pronunciation

Czech alphabet consists of 42 normal Latin letters, some have an accent:
 * All vowels can be either short (aeiouy), or long with acute (čárka) (áéíóúůý). (This can denote a different word.)
 * The only difference between Ú and Ů is that Ú is used only at the beginning of a word (or a part of a word like: triangle = trojúhelník), while Ů cannot be used at the beginning of a word.
 * There are also "softened" versions of the letters D E N R S T Z, with a hook (háček): ˇ
 * The accents lengthen the vowels, but they do not imply stress. Stress is almost always on the first syllable. The same rules also apply in Slovak.

A Á B C Č D Ď E É Ě F G H Ch I Í J K L M N Ň O Ó P Q R Ř S Š T Ť U Ú Ů V W X Y Ý Z Ž Note: Except for foreign words, the letters Q, W and X are almost never used, and the first two are often replaced with Kv and V. F, G and Ó also mostly occur in words of foreign origin, but are nowhere near as rare as Q, W, or X.

Most of the letters are pronounced similarly to in German. Note:
 * Ch is pronounced as "kh" and considered as one letter
 * C like in the 'zz' in pizza or German 'z' as in 'Zimmer'
 * Ď like /ɟ/ (D, but with your tongue touching the entire roof of your mouth) or Polish 'gi'
 * E and G like in "beggar"
 * H like in "head"
 * J like the 'y' in "yeah"
 * Ň like in "menu" or the Spanish 'señor'
 * R somewhat harder than in English, a bit like in Spanish "arriba" initially and rolled in the middle of a word.
 * Ť like /c/ (T, but with your tongue touching the entire roof of your mouth) or Polish 'ki'

The pronunciation rarely changes depending on the position, except for: Note: This is the only reason why Ě is used. The letter itself is pronounced as E. Not quite true, consider following example: "válka měla mnoho obětí" and "těšila se domů na jeho objetí..." etc.
 * 1) D, N, T are pronounced as Ď, Ň, Ť before I, Í, or Ě
 * 1) Czech has word-final devoicing of consonants. This means that in speech, voiced consonants are pronounced as their voiceless counterparts: D → T, Ď → Ť, H → Ch, G → K, V → F, B → P, Z → S, Ž → Š.

Other notes: Now you know almost everything. You can go to the Czech pronunciation page and hear it.
 * 1) Y and Ý are mostly used to avoid palatalizing the preceding consonant where I or Í would palatize the preceding consonant: dy is pronounced /dɪ/

title: Czech/Alphabet and Pronunciation


text:
User:GW Simulations

User:GW_Simulations Please see my Wikipedia userpage.

title: User:GW Simulations


text:
User talk:GW Simulations

Please note, you are more likely to get a response sooner if you post your comments on my talk page at Wikipedia.

Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally. – Mike.lifeguard  | talk 03:51, 19 February 2008 (UTC)

title: User talk:GW Simulations


text:
User:Wesley Gray

 User talk page- Leave me a message.  Other User Pages

Wikipedia Wikibooks Wikiversity Wikimedia Commons Meta-Wiki

Interests
Hi, I'm Wes.

I love programming, reading, writing, learning, and audio drama. I really support the open source movement and am a proud Linux (Ubuntu) user. I hope to contribute to Wikibooks and allow other people to learn easily, and for free. I am interested in music, languages, simplified English, and Wikijunior. Questions can be directed at my talk page. I'm also becoming very active on Wikiversity, so you can reach me there too.

Cheers,

Wes

Contributions

 * Wikjunior Bugs~ Millipede and centipede. I plan to add more.
 * Saxophone~ Fingering chart. I plan to add more.
 * Calculus~ Minor edits.
 * FHSST Biology~Re-working book.
 * US History~ I am adding pictures to the book, and maybe adding some text as well.
 * Basic Computer Security~ Work on the browser and anti-virus articles.
 * World War II~ Some article contributions, picture contributions, and editing.

Planned Contributions (Not Yet Worked On)

 * Spanish
 * Ubuntu (Linux) Guide

title: User:Wesley Gray


text: User talk:89.241.169.154

title: User talk:89.241.169.154


text:
User talk:88.207.52.215

Join Us!
--Laleena (talk) 13:26, 16 February 2008 (UTC)

title: User talk:88.207.52.215


text:
Visual Basic/Branching

A branch is a point at which your program must make a choice. With these data structures, it is now possible to make programs that can have multiple outcomes. You may be familiar with the first type from Algebra, an If-Then statement, or If P then Q. And they work pretty much the same. Another type is the Select Case, this may prove to be easier at times.

Another name for this concept is conditional clauses. Conditional clauses are blocks of code that will only execute if a particular expression (the condition) is true.

If...Then Statement
If...Then statements are some of the most basic statements in all of programming. Every language has them, in some form or another. In Visual Basic, the syntax for an If...Then statement is as follows:

 * condition - a set of test(s) that the program executes.
 * reaction - the instructions that the program follows when the condition returns true. The condition returns true if it passes the test and returns false if it fails the test.

The condition can be anything from

to

If there is only one reaction to the condition, the statement can also be expressed without the End If:

There are also other parts to these statements to make them more complex. Two other terms that can be used are Else, and ElseIf.

Else will, if the condition is false, do whatever comes between the Else statement and the End If statement.

ElseIf will, if the condition directly proceeding it is false, check for another condition and go from there.

If..Then..Else Statement
The If..Then..Else statement is the simplest of the conditional statements. They are also called branches, as when the program arrives at an "If" statement during its execution, control will "branch" off into one of two or more "directions". An If-Else statement is generally in the following form:

If the original condition is met, then all the code within the first statement is executed. The optional Else section specifies an alternative statement that will be executed if the condition is false. The If-Else statement can be extended to the following form:

Only one statement in the entire block will be executed. This statement will be the first one with a condition which evaluates to be true. The concept of an If-Else-If structure is easier to understand with the aid of an example:

Optimizing hints
When this program executes, the computer will check all conditions in order until one of them matches its concept of truth. As soon as this occurs, the program will execute the statement immediately following the condition and continue on, without checking any other condition for truth. For this reason, when you are trying to optimize a program, it is a good idea to sort your If..Then..Else conditions in order of descending likelihood. This will ensure that in the most common scenarios, the computer has to do less work, as it will most likely only have to check one or two branches before it finds the statement which it should execute. However, when writing programs for the first time, try not to think about this too much lest you find yourself undertaking premature optimization.

In Visual Basic Classic conditional statements with more than one conditional do not use short-circuit evaluation. In order to mimic C/C++'s short-circuit evaluation, use ElseIf as described in the example above. In fact for complicated expressions explicit If..Then..ElseIf statements are clearer and easier to read than the equivalent short circuit expression.

Select Case
Often it is necessary to compare one specific variable against several constant expressions. For this kind of conditional expression the Select Case is used. The above example is such a case and could also be written like this:

Unconditionals
Unconditionals let you change the flow of your program without a condition. You should be careful when using unconditionals. Often they make programs difficult to understand. Read Isn't goto evil? below for more information.

Exit
End a function, subroutine or property and return to the calling procedure or function. Note that in Visual Basic returning from a function and assigning a return value requires two separate statements.

For procedures:

For functions:

For properties:

End
This simple command ends the execution of the program

For example:

In this example, when the button cmd1 is clicked, the program will terminate. The End command is provided for backward compatibility and is rarely (if ever) needed to end a VB program. The proper way to end a VB program is to release all object references, stop any running timers, and exit out of any executing procedures. In a small program this could mean to simply unload all the forms. When there are no active object references and no code running, VB will terminate the program in a graceful manner. Using End to end the program will terminate the program in an ungraceful manner (some things may not get shut down properly).

Goto
Transfer control to the statement after the label (or line number).

In Visual Basic the target of a Goto statement must be in the same procedure; this prevents abuse of the feature by making it impossible to jump into the middle of another subroutine.

Isn't Goto Evil?
One often hears that Goto is evil and one should avoid using goto. But it is often overlooked that any exit statement which is not the last statement inside a procedure or function is also an unconditional statement - a goto in disguise.

Therefore if you have functions and procedures with more than one exit statement you can just as well use goto. When it comes down to readability the following two samples are almost the same:

In the pure structured approach, neither goto nor multiple exit statements are needed:

A couple of notes:
 * Return is a reserved keyword and can only be used with a matching Gosub and that the Gosub must reside in the same function, sub or property. It cannot be used to return from a function, sub or property - maybe it should read Exit Sub.
 * Error handling in Visual Basic does need the use of Goto, but with a different syntax.
 * Visual Basic, believe it or not, supports line numbering, so for example Goto 20 is perfectly acceptable if line 20 exists!
 * Using Exit instead of Goto as shown above has some side effects. Calling Exit Sub clears a current error state, i.e. it is the equivalent of an Err.Clear.

Compatibility with VB.Net
If you are concerned that you might want to port your code to VB.Net without recasting it later you should probably avoid goto altogether.

One alternative is the pseudo loop. Its purpose is to fake a goto target that occurs later in the routine:

Of course this example can be recast using If..Then..Else..End If without the need for any Exit statements at all so it is a little artificial:

title: Visual Basic/Branching


text:
User talk:Sinanwolfgazo~enwikibooks

Welcome!
Come introduce yourself at the new users page. If you have any questions, you can ask there or contact me personally.-- – Mike.lifeguard  | talk 15:27, 16 February 2008 (UTC)

Your account will be renamed
Hello,

The developer team at Wikimedia is making some changes to how accounts work, as part of our on-going efforts to provide new and better tools for our users like cross-wiki notifications. These changes will mean you have the same account name everywhere. This will let us give you new features that will help you edit and discuss better, and allow more flexible user permissions for tools. One of the side-effects of this is that user accounts will now have to be unique across all 900 Wikimedia wikis. See the announcement for more information.

Unfortunately, your account clashes with another account also called Sinanwolfgazo. To make sure that both of you can use all Wikimedia projects in future, we have reserved the name Sinanwolfgazo~enwikibooks that only you will have. If you like it, you don't have to do anything. If you do not like it, you can pick out a different name.

Your account will still work as before, and you will be credited for all your edits made so far, but you will have to use the new account name when you log in.

Sorry for the inconvenience.

Yours, Keegan Peterzell Community Liaison, Wikimedia Foundation 23:42, 17 March 2015 (UTC)

Renamed
 This account has been renamed as part of single-user login finalisation. If you own this account you can |log in using your previous username and password for more information. If you do not like this account's new name, you can choose your own using this form after logging in: . -- Keegan (WMF) (talk) 05:29, 19 April 2015 (UTC)

title: User talk:Sinanwolfgazo~enwikibooks


text: Talk:Tennis

title: Talk:Tennis