text:
The American School/The Role of Media in Education

American public schools are largely a product of the quest for progress (Cassidy, 2004). Schools are constantly looking for ways to enrich their curriculum for students and provide educational tools for them that will help them with life further in time. Americans were not the first to invent schooling but were the first to believe that if the people are educated to a certain degree then they can rule themselves. The first sentence of this paper could also read that American technology is largely a product of the quest for progress, is this not true also? That is why education and technology or the media go hand in hand in the 21st century. The role of media and technology in education is quite obvious in today’s educational settings. Schools are loaded with computers and even here at Northern Michigan University students receive a laptop to help them with academic studies. This is part of NMU’s Laptop Initiative plan that believes providing every student with a laptop will help improve their academic performance. However media comes in many different forms, such as; internet, TV, radio, and books, all of these media have affected the way students learn. Around the world students are being globally connected with one another via internet (Rolls, 2007). These mass media tools have made the world a smaller place in a way, also called (globalization). The way media affects education are great and varied when you think about it. Back when Columbus sailed the ocean blue the world had the misconception that the earth was flat, and why did they have this theory? Because that is what was printed on every map that was distributed back then making media at fault. Media is such a massive part of our lives and it is everywhere we turn. How could it not affect our lives in terms of education? Before we can dive into all the benefits of media to education it is important that the educators of students and students themselves become what is called “media literate”. This is the ability to decipher the hidden messages in mass media. Teacher education needs media literacy as an essential tool and topic in the new millennium (Schwarz, 2001). Let’s face it, media has changed the world. Media such as internet, is constantly growing and changing, thus educators must stay with the times and keep up by using these tools for their students. With the help of new media power teachers would be more able to offer students information from around the world at an even faster and easier rate.

Why should teachers be media literate?
Media literacy merits a place in teacher education because it encourages critical thinking in a media-dominated age (Schwarz, 2001). This also engages students more and makes connections between life and school. It is not enough for students just to become media literate. Teachers must model media literacy for their students also. This goes way back to when you were just a baby. A baby learns at first by replicating what it sees others do. If a teacher demonstrates media literacy then so will the students. This can be seen if anybody has ever been taught the difference between legitimate and illegitimate websites. What information to trust online can be based almost by the dot com ending of the website address. Information with a dot gov ending is more reliable that a dot com. It is easy to place media literacy in established school curriculum such as social science, language, and communications; media affects all of these areas of study (Cassidy, 2004). Media literacy in social studies allows future teachers to "uncover hidden assumptions, to distinguish between relevant and irrelevant information, to recognize biases, to separate fact from opinion, and ultimately, to determine the strength of the mass medium's message (Schwarz, 2001). Already media has effected education in the sense that it has created a new subject area to study, a special way just to decipher the media messages that both student and teacher alike should learn.  Of all the new fields created by media evolution, Public Relations, or PR is the best example.  It is based solely on ones ability to create media for a mass audience with certain undertones of persuasiveness to it, like getting people to go to a concert.  PR people control media and bend it to their will so they can manipulate people.  As this paper progresses it will look at other ways the educational system has been shaped and molded by today’s ever growing mass media market. Understanding media literacy however is the first step before moving forward with explain the other parts of media in education.

Media's Influence on Children
Media's influence on children has steadily increased as new and more sophisticated types of media have been developed and made available to the American public. Beneficial effects include early readiness for learning, educational enrichment, opportunities to view or participate in discussions of social issues, exposure to the arts through music and performance, and entertainment. Harmful effects may result from sensationalization of violent behavior, exposure to subtle or explicit sexual content, promotion of unrealistic body images, presentation of poor health habits as desirable practices, and exposure to persuasive advertising targeting children (Influence on Children media, retrieved on Sept 23rd 07). As you can tell, media acts as that double-edged sword that can hurt as much as help whoever wields it. That is why it is so important to stress the education of media literacy starting at a young age. If that happens I believe that video games would be blamed less for violent actions because the child should know the difference between real world and fantasy. I have taken many media courses and even a media literacy course here at NMU but with the way media is changing the world today children need to learn before the college level about media literacy. A child who is media illiterate is more vulnerable to being influenced by messages in all kinds of media (Williams, retrieved on Sept 23rd 07). Specific domains of influence exist that could affect children, they are; violence and aggressive behavior, sexual content, body image and self-esteem, and finally physical health and school performance. Everyone has heard about violence being a problem in media today. Kids watch TV or movies and want to mimic their favorite stars; however they must learn to be able to separate reality from fantasy. This comes from a good solid education in media literacy. Girls more than boys have personal image problems from the constant pressure of media for them to waif thin and so called “pretty.” This in turn would lead to worse academic performance mainly because the student might be starving themselves and without proper nutrition they cannot learn properly in a school environment. Teachers should not bear the sole responsibility for educating kids about media literacy though; parental monitoring is a key factor, since the research studies show that increasing guidance from parents is at least as important as simply reducing media violence. Children may learn negative behavior patterns and values from many other experiences as well as TV programs, and parental guidance is needed to help children sort out these influences and develop the ability to make sound decisions on their own(Influence on Children Media, retrieved on Sept 23rd 07).

Media in Terms of Globalization
Could it be that economic and social changes brought about by globalization are forcing us to revolutionize our approach to education? This is a very tough question and the answer depends on who you talk to and what you read. In fact, with the widespread use of internet around the globe information is available at our fingertips quicker than ever these days. This in my opinion would have to alter all school curricula. Students are more aware of the world outside of their birthplace thanks to the internet. In “College Goes Global” William R. Brody speculates that there will be a rise to what he calls a “megaversity.” He defines this as a research and educational dynamo electronically linking the best faculty and most capable students in a worldwide academic community. The key word in the definition is “linking”; linking is what makes it all possible for students to utilize the internet for the benefit of gaining knowledge from a worldwide standpoint. Imagine a classroom with all current and the best technology in it. Projectors, computers, TVs, and anything else in it, this would be a true media laced learning center. Students would be able to connect to all parts of the world easily to obtain information they need to learn. The media center concept has received widespread support from educational organizations and from professionals who consider a sound media program a prerequisite to higher quality education (Poston, 1978).

Technology in Education
Computers and Internet connections are becoming widely available in schools and classrooms. In 1999, 99 percent of teachers in the United States had access to a computer in their schools, and 84 percent had one or more computers in their classrooms. These are staggering numbers and that was only eight years ago. Just imagine what the numbers would look like now. The availability of media is everywhere. One angle that you might not have thought of are the benefits of media to teachers. Teachers can use media to help find problems that fit real world situations for their students. A good example of this for construction students or math students, figuring out correct angles to build a bridge or build underground tunnels is a very real life job. Students could use real bridges numbers and statistical information in their problem solving helping them really learn what it took to build that bridge. But sometimes problems are not as easy as this, unlike problems that occur in the real world, technology can incorporate graphics, video, animation, and other tools to create problems that can be explored repeatedly. Multimedia representations are easier to understand than problems presented as text (Williams, retrieved Sept 23 07).

Internet and videoconferencing technology allow students to participate in projects sponsored by researchers around the world. In the Jason Project, satellite and Internet technology bring classroom students into direct real-time contact with leading scientists, conducting scientific research expeditions around the globe (Williams, retrieved sept 23 07). This sense of global community is one of the largest benefits to education from media development. Everyone sharing one common pool of knowledge where no one man is smarter than the next and all information is equally available to both.

Media’s Non-direct Effects on Education
Following a shooting near one Detroit public school and another inside a school, Mayor Kwame Kilpatrick and Detroit Public Schools CEO William Coleman have developed a short-term plan for stronger school security (Moore, 2005). Just this past year at Virgina Tech University a massive school shooting took place also. These shootings were started by disturbed students, but why? And why at school? Is it possible that the students were brainwashed by forms of media and had such poor training in media literacy that they could not socialize with other students and not tell the difference between real life and fantasy. On April 20, 1999, two seniors killed 12 students and one teacher at Columbine High School in Littleton, Colorado. This marked the first school shooting ever and America’s citizens were stunned. Not too long after the incident forms of media were being blamed for the horrible situation. Violent video games and music had the fingers pointed their ways but was it really media’s fault? I believe that it was a case of media fueling media, and Glenn Muschert agrees with me. Muschert, who studies mass media coverage of high profile crimes, with attention to how the media defines social problems, maintains the fear created from Columbine fuels a misperception of how violence affects the country's youth. While most believe violence leads to more violence, that doesn't track with reality. Statistics at the time of Columbine showed that one child in 2,000,000 will be fatally shot at school per year--the same odds as being struck by lightning (Muschert, 2003). This blame of media causing school violence also lead to a nationwide security crackdown of all schools and campuses. Police officers patrol halls of high schools with loaded guns, metal detectors are in place at the buildings front doors to deter anyone wanting to smuggle in a gun. Entire drill plans like a tornado or fire drill have been invented in case of a school shooting. The media blew Columbine out of proportion in a sense that is was over covered and saturated everyone’s TV screen for the next 2 weeks, it did place this element of fear in parents heads that their children are no longer safe even at school. All because the media decided to show how horrific the event at Columbine was and repeated it time after time after time. Community recovery was hampered by a common response among those with responsibility for Columbine, especially members of the school staff and journalists who continued to mine the story (Cote, Simpson, 2006).

Role of Media in Education Revisited
As the reader can see, media plays a large direct and non-direct role in education. Through the advent of new technology the world has been brought closer together in attempts to share knowledge and educate the masses. Media can help and hinder in an educational environment, but as long as its use is monitored by someone who is media literate there should be limited problems. As this paper has highlighted media is everywhere in today’s world. One cannot help but be exposed to it at all times. Logically, it would make sense that media would play a role in education around the globe. From violence to sharing global ideas in a virtual community it is because of media and the recent media explosion i.e. the internet lately that education can thank for helping push young minds forward at an accelerated learning pace. Although media literacy is a problem students seem to be finding their own ways in the world of technology and are making the best of it to really better their minds.

Questions

 * 1) How do television shows, movies, and video games teenagers watch interact with their education?
 * 2) What if a school is unable to afford computers or current technology?
 * 3) With students becoming more able minded with technology does that not make it easier for them to cheat?
 * 4) Are there any differences between public and private schools use of media?


text:
Erlang Programming/List Comments

Comments
The preferred style for comments in Erlang is to use:

%%% module-level comments %% function-level comments %  line-level comments

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

title: Erlang Programming/List Comments


text:
The American School/Complexity and Controversy Surrounding NCLB

In a bi-polar era of American history in which a sharply divided citizenry lends itself to an often heated debate concerning the role this nation should play in an increasingly globalized and connected world, the fact that any bi-partisan legislature can exist at all seems a small miracle. However the No Child Left Behind Act of 2001 (NCLB) represents exactly that, stimulating the ongoing debate about how best to socialize America’s youth while at the same time displaying the immense amount of passion involved in any discussion of a topic so important and fundamental to a democratic people’s security and well being. NCLB is about a thousand pages long and represents one of the single greatest efforts in our nations modern history to reform not only the viability of quality education to all who reside here, but the act also identifies who is accountable when the educational institutions of this country fail or do not perform satisfactorily (Popham, 2004). NCLB was passed in Congress with the support of both Republicans and Democrats. It was signed into law in 2001 with the signature of President Bush (Irons & Harris, 2007). The act is essentially a reauthorization of the 1965 Elementary and Secondary Education Act and concerns itself with virtually every facet of the education system in America. NCLB deals with issues ranging from standardized testing to closing the achievement gap between wealthier white students and poorer minorities (Popham, 2004, p. 14).

Standardized Testing and AYP
The issue of standardized testing is a major point of contention in the act. The main provisions of the law decree that every state in the union accepting federal funds must test students every year in grades 3-8, once again in high school in the subjects of reading and mathematics, with science testings introduced by 2008 (Wood, 2004). While few reject the notion of standardized testing outright, many think that excessive emphasis on such testing attempts to centralize American education past the point of practicality. This in turn ends up defining schools only by their test scores (Reese, 2005).

Additionally, schools are required to show gradual progress from one year to the next on such tests, an expectation phrased as Adequate Yearly Progress or AYP (Wood, 2004). AYP is a relatively controversial issue due to the fact that schools are expected to constantly raise their expectations of satisfactory learning. In short, if students do well on the tests they are met with harder tests. Any teacher will tell you harder does not necessarily mean better (Kohn, 2004).

Opponents also argue that such an emphasis on testing compromises the quality of teaching in our classrooms. It forces teachers to concern themselves with raising test scores and preparing their students for a test rather than adequately covering their subjects and giving their students a true understanding of the curricula they are taught (Kohn, 2004). “Teaching to the test,” as it is often called, represents a dangerous corruption of education. In the words of Alfie Kohn, “…it is the equivalent of shooting an arrow into a wall and then drawing a target around it…” (Kohn, 2004, p. 82).

Special Education and Standardized Testing
Another common complaint lodged against standardized testing regards the fact that 95% of all students in a school must take the state standardized tests in order to meet the requirements called for under the No Child Left Behind Act (Harris & Irons, 2007). This requirement was made for obvious reasons. Before such requirements, schools often would not test groups of students who were expected to do poorly. Increasingly deceptive methods were employed by some ambitious administrators who would only test the cream of the crop as special education students and those perceived as “bad testers” would often be unavailable on test day due to a “field trip” (Popham, 2004). This was often indirectly encouraged by policymakers such as George Bush, whose “Texas Miracle” in education was soiled by the revelation that principals of schools scoring highly on such tests received cash bonuses in return for their “good results” (Reese, 2005).

While preventing students with disabilities or other learning problems to boost test scores only masks an issue, requiring them to take the test (which the 95% requirement in effect does) introduces a myriad of new obstacles to overcome. Since such students have unique requirements and abilities, they cannot be expected to perform as well as general education students on evaluative tests. The Illinois State Board of Education reported that 201 districts and 142 schools failed solely due to testing results reported for special education students (Harris & Irons, 2007). For this reason a provision was made to allow states to make alternative tests for academically challenged students. While it looked great on paper, the reality was that few states ended up using alternative tests. The effort, expertise and cost of making the tests were usually far beyond the means available. Additionally, teachers would need additional training to implement such new methods (Harris & Irons, 2007). Clearly, the balancing act between trying to treat all students equal and giving special needs students the additional and unique attention they need to succeed is as elusive as any attempts to perfect education in America.

Title I and Supplemental Tutoring
As discussed earlier, AYP plays a significant role in determining whether a school is classified as meeting the goals of No Child Left Behind or of failing to do so. If a school fails in three consecutive years to meet testing result requirements, it must allow students from low income families to use Title I funds to either obtain supplemental academic services from public or private organizations. These services usually come in the form of after school tutoring or the chance to transfer to another school that has shown adequate AYP (Harris & Irons, 2007). In an attempt to ensure that adequate funds reached the schools in greatest need, Title I became an essential component of the NCLB Act.

Title I was reauthorized by President Bush as part of the No Child Left Behind Act in 2001. With $10.4 billion allocated to provide a helping hand rather than insure local compliance with federal guidelines, it represented the largest federal program supporting education in America, with funds intended for those schools in greatest need (Harris & Irons, 2007). These goals were largely achieved. Ninety six percent of schools with 75% or more low income students received Title I funds. It intended to make teachers and administrators accountable for their low performing schools and help close the achievement gap in American education. Responsibility for such inefficiencies now fall on schools and even individual class rooms while in the past it had traditionally fallen on state level departments (Harris & Irons, 2007).

While the initial purpose of such tutoring was to provide disadvantaged students the extra help they need in academics, several unforeseen consequences developed as a result of supplemental tutoring provided by the government (Harris & Irons, 2007). If opted for, the tutoring could be sought out from either public resources or private organizations. Each state pre-approved a list of private sources that were deemed qualified to provide the tutoring, and an estimated $5 billion of the Title I funds went to ensure this resource (Harris & Irons, 2007). However much of the tutoring ended up being outsourced to foreign companies that provided their services via the internet, where they were unrestricted by the law and the United States Department of Education was forced to admit that they had little control over the business practices of such companies (Harris & Irons, 2007). Further complicating the issue was the fact that many low income families did not have easy access to the internet (Harris & Irons, 2007). Additionally, religious organizations such as the boy scouts were approved on the government lists. Subsequently the government was providing these faith based initiatives with tax payer money and clearly forwarding the interests of such groups, a clear violation of the concept involving separation of church and state in the constitution (Harris & Irons, 2007). Concern grew over this issue until the Congressional Investigative Agency was called on to determine the exact nature of overseas tutoring companies and to ascertain the extent to which they operate (Harris & Irons, 2007).

Another disconcerting feature that affected public opinion regarding the No Child Left Behind Act was the fact that wherever President Bush went, his big business allies were always soon to follow. In fact, allowing private interests to run education has historically ended with less than desirable results. Most notably with Chris Whittle who provided free televisions and computers to public schools and in return the students were made to watch television commercials for a set time during the day and read textbooks with clever product placement within them (Reese, 2005). It is with little surprise that many began to resent President Bush’s allowance of private businesses to run government funded tutoring. Further complicating the issue is that the tutoring provided by Title I funds remained largely unused, as only 18% of those eligible for the service actually used it (Harris & Irons, 2007). Furthermore, since much of the money is directed towards private companies on a government contract, this money is essentially wasted when it could be re-circulated back to the public schools that are in such dire need of additional funding.

Flagrant Opposition and the Trojan Horse Theory
It seems recent developments to the No Child Left Behind Act have inflamed the age-old issue of states' rights. The setting of education policy traditionally has been the domain of the state governments, with the primary exceptions being the Great Society reforms and aid to vocational education. However a new trend is developing in which the federal government is increasingly involved in setting national guidelines which the states must now follow (Reese, 2005). According to James Popham, the message sent by federal lawmakers is, “We have ample funds to send your way, but to get it you must play by our rules” (2004, p. 14). This inevitably ends up with many teachers, despite their personal inclinations toward such tactics, jumping through the hoops in order to gain extra funding. Other educators have made no secret of their opposition to parts of or all of the No Child Left Behind Act. Some states have been able to gather enough public support to allow individual districts enough leeway to make their own tests despite federal regulations, most notably in Nebraska (Popham, 2004). Additionally Hawaii, Arizona, New Mexico and Vermont have rejected parts of the new law’s guidelines. The legislatures of Utah and Virginia have voted almost unanimously not to comply with requirements of No Child Left Behind (Wood, 2004). Much of the logic behind resistance to the act is that it is often considered to be an attempt to embarrass low-performance schools which are mostly populated by minorities. This is perceived to be done by imposing sanctions on already troubled institutions and allowing increased privatization of American schooling, a goal which many believe was President Bush’s real motivation for signing the act (Reese, 2005). Even this viewpoint is far from the most extreme ones. Alfie Kohn, described by Time magazine as one of the most outspoken critics of the current American fixation on tests and statistics, has claimed that the act is a Trojan horse meant to deliberately undermine public schooling in America despite its publicly professed goals of strengthening it (Wood, 2004). While to some the Trojan horse theory may sound like a far-fetched conspiracy theory, significant resistance to the implementation of the regulations called for by the act cannot be denied or ignored any longer.

Summary
The heated debate over the No Child Left Behind Act shows not only the differing viewpoints regarding the national governments role in education but also the immense amount of interest in how best to socialize and educate our nation’s youth so as to create a greater and more prosperous nation. The debate over the act did not initiate the discussions involving standardized testing, privatizing education and closing the achievement gap between whites and minorities. These have been issues hotly disputed long before the act was signed in 2001, and they no doubt will be debated well into the future. Whether one supports the act or not, serious matters face America; first and foremost the relative lack of quality education that blacks, Hispanics and other minorities receive is of immense concern. Cuts in school budgets in poorer areas have taken their toll, and it is now estimated that 39% of black students have no recess during a school day, whereas with white students the number is a mere 15% (Prince, 2004). Although some may feel a lack of recess is not dooming one to a life of poverty and crime, any teacher knows that it doesn’t stop there. White students across the board receive far better funding and education than do minorities and blacks who by in large inhabit low income schools in America’s cities. The acts stated goals are to impose a range of mandates tied to federal money to encourage quality education and make schools acknowledge their own flaws to those who are considering attending them. However, it cannot be denied that the act needs serious retooling if it is to have a serious chance of accomplishing any of these goals (Berkman & Plutzer, 2005). While few now would agree with Barry Goldwater’s claim in 1964 that a child without education can still “do fine,” there can be some concern in the eyes of the nation’s educators when everyone looks to them, their schools and education itself as the cure to the issues that ail our nation and on a larger scale our society. But they will no doubt perform their role to the best of their ability to teach and enrich the children of a culture that often spends more time admiring trashy heiresses and ruined former playmates than academic overachievers.

Questions

 * 1) What do you think about some of the intended goals of the reauthorization of NCLB?
 * 2) What about the provision in NCLB that schools must give students names to military recruiters?
 * 3) How many times has the ESEA act been revamped?
 * 4) How does Michigan compare to the rest of the nation in NCLB?
 * 5) Do schools get more funding when their schools do better on the tests?
 * 6) What happens to schools that break NCLB acts?
 * 7) What is wrong with privatizing schools?
 * 8) Do you think schools should be held accountable just because their scores are lower on standardized tests?
 * 9) Is it possible that these kids might get sick of all the tests and try less on the tests?
 * 10) Before NCLB was there standards or AYP for schools to meet?
 * 11) Do you think the standardized tests will alter how teachers teach?
 * 12) How come science was left out of the testing until next year?
 * 13) If a school is already doing well, do they have to improve?
 * 14) So schools get more money for the better the test scores, does this corrupt the academic progression of the students?
 * 15) So the NCLB act actually worsens the gap between wealthier and less wealthy schools, when the goal of the act was to close the gap?
 * 16) Do standardized tests just force teachers to teach a strict curriculum based on these tests and inhibit the overall learning the students deserve?
 * 17) Do the schools that need the most work often not get the funding that they need, because of their low test scores?


text:
Icelandic/Numbers

 * See also Viðauki:Íslensk töluorð

title: Icelandic/Numbers


text:
Cookbook talk:Cooktop

Looks a bit like induction advocacy to me

title: Cookbook talk:Cooktop


text:
User:Drpass

This Wikibook collaboration will be created by technology students in Dr. Pass' 4th and 5th grade classrooms.

title: User:Drpass


text:
User:Ravichandar84/Sandbox

Tahirids
Tahir ibn Husayn (Arabic, Persian: طاهر بن حسين)(died 822) was a general and governor during the Abbasid caliphate. Specifically, he served under al-Ma'mun and led the armies that would defeat al-Amin, making al-Ma'mun the caliph. He was born in Phoshang which is a village in ancient city of Herat (then Khorasan present day Afghanistan).

Afterwards, Tahir was made governor of the eastern Abbasid lands, effectively making him governor of Persia. Tahir later declared independence from the Abbasid empire in 822 by omitting any mention of al-Ma'mun during a Friday sermon. However, he died the same night and al-Ma'mun appointed Tahir's son to continue at his father's post. This established the Tahirid dynasty, which ruled a semi-autonomous state in eastern Persia.

Tahir commissioned the Christian theologian, Theodore Abu Qurrah (d. c. 830) to translate the pseudo-Aristotelian De virtutibus animae into Arabic from Greek.

Talha ibn Tahir (طلحة بن طاهر) (died 828) was the Tahirid governor of Khurasan from 822 until his death.

In 822 Tahir ibn Husayn, who had taken control of Khurasan the pervious year, died. According to some reports, the caliph Al-Ma'mun at first supporting replacing him with Talha's brother Abdullah ibn Tahir al-Khurasani, but the latter was occupied with rebels in Al-Jazira, so Talha was confirmed as governor of eastern Iran instead.

Talha's rule is mostly known for his campaigns in Sistan, another province under his rule, against the local Kharijites, who were led by a Hamza ibn Adharak. Fighting between the two continued until 828, when both Hamza and Talha died. Talha was succeeded in his post by his brother Abd-Allah.

Abdullah ibn Tahir (Arabic: عبد الله بن طاهر الخراساني ) (c. 798–844/5) was the Tahirid governor of Khurasan from 828 until his death. He is perhaps the most famous of the Tahirids.

Abdullah's early career consisted serving with his father Tahir ibn Husayn in pacifying the lands of the Caliphate following the civil war between al-Amin and al-Ma'mun. He later succeeded his father as governor of Al-Jazira, with the task of defeating the rebel Nasr b. Shabath, and between 824 and 826 convinced Nasr to surrender. He was then sent to Egypt, where he successfully ended an uprising led by 'Abd-Allah ibn al-Sari. He also recovered Alexandria, which had been seized by Andalusian Muslim refugees seven years before; following their expulsion, the refugees headed to Byzantine Crete, establishing Muslim rule there for the first time.

Although Abdullah had been made the governor of Khurasan following his brother's death in 828, he only arrived in Nishapur in 830; in the meantime he had been busy fighting more revolts. He was assigned for a brief time in 829 to stop the Khurramite Babak, but then was given new orders by the caliph to move to Khurasan and stop the Kharijites. Abdullah's brother 'Ali acted as deputy governor of Khurasan until he was ready to take up residence in Nishapur.

During his reign as governor Abdullah was occupied with affairs on both the eastern and western parts of his territories. In the east, he took steps to improving the strength of the Samanids, his vassals in Transoxiana. The Samanids were important, as they controlled the trade between Central Asia and the central Caliphate, including the trade of Turkish slaves. Also in the east in 834 an Alid, Muhammad ibn al-Qasim, revolted in Juzjan, but Abdullah's forces eventually managed to capture him.

In the west, meanwhile, Abdullah came into conflict with the local ruler of Tabaristan, the Ispahbad Mazyar b. Qarin. As the ruler of the east, Abdullah claimed Tabaristan as a dependency and insisted that the tribute owed by Mazyar to the caliph should pass through him. Mazyar, however, was looking to expand his dominion and wanted to be free of Tahirid influence, so he refused to accept this and demanded that he be able to pay his tribute directly to the caliph. In this struggle Mazyar had the support of the Afshin, who allegedly wanted to control the Tahirid lands himself. Abdullah was able to turn the caliph against Mazyar, and in 839 was ordered to stop the Ispahbad. Mazyar, a recent convert to Islam, heavily relied on the Zoroastrians of the province but in the end was captured, sent to Iraq and executed. Tahirid control over Tabaristan was therefore secured until the Zaydid revolt of 864.

Abdullah died in Nishapur, either at the end of 844 or in 845. He was succeeded by his son Tahir.

Tahir bin 'Abd-Allah (d. 862) was the Tahirid governor of Khurasan from 845 until 862.

During his father 'Abd-Allah's lifetime, Tahir was sent into the steppes to the north in order to keep the Oghuz Turks in line; he probably received Samanid assistance in this venture. When 'Abd-Allah died in 844, the Caliph al-Wathiq originally appointed another Tahirid, Ishaq b. Ibrahim b. Mus'ab, as his successor in Khurasan, but then reversed this decision and confirmed Tahir as governor.

Little is known about Tahir's reign, although there was unrest in some of the outlying provinces. Sistan, for example, was lost to the Tahirids when the 'ayyar leader Salih b. al-Nadr drove out Tahir's governor and took power there himself. Tahir died in 862; his will stated that his young son Muhammad should succeed him as governor, and this was honored by the caliph.

Muhammad bin Tahir (d. c. 890) was last the Tahirid governor of Khurasan, from 862 until 873.

Governor of Khurasan
When Muhammad's father Tahir bin 'Abd-Allah died in 862, the caliph wanted to replace him with Muhammad b. 'Abd-Allah, but after the latter refused he appointed Muhammad as governor. The caliph however did not grant Muhammad other titles usually reserved for the Tahirid governor of Khurasan, such as the military governorship of Iraq and Baghdad, but instead gave them to Muhammad b. 'Abd-Allah.

When he became governor, Muhammad was still young and rather inexperienced. Only two years after he succeeded his father, Tabaristan was lost to a Zaidi revolt and the Tahirids were unable to recover the province. In 867 the Saffarid amir of Sistan, Ya'qub bin Laith, took Herat and imprisoned its Tahirid governor. An army was dispatched under the Samanid Ibrahim ibn Ilyas to stop Ya'qub, but was defeated, after which Muhammad was forced to come to terms. During this time Muhammad also tried to gain the offices in the West that had been given to Muhammad b. 'Abd-Allah. After the latter died in 867 his brother 'Ubaydallah b. 'Abd-Allah had taken over the offices. In opposition to 'Ubaydallah, Muhammad sent his uncle Sulayman b. 'Abd-Allah as his representative in Iraq, and Sulayman was able to gain the posts at the expense of 'Ubaydallah, although he would eventually lose them.

The weakness of Muhammad b. Tahir's rule in Khurasan would eventually lead to the end of Tahirid rule there. In 873 the Saffarid Ya'qub marched on Muhammad's capital, Nishapur. Muhammad refused to flee and was captured by the Saffarids. For three years he remained in captivity, but was freed by caliphal forces after the Saffarids were defeated at the Battle of Dair al-'Aqul in 876. After he was freed the caliph reinvested him with the governorship of Khurasan, although Muhammad never asserted his authority there. Several anti-Saffarid partisans in Khurasan, such as Ahmad al-Khujistani and Rafi' ibn Laith, placed Muhammad's name in the khutba in areas they managed to control, but Muhammad never exercised any actual authority over them.

Later life
After being freed by the caliph Muhammad took up residence in Baghdad and from there attempted to gain the offices held by 'Ubaydallah b. 'Abd-Allah. This conflict between the two Tahirids would continue for several years. In 879 the Saffarid Ya'qub died and was succeeded by his brother Amr bin Laith. Amr reached an agreement with the caliph and was invested with Khurasan, replacing Muhammad. As the governor of Khurasan, Amr now asserted the rights formally held by the Tahirids to nominate his representative for the offices in the West; his choice fell on 'Ubadydallah. Amr also used his influence to have Muhammad arrested for allegedly supporting Khujistani, although there was little evidence to support this.

Muhammad regained caliphal favor when the peace between the caliphate and the Saffarids fell out in around 884. He was made governor of Baghdad in place of 'Ubaydallah and regained the title of governor of Khurasan, though as before he was never able to reestablish his rule in that province. He died sometime around 890.

Saffarids
Like the Tahirids, the Saffrids, too, were adventurers from Eastern Iran who had previously been nominally subject to the Caliphs.

Yakub ibn Laith
Yakub ibn Laith was the son of a pewterer of Sistan. He started life as an ironworker but dissatisfied with his earnings, he took to banditry and rose to become chief of highway robbers. A local chieftain sought Yakub's help to establish an independent state of his own. bin Laith obliged but on the success of the campaign, he immediately overthrew his master and established himself as the chief of Sistan. His power and influence reached its zenith when the Caliph of Baghdad recognised him as the independent ruler of Sistan and offered to crown him as Emperor.

However, Yakub refused and sent him a rebuttal.

Tell the Caliph that I am already indebted to my sword for the territories he so generously bestows upon me. If I live, that sword shall decide between us - if I die, he shall be freed from apprehensions.

Yakub died in 877 and was succeeded by his brother Amir.

Amir ibn Laith
Amir succeeded Yakub in 877 and commenced his reign by sending a letter of tribute to the Caliph Motaded. However, soon, his friendship began to whither away as the two powers had frequent territorial disputes. The Caliph invaded Sistan but was defeated. He nstigated the Samanid chief Ismael to attack Sistan. Ismael successfully vanquished Sistan and captured Amir. He was taken to Baghdad and put to death in 901.

Abu Ahmad Khalaf (November 937-March 1009) was the Saffarid amir of Sistan from 963 until 1002. Although he was renowned in the eastern Islamic world as a scholar, his reign was characterized by violence and instability, and Saffarid rule over Sistan came to an end with his deposition.

Early life
Khalaf was born in the middle of November 937 to Abu Jafar Ahmad and Banu, a granddaughter of Amr bin Laith. Little is known about the first twenty-six years of his life; presumably much of it was spent learning. From 957 or 958 at the latest he was recognized as heir to the throne and his name was included on his father's coins.

Succession to the Amirate
At the end of March 963 Abu Ja'far Ahmad was murdered in Zarang. At the time of the assassination, Khalaf had been outside the capital. When he heard about his father's death, he rode for the town of Bust, whose governor immediately pledged his support. Soon afterward he led an army against Zarang, which was under the control of a rival Saffarid named Abu Hafs b. Muhammad. Seeing Khalaf's army, Abu Hafs fled the capital and sought refuge in Samanid Khurasan, allowing Khalaf to enter Zarang.

Shortly after Khalaf was proclaimed amir, he proclaimed Abu'l-Husayn Tahir his co-ruler. Abu'l-Husayn Tahir, who was descended from the Saffarids on his mother's side, had been governing Farah but came to Zarang after Abu Ja'far Ahmad was murdered. Khalaf set him up in the Yaqubi palace and had his name inserted in the khutba beside his.

A year after Khalaf's ascension, a riot broke out in Zarang. Led by an 'ayyar leader and involving the city factions, it was quickly put down. Khalaf then decided to perform the Pilgrimage and left, leaving Abu'l-Husayn Tahir in charge.

Khalaf spent probably one year on the Pilgrimage before returning (965). On the way home he stopped at Baghdad, where the Buyid amir Mu'izz al-Daula gave him an audience with the Abbasid caliph al-Muti. The caliph confirmed him in his rule of Sistan and gave him a robe of honor and standard. Khalaf felt, however, that Abu'l-Husayn Tahir would not willingly give up control of Sistan upon his return, so he went to the Samanids for assistance and received an army. Returning to Sistan, he forced Abu'l-Husayn Tahir to retreat. As soon as Khalaf's army had been dismissed, however, Abu'l-Husayn Tahir returned, forcing Khalaf to seek Samanid help again. The conflict suddenly ended with the death of Abu'l Husayn Tahir in 970; his son Husayn declared his alliegence to the Samanids and left Sistan for the time being.

Conflict with Husyan b. Abu'l-Husayn Tahir
Within a year of the death of Abu'l-Husayn Tahir, his son Husayn pressed his claim to the amirate. Returning to Sistan, he soon gained control of Zarang in late 970/early 971. When Khalaf and his forces advanced to retake the capital, Husayn left the city and led his army against him. In the ensuing battle, Khalaf was victorious and several of Husayn's military commanders were killed. Khalaf retook Zarang in April of 971 and immediately began to root out Husayn's supporters in the city, causing many of them to flee to Khurasan.

Khalaf's victory proved to be only temporary, as Husayn returned in the following year. With an army that included elephants, Husayn defeated Khalaf in battle and reoccupied Zarang. A further setback for Khalaf occurred when the Samanids decided to get involved in the conflict. Khalaf had neglected to send the customary tribute to the Samanid amir at Bukhara, and Husayn took advantage of the amir's interest in the conflict by leaving Zarang and travelling to Bukhara to seek assistance (Khalaf, for his part, seems to have been more friendly to the Buyids, even including the name of the Buyid amir 'Adud al-Daula in the khutba at one point, perhaps in an attempt to receive military aid. No record of Buyid intervention in Sistan during this time appears, however). A Samanid army was sent to support Husayn; Khalaf gave battle but was defeated in August of 979.

Husayn and his Samanid allies then surrounded Zarang, which Khalaf had fled to after the battle. A siege lasting for probably three years began. Khalaf's forces attempted numerous sorties but where unable to break the siege; the Samanid and Saffarid armies battled each other several times, with neither gaining a decisive victory. The Samanid amir eventually sent a member of the Simjurid family, Abu'l-Hasan Muhammad Simjuri, to break the stalemate. With his help, a truce was achieved between Husayn and Khalaf in 983. Husayn received Zarang and much of Sistan; he entered the capital and had the name of the Samanid amir inserted in the khutba there. Khalaf left Zarang and took up residence in the nearby fortress of Taq and was to receive the revenues of the state lands and part of the revenues from Zarang.

As soon as Abu'l-Hasan left Sistan, however, Khalaf broke the truce and attempted to retake Sistan. Husayn barricaded himself in the citadel, but found that its supplies had been depleted by Khalaf's forces during the three-year siege. Realizing that he couldn't hold out for long, he contacted the Ghaznavids for help. The Ghaznavid Sebuktigin made his way to Sistan, but Khalaf managed to bribe him and eventually convince him to assist him instead. With no choice left but to surrender, Husayn sent envoys to seek peace. An agreement was reached on December 25, 983, and to celebrate the peace numerous festivities were held. Husayn died not long after.

Later Years
Khalaf was now the sole uncontested amir of Sistan for the first time in twenty years. During the next several years he gained his reputation for being a great scholar and for encouraging learning within his realm. He is also said to have made another Pilgrimage, though the date of this is uncertain. Upon the deposition of the caliph al-Ta'i in 991 by the Buyid Baha' al-Daula, he recognized the new caliph al-Qadir. This represents a break between him and the Samanids, who with their vassals the Ghaznavids continued to recognize al-Tai as caliph. In any case, it was probably al-Qadir who gave Khalif his laqab of Wali 'l-Daula.

Khalaf also conducted a campaign to retake Bust and Zamindawar. These had been virtually lost to the Saffarids during Abu'l-Husayn Tahir's rule; the local Turks were more or less independent before the Ghaznavid Sebuktigin had conquered the region in c. 978. Khalaf occupied Bust in 986 while Sebuktigin was preoccupied with his own campaign against the Hindushah. When the Ghaznavid returned, however, Khalaf was forced to surrender Bust and return the taxes he had taken from the town.

Khalaf had several sons; the two oldest, Abu Nasr and Abu'l-Fadl, died of natural causes. The third, 'Amr, spent many years at the court of the Samanid amir in Bukhara. In 988 'Amr was sent back to Sistan, where his father warmly welcomed him. A few years later, however, 'Amr took part in a rebellion against Khalaf. The rebellion was soon put down and 'Amr was jailed; he died in prison shortly after.

After the attempt to take Bust, Khalaf and Sebuktigin seem to have been on good terms. Khalaf is reported to have participated in a campaign together with Sebuktigin and the Farighunid amir of Guzgan to assist the Samanids in quelling a rebellion in Khurasan. When Sebuktigin died in 997, however, his two sons Mahmud and Ismail disputed over who should succeed him. Khalaf viewed this as an opportunity to gain territory from the Ghaznavids, and sent his fourth son Tahir to take Quhistan and Badghis in 998. Tahir was defeated in Baghdis by Mahmud's uncle Bughrachuq, although the latter was killed in the fighting.

Mahmud had no intention of letting this assault go unpunished. He led his troops into Sistan in 1000 and trapped a surprised Khalaf, who was staying at a hill resort. Khalaf, lacking an army, had to pay an indemnity, put Mahmud's name before his own on his coins and place the Ghaznavid's name in the khutba.

Khalaf's son Tahir is mentioned as having invaded Buyid Kerman in 1000, although he was ultimately unsuccessful in making any lasting gains. Soon afterwards he, like 'Amr before him, rebelled against Khalaf. The rebellion ended with Tahir's capture; he was imprisoned and died not long after, in 1002. With Tahir's death Khalaf was no longer left with any suitable heirs.

Khalaf's reign had grown increasingly unpopular over the years; his unpopularity especially grew after Tahir's rebellion. After Tahir died, the commander of his army sent a message to Mahmud of Ghazna, stating that the people of Zarang wanted him to become the ruler of Sistan. Mahmud responded by sending an advance force to secure Sistan. Khalaf resisted, barricaded himself in Taq and withstood a siege by the Ghaznavid force, so Mahmud decided to come personally in November 1002. Mahmud's army was reinforced by the townspeople of Zarang, eager to see the Saffarid defeated. By December of 1002 Khalaf was forced to surrender. He was sent to Farighunid Guzgan, wher he lived until 1006 or 1007. Rumors that Khalaf was in contact with the Karakhanids, whom Mahmud was at war with at the time, resulted in him being transferred south to Gardiz, where he died in 1009. Sistan remained under Ghaznavid rule until 1029, when the Nasrid dyansty gained control of the country.

Most prolific Wikibookians as of '''Editors who don't wish to be on this list are welcome to replace their name with "placeholder", and add their name here to be anonymised on future versions of this list. When they do, do not revert.''' Users on en.wiki who are neither in the 'bot' user group or bots on this list; sorted by edit count; list generated 0.00 HRS 10 March 2009 GMT.

title: User:Ravichandar84/Sandbox


text:
User:Mweli

MOHAMED RULES

MOHAMED RULES
MOHAMED RULES MOHAMED RULES MOHAMED RULES MOHAMED RULES MOHAMED RULES

MOHAMED RULES MOHAMED RULES MOHAMED RULES MOHAMED RULES MOHAMED RULES MOHAMED RULES

MOHAMED RULES MOHAMED RULES

title: User:Mweli


text: User talk:90.200.53.43

title: User talk:90.200.53.43


text:
Erlang Programming/Overview

Everything is a process
Software technologies often use a particular organizing principle. In Linux, everything is a file. In Ruby, everything is an object. In lisp, everything (program or data) is a list. In Erlang, the most important unit of organization is the process. Each process has an ID and at least one function that starts it (an entry point). In theory, there could be multiple entry point functions for a process. Each process is not limited to one function when running. On the contrary, one can have a whole barrel-of-functions that recursively call one-another and behave together as one process. GS based graphics programs in Erlang often use the barrel-of-functions per process technique to handle GUI events. CPU time is scheduled in a round robin fashion with equal time slices to each process.

Messages
Processes send messages and receive messages from one another. Messages are read with pattern matching. The messages are matched in a fifo (first in, first out) way.

Be parallel safe
To be serial-safe we need to control side effects. As a solution, first we invented structured programming, then object oriented programming. Each time the goal was to isolate state and variables to reduce side-effects. In the same tradition, side effects are more restricted in Erlang. If a function has no state then it will behave the same way every time. If a function has no side effects, then it cannot cause other functions to break.

A pure function is a function that returns the same value given the same arguments regardless of the context of the call of the function. This is what we normally expect from a mathematical function. A function that is not pure is said to have side effects. Side effects typically occur if a function a) sends a message b) receives a message c) calls exit d) calls any BIF* which changes a processes environment or mode of operation (e.g. get/1, put/2, erase/1, process_flag/2 etc). —quoted from Erlang Programming Rules (see references)

* Note: "BIF" stands for "built in function"

Forget state
In general, state is forgotten in Erlang functions. Iteration is simulated by recursion. Variables can only be assigned once during each function call. State is carried by function arguments or state is put into a database if absolutely necessary. Avoiding state protects the integrity of processing in parallel. Each function call can be thought of as the creation of a pocket universe that has a set of equations that are true for the extent of invocation. Alternatively, one could conceive of erlang as a system to program with a kind of temporal logic. Some say that Erlang does not even have variable assignment, it only has pattern matching. [ Head | Tail ] = [ 1, 2, 3 ], Head = 1. ok Head must always match in a consistent way or the containing process will fail. Head = 2. Error in process <0.29.0> with exit value: {{badmatch,2},[{erl_eval,expr,3}]} Pattern matching can be thought of as a series of assertions that must be true.

Mixing paradigms
Simple object oriented programming can be simulated with erlang by using processes for objects and messages for methods.

The new software crisis
In 2003 Moore's law took a sharp turn. Overheating caused microprocessors to limit their speed to 4 GHz. The solution was to create multicore processors. This allowed Moore's law to continue but only in a parallel way. Multicell computing created a new software crisis, the MIMD (Multiple Instruction Multiple Data) software crisis. SIMD (Single Instruction Multiple Data) is relatively easy, MIMD is difficult. (Ref:The free lunch is over). MIMD programs are needed to make use of the new multi-core computers, otherwise, Moore's law breaks.

Uses of Erlang
Erlang is well suited to address the new MIMD software crisis. Erlang can be used for agent programming because of parallel processes and message passing. Erlang can be used for classical AI programming because it is a symbolic language. Because of extreme process isolation it should work well for genetic/evolutionary programming.

title: Erlang Programming/Overview


text:
Futurebasic/appendix/styleguide

Style Guide for FutureBASIC Documentation
When contributing, follow as closely as possible the conventions stated in the chapter titled "Introduction to the FB Language." These conventions include the following:  Items in  represent placeholders which should be replaced as indicated in the description; Items in  represent literal text that you should enter exactly as shown; Items in  represent literal text that you should usually enter exactly as shown.

Code Samples
Please adhere to the following coding standards:

 * 1) FB keywords: lower case  (, not  ) or "camel case"  ( , not  ).
 * 2) The mixed-case format is preferred.
 * 3) Please do not color code the Wikibook text.
 * 4) When we export to HTML or HTML Help, a CSS "class" will be added  to control the appearance of keywords. It should be noted that WIkibooks do not support CSS.
 * 5) Toolbox calls: Apple's naming convention
 * 6) User functions: capitalized (fn MyFunction)
 * 7) Variables: start with a lowercase letter (x, myVariable)
 * 8) Globals: start with lowercase g (gSomeGlobal)

Code within Text
The tag is supported by Wikibooks. This tag renders enclosed text in a monospace font, usually Courier or Courier New. Unfortunately, the text is not always easy to read, so please avoid using italics or other effects unless absolutely essential.

Blocks of Code
Use a  (pre-formatted) tag for large blocks of code: // This is sample code The  tag places example code within a box. It also preserves formatting by rendering the code in a monospace font.

Document Organization
When documents can be organized in folders (directories), the following standards are used:

 * 1) Language: An Overview of Syntax, Organized by Functionality
 * 2) Intro: An Introduction to Programming in FutureBASIC (Note: please compose content for true beginning programmers)
 * 3) Programming: Intermediate to Advanced Programming Topics
 * 4) FBtoC: An Explanation of FBtoC
 * 5) Tutorials: Programming Examples and More
 * 6) Appendix: Additional Information

Folder names are in lowercase when appearing in Wikibook links. These folders are divided further into specific topics. Always consult the table of contents before creating sub-folders (sub-sections) for this text. The Wikibook entries are linked from FutureBASIC → "Major Section" → "Sub-section" and this organization will be automatically recreated when a Wikibook is exported. Since the Wikibook is our central repository for content, please maintain the organization. Reorganizing a Wikibook requires copying pages to new locations and then deleting the originals.

title: Futurebasic/appendix/styleguide


text:
Erlang Programming/Distribution

Distributed Processing
Theoretically, in Erlang, writing a parallel program for many computers is not much different from writing a program for a single computer. Each process on each processor has a unique id/name. Processes can be easily spawned. Messages can be easily sent and received. Each home directory on each computer will have a special Erlang cookie password file that allows access to Erlang processes on that machine.

The major problems people have writing distributed programs in Erlang are general network reachability issues related to firewalls and routers. you can make communication between two or more distributed node over network. if you want to communicate with node B from node A. then you can send message to node B as it is local process. you must specify node name to communicate such as:{pid,Nodename}!'hello node A'. where pid is process identifier of process on node B. to more generalization you should register name of the process. for example:register(pro,self). now you can use pro in place of self.

title: Erlang Programming/Distribution


text:
Erlang Programming/Documentation

Documentation
Comments

The preferred comment style in erlang is to use:

%%% Three for module level comments. %% Double for function level comments. % Single for line level comments.

title: Erlang Programming/Documentation


text:
Chess Opening Theory/1. d4/1...f5/2. c4/2...g6

Dutch Defence

With g6
A dynamic choice, the Dutch with g6 is a Leningrad setup. The pawn structure is practically always g6-f5-d6. Black plays in this system, with only a few rare exceptions, his bishop to g7, knight to f6, and castles quickly.

Leningrad Dutch main line is, with possible changes in move order: 1. d4 f5 2. c4 Nf6 3. g3 g6 4. Nf3 Bg7 5. Bg2 d6 6. 0-0 0-0 7. Nc3 Qe8 (Diagram).

With 7...Qe8 black plans e5. White usually either plays a pawn advance on queenside with b4-b5 etc., which is helped by the strong bishop on g2 or/and plays for center with e4 and d5. In fact the space advancing move 8 d5 is main line. The main alternatives to 7..Qe8 for black are 7...c6 and 7..Nc6. 7..c6 is considered quite solid and played by former world champion M Botvinnik in the end of his career. 7... Nc6 is an ultra sharp alternative where black usually plays for kingside attack.

On absolute top level Leningrad Dutch is today rarely played. But it is used occasionally and former world champion Vladimir Kramnik played it several times in his youth. Its considered an excellent way for black to play for win, especially below grandmaster level, but the slight weakening of kingside with pawn f5 makes it not the taste of every strong chessplayer.

When contributing to this Wikibook, please follow the conventions for organization.

Theory table
.

'''1. d4 f5 2. c4 g6'''


text:
Erlang Programming/Function Objects

Function Objects
Function objects can be named or unnamed, or stored in a variable. Function objects can be like lambda expressions. Lambda expression in Erlang are created with the keyword "fun". Lambda expressions are unnamed functions that can be stored in variables. Please consider the following:

Sample Erlang command line code:

Mod = fun(X,Y) -> X rem Y end. Mod(6,5). 1

Generic behaviors often use function objects to become specialized. A generic server can be dynamically given a function object to allow it to become a particular type of server or service provider.

title: Erlang Programming/Function Objects


text:
Erlang Programming/Design Principles

Send Messages, do not share memory
Messages are sent between processes. The compiler is very picky about what operations are "parallel-safe" and is not shy about letting you know. The compiler is particularly picky (parallel-safe) about sending and receiving messages. If you recurse after each message is processed then your code is more parallel-safe. Messages are delivered in order and are selected for removal from the queue by pattern matching (as in Prolog). Because of the extensive built-in pattern matching, Erlang operates in a declarative way. Because of the parallel-picky compiler, it is often as easy to write a parallel program in Erlang as it is to write a serial program in other languages, once you get the hang of the language.

Fail Early and Often
Erlang designers often use an unusual but effective design technique called "fail early and often", FEO. Let processes fail. If unexpected inputs arrive, then let the process crash, and restart it. This allows for terse code that is robust. We do not waste time coding for bad inputs. We code to expected inputs(the specification only). Theoretically, this technique should make for improved security because unexpected inputs cause processes to self destruct and errors and bad behaviour do not propagate.

Debugging
Once a process has crashed we can gather crash information and let the programmer fix problems early. If a process is written to specification, and it crashes then the only possible problem is that it received bad input.

title: Erlang Programming/Design Principles


text:
Erlang Programming/Testing

Testing
The recommended order of testing for an Erlang program is:

 * Test on one core in one microprocessor.
 * Test on multiple cores.
 * Test on multiple computers (if needed).

title: Erlang Programming/Testing


text: User talk:71.156.169.66

title: User talk:71.156.169.66


text: User talk:Mweli

title: User talk:Mweli


text:
User:Tbleher

See mw:User:Tbleher.

title: User:Tbleher


text:
Chess Opening Theory/1. d4/1...Nf6/2. c4/2...g6/3. Nc3/3...Bg7/4. e4/4...d6

= King's Indian Defence =

4...d6
The move d6 ensures that White can't kick the Black Knight with e5. It also prepares to play e5 or c5 at some possible point. White has a variety of choices here.

By far the most popular line is the Classical main line, 5. Nf3, which results in a race on opposite sides: White tries to break through on the queenside before Black's forces get to the White king.

In the aggressive Sämisch Variation (5. f3), White will normally castle queenside (although castling kingside can also occur) and attack along the h-file. Black, meanwhile, will try to open the b-file with the advance ...b7-b5.

The most megalomaniacal variation is the Four Pawns' Attack, which sets up a fourth pawn on the fourth rank (hence the name) and gains a lot of space. Black must react quickly to avoid getting crushed by White's center.

Then, there is the quirky variation arising after 5. h3(Makogonov), which stops a knight from getting into g4 while retaining the option of Nf3.

The most positional variation in the King's Indian is the Fianchetto Variation. In this variation, normally the position is more fluid. Black usually exchanges his e-pawn for White's d-pawn, resulting in a situation where Black tries to play on the queenside dark squares and against e4, while White lines his forces up against d6 and the kingside.

In all of these variations, very sharp play ensues, making it the favorite of players such as Kasparov, Fischer, and Bronstein.

Theory table
.

'''1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 d6'''


text:
Topfield 5800/Troubleshooting/USB Bootloader

The only reason where you absolutely have to flash Toppy firmware via the USB port is when the Toppy is very sick and you can't use HD2FW.

If you are forced to use the failsafe mechanism then it is a prerequisite that your PC can recognise the Toppy Boot loader device & has drivers for it.

The symptoms of this not working properly are that the Toppy reboots normally instead of rebooting into the firmware update mode, even though the firmware updater is waiting on the PC to detect the Toppy boot sequence.

If Wuppy has been installed you may need to uninstall Wuppy & remove the drivers manually before the Toppy drivers for the USB loader can be installed properly.

The driver in question is TfBulk.SYS To prevent the driver associated with Wuppy being reinstalled again when you rediscover the Toppy TfBulk.inf also need to be removed, including any cached copies, the names of which can often be discovered by looking at \Windows\setupapi.log after the USB driver discovery process has been run.

Ask more questions if you are not confident to do this & also remember to delete the USB device from device manager first (you may need to select "view" / "show hidden devices")

This is written with Window XP in mind, not Vista.

Another option is to find an alternative PC to flash empty settings. (or try the serial method).


text:
Adventist Youth Honors Answer Book/Nature/Environmental Conservation

1. What is the difference between ecology and environmental conservation?

 * Ecology: Is defined as "the study of how organisms interact with each other and their physical environment."
 * Environmental conservation: Is defined as "the rational use of the environment to provide the highest sustainable quality of living for humanity."

2. Write a 500 word essay on how the increase in human population is threatening our existence on earth.
The most important threat to our existence on earth today is that of global warming. The human activity that has the greatest effect on warming is the release of greenhouse gases such as C02. For your research into this issue, see the following Wikipedia articles:

 * Global warming
 * Greenhouse effect
 * Kyoto Protocol
 * Carbon offset

Other factors include Overpopulation; Deforestation; and overuse of the land especially through Tourism and outdoor recreation such as camping and hiking.

Can you think of others?

3. What does the term “death” of a lake or river mean? Is there a lake or river in your area or country which is classified as “dead”?
The death of a lake or river is said to occur when it becomes so polluted that it can no longer support life (such as fish, turtles, crustaceans, etc.). The most famous dead river is probably the Cuyahoga River in Ohio which actually caught on fire many times, helping to spur the environmental movement in the late 1960s.

Fires plagued the Cuyahoga beginning in 1936 when a spark from a blow torch ignited floating debris and oils. Fires erupted on the river several more times before June 22, 1969, when a river fire captured the attention of Time magazine, which described the Cuyahoga as the river that "oozes rather than flows" and in which a person "does not drown but decays."

This event helped spur an avalanche of pollution control activities resulting in the Clean Water Act, Great Lakes Water Quality Agreement, and the creation of the federal and state Environmental Protection Agency. As a result, large point sources of pollution on the Cuyahoga have received significant attention from the Ohio Environmental Protection Agency in recent decades.

Water quality has improved and, in recognition of this improvement, the Cuyahoga River was designated as one of 14 American Heritage Rivers in 1998. Pollution remains, however, including nonpoint source problems, Combined Sewer Overflows (CSOs), and stagnation due to water impounded by dams. For this reason, the Environmental Protection Agency classified portions of the Cuyahoga River Watershed as one of 43 Great Lakes Areas of Concern.

b. Signs of Stream Deterioration and Death
==5. If your stream is showing some of the above signs of death, do something about cleaning it up. Contact the closest government agency to ask what you and/or your group can do to help improve the stream. Organize a group of young people to help in cleaning the trash along your stream. If possible, get businesses to help in your campaign. == In the United States, environmental protection is managed by the government at all levels: local, state, and federal. It will be much easier to contact local or state officials rather than federal officials. Check the phone directory under "Environmental Protection" or search the Internet to find contact information for the agency in your area. If you are having difficulty finding the government body responsible for this in your area, try contacting a local paddling club, The American Canoe Association, or American Whitewater. These associations have a vested interest in clean rivers and streams (that's their playground!) and often organize river clean-up projects. They will be able to get you on a project, put you in touch with the most responsive government body, and recommend local businesses that are responsive to environmental conservation.

==6. Make a visit to the city or county trash dump to see how this waste is handled. Find out the following: a. How many tons of trash are dumped daily? Yearly? b. What attempts are made to recycle any of this trash? c. Is any of the trash burned or is all of it buried? d. What is the cost per person per year for handling the trash? e. What happens to junked autos in your area? == Once you have made contact with the local government, they will be able to tell you how to get in touch with the solid waste management authority (if you don't know already). It could be that the government body you have been working with is the same one responsible for solid waste management. If this is the case, you previous efforts with them will pay another dividend - they will be eager to arrange a visit. You may also opt to contact the dump facility yourself and make arrangements for your visit.

==7. Make a visit to the nearest sewage plant. Draw and label a detailed diagram of what happens to the liquid and solid wastes from the time they come into the plant until they leave. In what form do they leave? Is any further use made of this waste? == Again, you have an opportunity to use the contact you established with the local government. In most municipalities, the department responsible for the sewage plant is the same as the one responsible for the water plant. Make arrangement for both visits (see requirement 8) at the same time. Make sure to bring paper, pencil, and clipboards, and let the plant manager know ahead of time what questions you will be asking so that they can prepare.

==8. Visit the nearest water purification plant. Construct a flow diagram of the steps in water purification from the time the water enters the plant until it leaves for distribution to homes and stores. Through reading and discussion with water works officials, determine whether water resources in the future are going to be enough to meet the demand. == See the answers to requirement 7 for more information.

9. Read and write a book report on an environment issues book such as Rachel Carson's Silent Spring.
Silent Spring is a book written by Rachel Carson and published by Houghton Mifflin in September 1962. The book is widely credited with helping launch the environmental movement in the West.

When Silent Spring was published, Rachel Carson was already a well-known writer on natural history, but had not previously been a social critic. The book was widely read (especially after its selection by the Book-of-the-Month Club and an endorsement by Supreme Court Justice William O. Douglas), spending several weeks on the New York Times best-seller list, and inspired widespread public concerns with pesticides and pollution of the environment. Silent Spring facilitated the ban of the pesticide DDT in 1972 in the United States.

The book documented detrimental effects of pesticides on the environment, particularly on birds. Carson said that DDT had been found to cause thinner egg shells and result in reproductive problems and death. She also accused the chemical industry of spreading disinformation, and public officials of accepting industry claims uncritically.

The book stated that uncontrolled pesticide use led to the deaths of not only animals, especially birds, but also humans. Its title was meant to evoke a spring season in which no bird songs could be heard, because they had all died from pesticides. Its title was inspired by a poem by John Keats, "La Belle Dame sans Merci", which contained the lines "The sedge is wither'd from the lake, And no birds sing."

10. What are rare and endangered species? Determine what efforts are being put forth to protect such species in your area. What can you do to help? Write a 300-500 word paper on your ideas.
See the Endangered Animals honor for information on this requirement.


text:
Advanced Interactive Media/Final Cut Pro

Final Cut is a user friendly non-linear editing software for video and audio. It allows you to edit both HD and SD formats. Inclusive of this editing tool, it has different video transitions, video filters, video generators, audio transitions and audio filters. All of these can be found in the effects panel. Another great feature that the designers added was the Master Templates. The user would be able to explore pre structured templates in the form of text, backgrounds, shapes in SD and HD. This tool also give the user the option to batch capture and log the various projects. The user can also export the finish edited products to different sources.


text:
Futurebasic/Language/fsref modern

FSRef Structures-- Modern Approach
The preferred way of accessing files and folders in OS X.

Description
The OS X File Manager provides an abstraction layer that hides lower-level implementation details such as different file systems and volume formats. A key component of that abstraction layer is the FSRef.

An FSRef is an opaque reference stored in a record assigned by the File Manger to describe a file or folder. Its elements are cloaked in an 81-element array of UInt8s, the components of which are not documented by Apple. Opaque structures are accessed via Carbon Toolbox functions, rather than directly accessing individual fields of the record as in earlier APIs.

The FSRef API offers long Unicode name support, large file access, and its performance is optimized for OS X.

The contents of an FSRefs are dynamic in nature. For instance, if your code utilizes an FSRef to reference a file or folder, when the Macintosh running your code is restarted, that FSRef structure is cleared. On restart, when your code creates an FSRef to the same file or folder previously referenced, the File Manager will create a new and unique FSRef to identify that file or folder, the structure of which will differ from the former.

Here is the technical description of an FSRef as described in the Carbon Files.h header:

FSRef structure:

struct FSRef { UInt8    hidden[80];  /* private to File Manager*/ };

A discussion detailing why FSRefs are the preferred way to access files and folders, and methods to accomplish the same, is referenced in Apple's May, 2003, Technical Note TN2078.

Nuances of FSRefs which will probably have the biggest impact on your code are that an FSRef cannot represent an item which does not exist, and an FSRef does not contain the name of the item to which it refers.

Another challenge for FB users is that FB's Files$ function used to choose files and folders from a Finder dialog returns an FSSpec rather than an FSRef.

There are work-arounds for each of these challenges.

Creating FSRefs for Files with Navigation Services
Here is a modern Navigation Services replacement function for FB's Files$ function. It is compatible with both FB and FBtoC. It creates an FSRef for a file selected from the default Navigation dialog:

(Code based on this Apple example...)

include "Tlbx Navigation.incl"

_typeFSRef = _"fsrf"

local fn SelectFileFSRef( @fileRef as ^FSRef ) as OSErr dim as NavDialogCreationOptions dialogOptions dim as NavTypeListHandle    fileTypes dim as NavDialogRef     @ navRef dim as NavReplyRecord    @ navReply dim as long        @ count, @ myDummyClientData dim as FSRef          tempRef dim as OSStatus        err

err = fn NavGetDefaultDialogCreationOptions( dialogOptions ) long if ( err == _noErr ) err = fn NavCreateChooseFileDialog( @dialogOptions, fileTypes, 0, 0, 0, @myDummyClientData, navRef ) long if ( err == _noErr ) err = fn NavDialogRun( navRef ) long if ( err == _noErr ) err = fn NavDialogGetReply( navRef, navReply ) long if ( err == _noErr ) long if ( navReply.validRecord != _false ) err = fn AECountItems( navReply.selection, count ) long if ( count == 1 ) err = fn AEGetNthPtr( navReply.selection, count, _typeFSRef, #0, #0, @tempRef, SizeOf( FSRef ), #0 ) long if ( err = _noErr ) BlockMove @tempRef, fileRef, sizeof( FSRef ) end if     end if     xelse // User canceled dialog end if   end if   end if  end if                                                                                end if

err = fn NavDisposeReply (navReply) call NavDialogDispose ( navRef )

end fn = err

The NavDialogCreationOptions record contains several useful fields that the user can use to customize the Navigation dialog. Among other things, the window title, dialog button names, window modality, addition of a special user message at the top of the dialog, can all be customized. These options are, for the most part, universal among a Navigation dialog whether it is used to open a single file, multiple files or a folder.

Following is an example invoking some Navigation dialog functions. These could easily be added as function input parameters, but they are shown here simply added to the function:

include "Tlbx Navigation.incl"

_typeFSRef = _"fsrf"

local fn SelectFileFSRef( fileRef as ^FSRef ) as OSErr dim as NavDialogCreationOptions dialogOptions dim as NavTypeListHandle    fileTypes dim as NavDialogRef     @ navRef dim as NavReplyRecord    @ navReply dim as long         @ count dim as FSRef          tempRef dim as Str255         s dim as OSStatus         err

err = fn NavGetDefaultDialogCreationOptions( dialogOptions ) long if ( err == _noErr )

dialogOptions.modality = _kWindowModalityAppModal

s = "SelectFileFSRef Window" dialogOptions.windowTitle = fn CFStringCreateWithCString( 0, s, _kCFStringEncodingASCII )

s = "Please choose a file..." dialogOptions.actionButtonLabel = fn CFStringCreateWithCString( 0, s, _kCFStringEncodingASCII )

s = "Here is a custom message." dialogOptions.message = fn CFStringCreateWithCString( 0, s, _kCFStringEncodingASCII )

err = fn NavCreateGetFileDialog( @dialogOptions, fileTypes, 0, 0, 0, #0, navRef ) long if ( err == _noErr ) err = fn NavDialogRun( navRef ) long if ( err == _noErr ) err = fn NavDialogGetReply( navRef, navReply ) long if ( err == _noErr ) long if ( navReply.validRecord != _false ) err = fn AECountItems( navReply.selection, count ) long if ( count == 1 ) err = fn AEGetNthPtr( navReply.selection, count, _typeFSRef, #0, #0, @tempRef, SizeOf( FSRef ), #0 ) long if ( err = _noErr ) BlockMove @tempRef, fileRef, sizeof( FSRef ) end if     end if     xelse // User canceled dialog end if   end if   end if  end if end if

err = fn NavDisposeReply (navReply) call NavDialogDispose ( navRef )

end fn = err

Creating FSRefs for Folders with Navigation Services
FB and FBtoC compatible code to return an FSRef for a folder selected from the Navigation dialog is similar to that for files. And again the dialog options may be easily customized:

include "Tlbx Navigation.incl"

_typeFSRef = _"fsrf"

local fn SelectFolderFSRef( folderRef as ^FSRef ) as OSErr dim as NavDialogCreationOptions navOptions dim as NavDialogRef     @ navRef dim as NavReplyRecord    @ navReply dim as long         @ count dim as FSRef          tempRef dim as OSStatus        err

err = fn NavGetDefaultDialogCreationOptions( navOptions ) long if ( err == _noErr ) err = fn NavCreateChooseFolderDialog( navOptions, 0, 0, #0, navRef ) long if ( err == _noErr ) err = fn NavDialogRun( navRef ) long if ( err == _noErr ) err = fn NavDialogGetReply( navRef, navReply ) long if ( err == _noErr ) long if ( navReply.validRecord != _false ) err = fn AECountItems( navReply.selection, count ) long if ( count == 1 ) err = fn AEGetNthPtr( navReply.selection, count, _typeFSRef, #0, #0, @tempRef, SizeOf( FSRef ), #0 ) long if ( err = _noErr ) BlockMove @tempRef, folderRef, sizeof( FSRef ) end if      end if      xelse // User canceled dialog end if   end if   end if  end if end if

err = fn NavDisposeReply (navReply) call NavDialogDispose ( navRef )

end fn = err

Creating an FSRef with FBtoC's Files$ Function
FBtoC offers native creation of FSRefs in its custom Files$ function:

dim as FSRef fref dim as str255 fStr

fStr = Files$( _FSRefOpen, "TEXT", "Open text file...", fsRef ) long if ( fStr[0] ) // Do something with your text file FSRef xelse // User canceled end if

Obtaining a File Name from an FSRef
Obtaining a file name from an FSRef is a bit more difficult than its predecessor, but this function should do the job:

local fn GetLongFileNameFromFSRef$( fsRef as ^FSRef ) dim as str255   @ name dim as HFSUniStr255 hsfName dim as CFStringRef  cfStr dim as OSErr     err dim as boolean    result

err = fn FSGetCatalogInfo( #fsRef, _kFSCatInfoNone, #0, hsfName, #0, #0) long if ( err == _noErr ) cfStr = fn CFStringCreateWithCharacters( 0, hsfName.unicode[0], hsfName.length ) long if ( cfStr ) result = fn CFStringGetPascalString( cfStr, @name, SizeOf( name ), _kCFStringEncodingMacRoman ) CFRelease( cfStr ) end if end if

end fn = name

Obtaining FSRef to Application Bundle
Here is a function to retrieve the FSRef to your application bundle for either a CFM or Mach-O application:

include "Tlbx Processes.Incl"

toolbox fn GetProcessBundleLocation( ProcessSerialNumber *psn, FSRef *location ) = OSStatus

local fn GetMyBundleFSRef( bundleRef as ^FSRef ) as OSErr dim as ProcessSerialNumber @ currentProcess dim as FSRef       @ tempRef, @ bundleRef dim as OSStatus       err

currentProcess.highLongOfPSN = 0 currentProcess.lowLongOfPSN = _kCurrentProcess

err = fn GetProcessBundleLocation( currentProcess, tempRef ) long if ( err == _noErr ) BlockMove @tempRef, bundleRef, SizeOf( FSRef ) end if

end fn = err

Creating a New Folder Using FSRefs
The ability to create new folders, also known as directories, is a key element in many FB programs. Following is a complete program that compiles in both FB and FBtoC. It contains error checking to prevent overwriting an existing folder.

Note: Since both FB and FBtoC headers are incomplete, this code incorporates the definitions of four Carbon Toolbox functions needed to handle its tasks.

include "Tlbx Navigation.incl" include "Tlbx MoreFilesX.incl"

_typeFSRef = _"fsrf"

// Files.h toolbox fn FSCreateDirectoryUnicode( const FSRef * parentRef,¬                   UniCharCount nameLength,¬                     const UniChar * name,¬                 FSCatalogInfoBitmap whichInfo,¬               const FSCatalogInfo * catalogInfo,¬                        FSRef * newRef,¬                       FSSpec * newSpec,¬                       UInt32 * newDirID ) = OSErr

toolbox fn FSMakeFSRefUnicode( const FSRef *parentRef,¬               UniCharCount nameLength,¬                  const UniChar *name,¬             TextEncoding textEncodingHint,¬                     FSRef *newRef ) = OSErr

// UnicodeConverter.h toolbox fn CreateTextToUnicodeInfoByEncoding( TextEncoding iEncoding,¬                TextToUnicodeInfo *oTextToUnicodeInfo ) = OSStatus

toolbox fn ConvertFromPStringToUnicode( TextToUnicodeInfo iTextToUnicodeInfo,¬                            Str255 *iPascalStr,¬                           ByteCount iOutputBufLen,¬                            ByteCount *oUnicodeLen,¬                             UniChar *oUnicodeStr ) = OSStatus

local fn CreateNewFolder( parentFolderRef as ^FSRef, newFolderName as Str255, newFolderRef as ^FSRef ) as OSErr dim as HFSUniStr255 uniName dim as OSStatus   err dim as ByteCount  @ uniLength dim as FSRef    @ tempRef

begin globals dim as TextToUnicodeInfo sTextToUnicodeInfo end globals

err = _noErr long if ( sTextToUnicodeInfo == 0 ) err = fn CreateTextToUnicodeInfoByEncoding( _kTextEncodingMacRoman, @sTextToUnicodeInfo ) long if ( err = _noErr ) err = fn ConvertFromPStringToUnicode( sTextToUnicodeInfo, @newFolderName, 510, @uniLength, @uniName.unicode[0] ) long if ( err == _noErr ) uniName.length = uniLength / sizeof( UniChar ) // Check to see if the folder already exists to avoid overwriting it... err = fn FSMakeFSRefUnicode( #parentFolderRef,¬         uniName.length, @uniName.unicode[0], _kTextEncodingUnicodeDefault, @tempRef ) long if ( err != _noErr ) err = fn FSCreateDirectoryUnicode( #parentFolderRef, uniName.length, @uniName.unicode[0], _kFSCatInfoNone, #0, #0, @tempRef, #0 ) BlockMoveData( @tempRef, newFolderRef, sizeof( FSRef) ) xelse stop "Could not create new folder. Folder already exists." exit fn       end if     xelse exit fn    end if    xelse exit fn  end if end if

end fn = err

local fn SelectFolderFSRef( folderRef as ^FSRef ) as OSErr dim as NavDialogCreationOptions navOptions dim as NavDialogRef      @ navRef dim as NavReplyRecord     @ navReply dim as long        @ count dim as FSRef          tempRef dim as OSStatus         err

err = fn NavGetDefaultDialogCreationOptions( navOptions ) long if ( err == _noErr ) err = fn NavCreateChooseFolderDialog( navOptions, 0, 0, #0, navRef ) long if ( err == _noErr ) err = fn NavDialogRun( navRef ) long if ( err == _noErr ) err = fn NavDialogGetReply( navRef, navReply ) long if ( err == _noErr ) long if ( navReply.validRecord != _false ) err = fn AECountItems( navReply.selection, count ) long if ( count == 1 ) err = fn AEGetNthPtr( navReply.selection, count, _typeFSRef, #0, #0, @tempRef, SizeOf( FSRef ), #0 ) long if ( err = _noErr ) BlockMove @tempRef, folderRef, sizeof( FSRef ) end if       end if        xelse // User canceled dialog end if     end if     end if    end if  end if

err = fn NavDisposeReply (navReply) call NavDialogDispose ( navRef )

end fn = err

dim as OSErr err dim as FSRef oldFolder, newFolder

err = fn SelectFolderFSRef( oldFolder ) long if ( err == _noErr ) err = fn CreateNewFolder( oldFolder, "Test Folder", newFolder ) end if

do HandleEvents until gFBQuit

(More discussion to follow)

4d69 646e 6967 6874

0100 0011 0110 1111 0110 0100 0110 0101 0111 0010 0010 0000 0010 0000 0010 0000

title: Futurebasic/Language/fsref modern


text:
Futurebasic/Language/fsref legacy

FSRef Structures-- Legacy Discussion
The preferred way of accessing files and folders in OS X.

Description
Unlike FSSpecs which are limited to file and folder names of 31 characters, FSRefs are built to handle long Unicode file names and the more robust demands of OS X.

A discussion of FSRef's in FB and FBtoC would be difficult without comparing their functionality with FSSpecs. While FSSpecs may be antiquated in the Carbon API—contrary to popular folklore they are not yet deprecated—FB file and folder functions were designed to utilize FSSpecs (FB's older "working directory" functions are long obsolete and are not recommended nor supported in OS X.) Nevertheless, FB can be adapted to handle FSRefs without too much pain. On the other hand, FBtoC offers native support for FSRefs.

While users were able to directly access the three components of an FSSpec—the file or folder name, the volume reference number and ID of its parent, an FSRef is "opaque" to the user. This means that gleaning information from an FSRef requires helper Toolbox functions.

Differences between FSSpecs and FSRefs are evident when their structures are examined (these definitions are found in the Carbon Files.h header):

FSSpec structure:

struct FSSpec { short        vRefNum; long         parID; StrFileName  name;          /* a Str63 */ };

FSRef structure:

struct FSRef { UInt8        hidden[80];    /* private to File Manager*/ };

The differences which will probably have the biggest impact on your code are that FSRefs cannot represent items which do not exist, and an FSRef's opaque data structure, defined above as an hidden array of 80 bytes, is not documented. In particular, an FSRef does not contain the name of the item to which it refers unlike an FSSpec. This comes as no surprise when you consider that Mac OS X allows the use of file names containing Unicode characters, with a maximum length of 255 UniChars. Compared with the static functionality of FSSpecs, FSRefs are dynamic in nature.

Creating an FSRef File Reference in FB
FB's file and folder functions were written in the era when FSSpecs were king. One of the more common uses for them is when opening a file or folder with FB's Files$ function. Here we see FB's code to obtain an FSSpec to a text file:

dim as FSSpec  fs dim as str255  fStr

fStr = Files$( _FSSpecOpen, "TEXT", "Open text file...", fs ) long if ( fStr[0] ) // Do something with your text file FSSpec xelse // User canceled end if

To obtain a more versatile and OS X-friendly FSRef with FB's Files$ function, the resultant FSSpec needs to be converted to an FSRef. This requires a few more lines of code:

dim as FSSpec fs dim as FSRef   fref dim as str255 fStr

fStr = Files$( _FSSpecOpen, "TEXT", "Open text file...", fs ) long if ( fStr[0] ) // Convert FSSpec to FSRef err = fn FSpMakeFSRef( #fs, @fref) long if ( err == _noErr ) // Do something with your text file FSRef end if xelse // User canceled end if

Creating an FSRef File Reference in FBtoC
Finally, FBtoC offers native handling of FSRefs allowing our function to be written like this:

dim as FSRef  fref dim as str255 fStr

fStr = files$( _FSRefOpen, "TEXT", "Open text file...", fsRef ) long if ( fStr[0] ) // Do something with your text file FSRef xelse // User canceled end if

Creating an FSRef File Reference in both FB and FBtoC
Combining these simple approaches is this example which returns an FSRef in both FB and FBtoC

dim as str255 fileName, s dim as FSSpec   fs dim as FSRef    fsRef dim as OSErr   err '~'1

 * 1) if ndef _FBtoC

s = "Get file FSSpec in FB" fileName = files$( _FSSpecOpen,, s, fs ) long if ( fileName[0] ) // Convert FSSpec to FSRef err = fn FSpMakeFSRef( #fs, @fsRef) long if (err == _noErr ) // Do something with your FSRef end if xelse // User canceled end if

 * 1) else

s = "Get file FSRef in FBtoC" fileName = files$( _FSRefOpen,, s, fsRef ) long if fileName[0] // Do something with your FSRef xelse // User canceled end if

 * 1) endif

Obtaining File Names with FSSpecs and FSRefs
To obtain a file name from an FSSpec, a user simply had to peek inside its sructure or record like this:

myFileName = myFSSpec.name

Of course the resultant file name was limited to 31 characters and, for longer names in OS X is truncated with garbage characters.

Obtaining a file name from an FSRef is a bit more difficult, but this function should do the job:

local fn GetLongFileNameFromFSRef$( fsRef as ^FSRef ) dim as str255     @ name dim as HFSUniStr255   hsfName dim as CFStringRef    cfStr dim as OSErr          err dim as boolean      result '~'1

err = fn FSGetCatalogInfo( #fsRef, _kFSCatInfoNone, #0, hsfName, #0, #0) if err then stop "FSGetCatalogInfo Error:" + str$( err ) long if ( err == _noErr ) cfStr = fn CFStringCreateWithCharacters( 0,hsfName.unicode[0], hsfName.length ) long if ( cfStr ) result = fn CFStringGetPascalString( cfStr, @name, sizeof( name ), _kCFStringEncodingMacRoman ) CFRelease( cfStr ) end if end if

end fn = name

title: Futurebasic/Language/fsref legacy


text:
User talk:74.36.31.140

-- Herby talk thyme 13:31, 9 February 2008 (UTC)

title: User talk:74.36.31.140


text:
Talk:Entry Level PHP Web Application Development/PHP Web Application Development Environments

Host php sites
"It is likely that you can find someplace online that hosts PHP web sites and applications that you can work with. "

If it's likely, should there not be a 'how to' on this?


text:
Advanced Interactive Media/Designing Media -- Impacting Your Audience beyond the Eye

Color Design
When designing a concept for a media project, there are many things to be aware of. As it is important to keep the audience interested in the product visually and as it relates to sound, the color palette and the choice of soundtrack will be affecting the audience in other ways as well. For example, color can easily suppress appetites, make the body physically weaker, and help in creating a positive or negative impression of a product. Colormaters.com reported that the human eye can see 7,000,000 colors, some of which can strain the eyes. Certain colors and color relationships can also be eye irritants, cause headaches, and cause mayhem with human vision. Other colors and color combinations are soothing. Consequently, the appropriate use of color can maximize productivity, minimize visual fatigue, and relax the whole body.

Sound Design
As interactivity develops, greater demands are made on different facets of the whole that were never made before. On such area is that of audio. As technology has developed, the ear of the audience has become more and more critical. From the days of “Vitaphone” in the first “talkies” to today’s Dolby 7.1 Surround Sound, creating believable audio to go along with the visual aspect has been a top priority. For the cinematic pioneers, the goal was keeping the audio in sync with the film. Now, the goal is proper recording and mixing of ADR, Foley, music, and other audio elements. As interactivity develops, realism becomes more and more the chief goal. It is very likely that audio recording and playback will begin to focus on binaural quality as media becomes more immersive. We desire to hear audio in media just as we hear audio in the world around us. And why not? If media becomes more like the real world, shouldn’t audio be at least equivalent to that? Our focus in research and development in years to come should be on making sound design modeled after the real world, because media is becoming a very real, very integrated part of our world.


text:
Talk:Non-Programmer's Tutorial for Python 2.6/The End

Object Orientation?

 * Yes, I think the last part should be an intuitive approach to classes. This book is very good for first programming contact, very intuitive and much (MUCH) more suited for beginner than Learning Python from O'reilly. Ending with a practical and intuitive class tutorial would make this perfect in my opinion.

Thanks

You are a lot more helpful than the Python tutorial!--87.244.98.145 (talk) 17:22, 30 March 2010 (UTC)


text:
Photography Equipment/DSLR Bodies

The body of a DSLR is the heart of the system, in the sense that it is the primary interface and that one generally has a single body (sometimes two), but many lenses. This is not to say that the body (or the sensor) is more important than the lens (indeed, the opposite in the case), but simply less variable.

Canon and Nikon
Both brands segment their line by price/target audience, and replace models on an approximately 2 year cycle. The entry-level DSLRs are the biggest sellers by a large margin.

The current ranges are: Notice that Canon model numbers are of the form "40D", while Nikon model numbers are of the form "D40".

For history, see table of Canon DSLRs and table of Nikon DSLRs, and glosses at Canon EOS DSLRs, Canon EOS model naming scheme and list of Nikon DSLRs.

title: Photography Equipment/DSLR Bodies


text:
Erlang Programming/Behaviors

Behaviors
In Erlang, a behavior is a design pattern implemented in a module/library. It provides functionality in a fashion similar to inheritance in object-oriented programming or interfaces in Java. A number of callback functions must be defined for each behavior to work.

Examples of behaviors are:

 * client-server
 * event-handler
 * gen-server   :gen_server
 * hot-standby
 * keep-me-alive
 * supervision-tree
 * upgrade-handler
 * worker-supervisor

A behavior can be activated with the following code (note: you can use "behavior" instead, if you feel American): -behaviour(gen_server).

title: Erlang Programming/Behaviors