CLICK HERE TO REVIEW FDI

Archive

Archive for October, 2008

Free Computer Memory Tester

October 31st, 2008

New Informal Assessments For Speaking Skill

New informal assessments for speaking skill

As an English language learner, if you ask any teacher about the best way to learn the language, the majority of them would have a consensus over the importance of speaking activities and tasks. However, when it comes to teaching in an educational context, the speaking skill would seem to be the most ignored and under-estimated compared to the other skills. Teaching a language is not just loading the students’ minds with a number of theories or rules (that are often full of clashes, confusion and exceptions). It is rather teaching them how to interact with people who speak the language and how to put what they have learned into practice. Practicing the language is actually the main keyword as far as learning languages is concerned.

According to the old system we had in the Language Centre (LC) in 1997, speaking was not really given much emphasis due to the fact that it was not included in the overall assessment. Assessing speaking might have been referred to as assessing participation in the class activities (and assigned 2 marks out of the total grade which was 100) but there was no testing events included for it (be they formal or informal test). It was only after the new (current) system was adopted in 2000 that the assessment of speaking skill has become a must. Ever since, assessing speaking has taken different formats (prepared presentations, informal chatting with the teacher…etc) till it has reached its current shape. The present format of the speaking test in level 6 (the Exit level), has evolved from its first inclusion in the End-of-block in Fall 2000 and the reason for its inclusion was to provide students with a more comprehensive exposure  to and practice with all the major language skills, particularly speaking.

In this paper, I will present some new informal assessment tools and rubrics I have specifically designed to assess the speaking skill in my own context (at level 6 which is the Exit level) and these are an informal speaking test and a presentation. A brief description of the situation (learning methods, students’ abilities, available resources…etc) will be given so as to provide a rationale for the newly designed tools. Moreover, some samples of assessment criteria and rubrics will be provided and explained. Finally, recommendations about the use of these kinds of assessment will be highlighted so as to enable other teachers (who are interested in using these tools) to use them properly.

1. Learning Goals

For us to understand the efficiency of the new informal assessments and to come up with evaluative or judgmental thoughts about them, it would really be good to go over both, the objectives of these informal assessments and the general objectives of teaching speaking claimed by the Intensive English Language Program (IELP) in the Language Centre. According to the IELP curriculum document, there is a number of general objectives for the teaching of speaking skills in the Language Centre. At the end of the IELP, students will be able to do the following:

#      Pronounce unknown words using the phonemic transcriptions prescribed dictionary.

#      Produce appropriate stress/ intonation patterns that contribute to the communicative effect of the utterance.

#      Use social communication formula in everyday classroom setting (examples determined by learning materials and program coordinators (PCs).

#      Use appropriate classroom language for questions, clarifications, suggestions…etc.

#      Initiate, maintain and close a conversation of an academic nature.

#     Express and ask for opinion in academic context.

#      Express agreement/disagreement, giving supporting reasons, in academic contexts.

#      Present a talk of an academic nature lasting up to 8 minutes using own notes and aids.

Based on the above mentioned information, I have designed two informal assessments each of which has objectives that match with and help to fulfill the general objectives of IELP. These assessments are:

A. An informal speaking test: it consists of two parts one of which requires students to describe a picture and the other one requires them to speak on a given topic. Part one will assess the students’ ability to improvise and produce organized connected speech. Students will be expected to go beyond a mere description and or narration. They will describe, give detailed information, give reasons, talk on one’s point of view and agree or disagree on the topic or situation shown by the picture. The facilitator (one of the testers) will use prompts to stimulate the student to express opinion and speculate. Part two on the other hand, will assess the students’ ability to speak on a given topic expressing their points of view while interacting with a student or teacher partner answering and in turn asking questions. The teacher/student partner will need to ask questions from the main speaker and the speaker in turn is able to respond suitably to the questions. In short, interaction will be encouraged during this part. In this level (level 6), the students will be assessed in pairs, that is, two candidates will be assessed by two teachers. (A brief summary on how these two tests are conducted will be given later in section 3).

B. A presentation: it is based on data obtained from out of class reading, or from a questionnaire, or from other sources. (The sources must be provided, and the presentation should have substantial written notes to support the talk. In other words, a quick stand-up talk on something rather cursorily prepared will not suffice). This component has to be taken seriously and students should realize that poor quality or rushed work that does not meet the defined criteria will be given a low mark. The mark for this component should reflect the amount of individual effort they put into their studies or research.

Teachers should check with previous class teachers, or with the student profile, to see what students have done in previous courses so that there is no repetition of either content or of a task, i.e. at each level, the students should work on a different kind of task.

2. Setting/Scene

At present, the main delivery mode for our courses is the conventional classroom setting, with one teacher and around 25 students. Students have 20 contact hours per week in this setting, 4 hours per day. In addition, they are expected to work on their own, making use of computer labs, of teachers’ office hours (every teacher has 10 office hours per week), the reading room resources (which contains so many sets of stories, novels, books, audio and video materials), and carrying out the normal assignment tasks set by the teachers. With an increasing use of computer-delivered learning materials and accompanying tasks, accessed by students from a range of venues around campus or outside, this pattern may well change. Also, with varying class size according to the type of language skills being practiced, for example smaller groups for speaking and writing skills, this dominant learning will no doubt change. Also, since the kind of approaches adopted in the language Centre are communicative in nature, more emphasis has been given to the teaching of speaking skills. It is assigned 4 hours per week plus the fact that it is integrated in the teaching of all the other skills i.e. in reading, writing and listening, there is always some time allocated for discussions be they free, guided or controlled.

Also, at the present, teachers and students alike have classroom contact for four hours per day. In this context, I would like to stress the following aspects of teaching/ learning complex:

Motivation: Students are motivated by a range of factors, some internal and some external, but it is clear that the teacher, and the way that s/he presents learning materials to the class, encourages practice and study and provides personal support and encouragement to individuals, can have an influence on the motivation of students. A common complaint from students is that lessons or the materials are “boring”, which may be a cover for all kinds of hidden emotions and attitudes, but which teachers need to be aware of. Members of the Curriculum Development Unit (CDU) have tried to select materials which are stimulating to the students and which generally widen their knowledge horizons as well as develop their English language skills, but it is not possible to ensure that all students have the same level of interest. Therefore, the teachers have a certain responsibility to try and maintain a level of student interest and to provide sufficient variety in their lessons and procedures to help sustain motivation in the classroom.

Variety: As indicated above, teachers are encouraged to provide variety in the classroom, of activity types, of modes of presentation, of informal assessment procedures, of extra support materials, and so on, to maintain interest and to stimulate students. Teachers are also encouraged to share their teaching ideas with colleagues and with their line manager to continually develop the curriculum.

Differences in levels: Generally speaking, the lower the level of competence of the students, the more they need the presence and support of the teacher. Thus, teachers at lower levels are expected to create an active, positive classroom, with variety of activity, o f learning mode, and of skill focus, whereas at the higher levels (like in level 6), lessons may be more focused on one skill and would possibly spend more time on students’ individual work. Students at the lower levels need to develop all skills, but there will be an emphasis on communication skills and on confidence-building in English. In general, students in level 6 are advanced users of the language and they are about to exit the IELP and start their studies in their respective colleges where English language is the medium of instructions.

Methodology: Levels 5 and 6 (the last two levels in the IELP) can be considered as a continuum, in that all students will do both courses and the emphasis is predominantly on developing language and communication skills, rather than language per se. Level 6 also sees the introduction of more listening and reading texts related to the four main content areas of Science, Medicine, Commerce and English. Teachers will still need to provide occasional input lessons on points of grammar that the students either don’t know or having particular problems with. Their writing will also reveal areas of weakness in grammar which will need to be reinforced.

The textbook provided, especially in terms of reading and speaking, are bare minimum, and the expectation is that students should be provided with considerably more speaking and reading materials ranging from readers to articles from newspapers or journals or internet sources.

This level (6) also sees the continuation of the process begun in level 5, whereby students are encouraged to take on more responsibility for their own learning. This is apparent not just from easily observable and measurable features such as organized files of paper, and a continuing portfolio of their work, including independent study work, but, I hope, in their attitudes and in their readiness to undertake assignments and homework tasks, as well as in their attempts to maximize learning opportunities available to them. I don’t want to be too idealistic and have unrealistic expectations of student behavior, but they do need encouragement of teachers to develop and improve their learning. Students leaving this level are deemed to be ‘ready’ for academic study in English, and although we all in the Language Centre feel that their linguistic level is not as high as everyone would like, it is our responsibility to do what we can to help the students acquire the relevant study skills and attitudes that they will need. This should be an accumulative process, so that it is not just something they learn in their final level of English.

3. Description of the Two Assessments

A very brief description of the two assessments and what kind of abilities they are meant to measure has been given in section 3. Providing a description of the assessments only will not really give a comprehensive view about them. However, describing how each of the assessment is carried out would be of a great help especially if someone becomes interested in replicating these assessments in his/her own context. In this section, a detailed description of how the informal speaking test is conducted would be highlighted. As for the presentation, a brief description would be provided due to the fact that it is very simple and straight forward. It also does not involve so many procedures like the informal test and it is marked by one teacher only (the one who teaches the core subject).

A. The Informal Speaking Test

Candidates will be tested in pairs at level 6. Two teachers will be involved in the process of assessment. The class teacher is the facilitator and will use the pictures and the topics to facilitate the students to speak. The facilitator will also assess the students. The second teacher (who does not teach the class and whose main job is not to interact but to listen to students throughout the test) will be the Main Assessor or Marker. Marks will be entered for each candidate separately by the two teachers, and in case of discrepancies an agreement will be reached immediately after each candidate or pair is tested. The Main Marker will decide on the final agreed mark. Test one will start with some introductory questions.

Examiners should introduce themselves using their first name and get to know the first names of the candidates. They should make sure that the names of the candidate/s and ID number printed on the mark sheet match each other. Students are not marked here but the examiners will listen carefully to the students).

The facilitator will hand the picture to the student and will give a minute to prepare. The pictures will be numbered and given to the students in order, starting from the first. The facilitator will use the cues on the card, only if necessary, to stimulate a student to speak if the language produced by the students is not sufficient to allocate a mark. In this level (6), the student is expected to speak sufficiently to communicate to the student partner the topic or the situation shown in the picture. After about a minute, the second student has to express his/her opinion agreeing or disagreeing with what the partner expressed, using about twenty seconds.

The facilitator will use a prompt only if the examiners feel that they are unable to allocate a mark or if s/he feels that the candidate is capable of producing more complex language with the help of prompts. As each student finishes speaking, both the facilitator and the main marker will write down the scores in the mark sheets using the Criteria (see section 4). They have to agree on a mark before the next pair of students is called in for the test.

Students will be tested in pairs. The facilitator will give the topic to the first student and then give 30 seconds preparation time and ask the students to speak to each other on the topic. The student who has the topic will speak for about a minute and the second student will ask questions on issues raised in the topic. The first speaker will respond appropriately to the questions.

Once sufficient interaction has taken place to assess the first speaker, the next topic will be given to the second student. The procedure will be repeated. Once both students have completed their tests, the marker can fine tune the scores and write the marks down using the criteria. The facilitator should make sure that the student who spoke second in Test 1 is given the topic for Test 2, first.

B. Presentation

All students in level 6 are required to give a prepared talk of 8 minutes in front of all the class. It is the Testing Unit’s responsibility to assign a number of topics for each class (most of the topics are scientific, commercial, or artistic in nature depending on the program they would be used in). Then, it is the teacher who is to arrange the distribution of these topics on his/her students (by allowing them to choose and/or by assigning the topics him/herself). Students are usually given their topics by the end of week 1 (each level lasts for 8 weeks) so as to allow them enough time to search for information related to their topics and to prepare themselves physically and psychologically for the presentation. They are expected to work on their presentation for 5 weeks and part of the job is seeing the teacher, consulting him/her and asking for help and/or advice. Students are encouraged to work together, cooperate and comment on each other’s work. They are also asked to rehearse their presentations in front of their colleagues outside of the classroom.

The mark of the presentation is split into two halves one of which is allocated for the preparation (collecting the information, organizing the facts, preparing the outlines, preparing the OHTs…etc) and the other is allocated for the actual presentation and these two marks are given separately (one before the presentation and the other after). This is done to ensure that students take the presentation seriously and feel they are under some pressure to finish the work on time and to meet the expectations and the requirements of the presentations (students are provided with a very detailed explanation of what the presentation should look like, what they are expected to do, the marking criteria and rubrics, and also some guidelines on how to do a good presentation. Moreover, students are provided with some video-taped sample presentations which are accessible on line). Finally, students give their presentations individually and they are marked according their performance. (For more information on the assessment of the presentation, see section 4).

4. Samples of the Rubrics and Assessment Criteria

This section provides some samples of the assessment criteria and rubrics for the two informal assessments that have been explained in the previous sections.

A. Assessment criteria for the Informal Speaking Test

These are based on the 5 points under Delivery on the Assessment Sheet above

Level 6 Guidelines for the Oral Delivery:

Each student should enjoy giving their talk, keep a good pace, be clear, and make eye contact with the class.

1. Overall Organization:

#      Students should feel comfortable using the OHP; they should decide where they are going to stand and where they are going to prompt cards and transparencies.

#     The introduction and progression of the talk must be clear.

#     If the student asks questions during the actual talk, s/he must know when to stop the interruption and draw attention back to the talk itself.

#    The pace is decided by the above points and, in fact, by all the points under Delivery on the assessment sheet in the previous page.

#     Students should aim to speak within the time limit. Ideal timing is 8 minutes. But student must aim to speak for between 7 mins 30 secs and 9 mins. Presentations that are shorter than 7 mins 30 secs and longer than 9 mins will have a reduced mark.

2. Fluency:

Memorization is common practice. It can affect the pace and clarity of the talk. However, these problems can be avoided:

#     Students should make an effort to speak normally i.e. clearly and with expression, and also make good eye contact.

#     A good outline functions as memory aid and so cue cards.

#      Reading is not acceptable because it allows the class to lose interest in the talk and reading does not represent a presentation.

#    Hesitation is one effect of nervousness. Students should practice their presentation several times before the day of the presentation to avoid this problem.

3. Clarity of speech and expression:

#     It is very important to speak to the audience. You are telling them something, which is important to you: speak slowly and with expression, and keep eye contact.

4. Language Use:

Students should try to use language as accurately as possible. However, the main aim should be to communicate clearly so that the audience can understand and follow the presentation.

5. Class involvement:

Students should try to present their topic in a confident manner. This means keeping the audience’s interest. One way of doing this is to be attentive to all of the audience.

5. My reflection

It is really difficult to make judgments about a plan until it has been piloted and tested. The results of the implementation will provide a clear idea of whether the plan was good or not for the particular reason it was designed for. It will also highlight some of the problems and the weak areas that need to be worked on or considered in a later implementation. As a pre-judgmental statement about my plan, I would say that I am happy with it (May be with the way it looksJ). I have tried my best to incorporate most of the speaking goals into my assessment plan. I have also made use of the previous system in that I looked at the problems that existed there and tried to avoid them and/or find some possible solutions for them. Communicative approach has been considered in the new assessment plans in that the topics and the photos used in the speaking tests are actually from the students’ daily life and/or they are related to the their field of study (Majors). Moreover, the presentation does not only integrate the speaking skill in all the other subjects taught in the course (because students keep talking and discussing their presentations with their colleagues all the time), but it also extends the use of this skill (speaking) to the outside of the classroom and even into the students’ free time.

I still believe however that there is no perfect plan and there is always space for improvement. Teachers and colleagues can use this plan, comment on it and even modify it to suit their own purposes and contexts. I would really appreciate any sort of comments, additions, or modifications provided by my colleagues because as a single designer of the instrument, it would really be impossible for me to look at it from different angles and to consider the different aspects of assessment involved. However, involving my colleagues would provide a more comprehensive judgment that would, for sure, contribute to the development of this plan. As for the implantation of the two assessments, teachers would be provided with detailed instructions on how to conduct the test and that would eliminate any kind of confusion and would familiarize them with it.

References:

1. IELP Curriculum Document Book, The Language Centre, Sultan Qaboos University

About the Author

Rashid Al Maamari

BA in English for English Specialists from Sultan Qaboos University (2001)

MA in ESP from the University of Warwick (2003)

Teaching English Language in the Language Centre at Sultan Qaboos University since 2001

Office Tel: +968 24142854

Mobile: +968 99378100

E-mail: rashidm@squ.edu.om




 Mail this post

Technorati Tags: , , , ,

How To Improve Memory , , , ,

Memory Games For Seniors Free

October 30th, 2008

memory games for seniors free

Got Too Much Happiness?

Got Too Much Happiness?

Speed Read

Don’t you hate when writers use maxims and proverbs you never heard of?
It makes me feel guilty for my ignorance, and forces me to Google it up for
details. So here goes.

“As a man imagines himself to be, so shall he be, and is that which he imagines.” Paracelsus, 15th century physician.

So I look him up, and they refer me to a psychology website that explains what he means. Ah Ha. When we think of ourselves as smart, we begin act, think, and feel smarter. It was first doped out by Professor William James, in 1898 at Harvard Medical School, and is called the As-If theory.

If you act As-If you are smarter than you are, richer, happier, or better than you typically have been, for an entire day for 21 days (minimum), it becomes a habit
picked up by your subconscious mind, and becomes real for you.

After someone pays you a compliment for knowing or doing something special, you get a rush of brain endorphins (pleasure hormones). These brain chemicals make you strand straighter and taller, and walk with a bounce in your step (like my first pair of Keds sneakers).

There is more. Paint a mental image in your mind of you being the go-to-guy/gal,
and your complexion improves because you begin to breathe deeply, rushing blood
to your face and a smile to your face. People around you notice it, and want to crown you King of the office. Secret: Whatever is reinforced – improves.

Killer

Your skeletal structure, muscle tone, and facial expressions, and body language
almost immediately begin to reflect your new mental imagery. You look slimmer, move quicker, and even think sharper. How come?

Get this. Mental rehearsal is equal to physical practice. Your brain makes no distinction between what you practice in your three-pound coconut as mental
imagery, and live practice in the field for hours and hours. Huh?

Tiger Woods says he sits in a comfortable chair and meditates for 40 minutes before playing a round of golf, and mentally sees himself sinking the ball and winning each individual hole in his mind first.

Creepy

It applies to all sports, selling, and winning promotions at school or the workplace. How come you never heard of it? Americans do not know how to relax, and think
there is something creepy about closing your eyes when not in bed, and meditating.

What else? We are too busy watching mindless reality tv shows. It takes active effort, not gossiping about doing it to install As-If learning.

You must disrupt your comfort zone from the routine, status quo and homeostasis, to acting As-If you already are whatever you really desire to become. Hey, if it was
easy, everyone would be a millionaire and king of the mountain. Here is the key, you
open the lock.

When

Practice whatever you want to become mentally, before falling asleep (hypnagogic),
prior to waking (hypnopompic), when daydreaming, in your dreams, and during
meditating. As-If works only if you spend at least 30 minutes daily shifting your
mental image to winning, from your consciousness to your subconscious mind.

Google: Stephen Kosslyn, Harvard University. On mental imagery and perception

Using Your 3 Pound Coconut

They tested 2,832 folks, and followed up for one-year, and five-year intervals.
You know the cliché – use it or lose it, but you don’t really believe it, right?
We – you and me - consider exercise pushing away from the plate – and a walk
in the park, an intrusion on our patriotic duty to be lazy and not sweaty.

Personally I hate chess – wouldn’t learn the moves unless they held a revolver…
never saw a crossword puzzle that called my name, and still expect to live to age 93
with all my senses, just like my mom.

The Journal of Gerontology (aging), March, 2009 published some deep research out of the University of Iowa, lead author, Dr. Fred Wolinsky that contradicts your humble servant – me.

The original scientific research was to show that computer games (brain exercises)
would improve the smarts (cognitive abilities) of senior citizens. Surprise, age aint
got nothing to do with brain power; if you use your brain daily by practice these
computer games, you win the cognitive abilities contest.

Some brain specialists call it Cognitive Reserve, propping up your brain to avoid Alz, and maybe even live up to 10 years longer. Learning enhances your self-image and makes you feel better, which is important at all stages of your longevity, right?

Results

What were they measuring? Visual speed, accuracy, and improved processing
(comprehension). Did it improve beyond the expected and the control? By
a statistically significant margin, beyond expected results. Use it and you don’t
lose it, right?

Now the same scientific researchers come back to the same 2,036 folks to see if
improving your cognitive abilities by these fun and games computerized exercises,
did anything else worthwhile for the senior citizens.

Depression

Older folks are susceptible to depression more than when they were at 25-50. No Nobel Prize for that one, it is conventional wisdom. The reasons for the elderly to be
depressed include the state of their health, finances, relationships, and the weather .

Surprise – those who consistently used their brains on mental games were thirty (30%) percent less likely to be depressed that the tv watchers. Learning and thinking seem to make you happier as a side effect. Your mood is elevated, even
on the escalator.

The experts used all the specialized testing tools for depressive symptoms, and concluded these computer-based exercises offered protection after they finished
the 10 hour program.

The reasons may be that the participants felt good about themselves because they
aced the exercises (like a test). They had a new self-image as being a smarty-pants,
and wanted to keep living to lord it over the dummies.

Other scientists say the computer program excited their brain chemicals system.
All their efforts activated their Pre-Frontal Cortex, et al. and elevated their
mood. Anyway, it had long term results to date; and without drugs and their nasty side effects. Google: amygdala (emotions).

How much is improved quality of life worth to you? They got it as an unintended
consequence, so lifelong learning is a nice prescription for longevity without dementia, huh?

Endwords

If you want to grow up to be a big kid with all your marbles, and live to …maybe
one-hundred, be a lifelong learner. We think reading is the winner – twelve months
a year.

If you could read three (3) books, articles and reports in the time it presently
takes you to read one, would that be nice? And it might even improve your mood,
state of mind, and memory.

Ask us how to triple your reading speed with improve comprehension, and double
your long-term memory. Yes, we’re serious, and have been delivering the goods since 1959. It is baby-easy to learn at home, and is the gift that keeps on giving.

See ya,

Speed Read

copyright © 2009
H. Bernard Wechsler
www.speedlearning.org
hbw@speedlearning.org toll-free 1-877-567-2500

About the Author

Author of Speed Reading For Professionals, published by Barron’s.
Business partner of Evelyn Wood, creator of speed reading, graduating
2 million, including the White House staffs of four U.S. Presidents.




 Mail this post

Technorati Tags: , , , ,

How To Improve Memory , , , ,

Memory Leak Detection C++

October 30th, 2008

Coverity Introduces New Code Analysis Capabilities for Multi-threaded Applications

Coverity, the leader in improving software quality and security automatically, has introduced a sophisticated new concurrency defect detection capabilities in Coverity Prevent™, the company’s flagship static code analysis solution for C/C++ and Java. This new technology introduces the first static defect detection of race conditions, one of the most difficult to find concurrency errors that occurs in multi-threaded applications. This new capability will benefit developers by automatically identifying race conditions in addition to other concurrency defects early in the development cycle where they are most cost effective to eliminate.

“To remain competitive, software companies need to support multi-core hardware, which will make multi-threaded applications inevitable for most developers,” said Theresa Lanowitz, founder of Voke, a technology analyst firm. “The challenge for developers is that multi-threaded applications add complexity to the application lifecycle, requiring new expertise and technology to maintain application quality and security.”

Race condition defects have been responsible for some of the most notorious failures in software. For example, race conditions in the software of the Therac-25 radiation therapy machine were cited as contributing to the death of five patients. Race conditions were also a contributing factor in the North American Blackout of August 2003, during which 50 million people lost power.

The advent of multi-core hardware, whether computers from vendors such as AMD or Intel, or consumer goods such as the Sony PlayStation 3, are driving the emergence of multi-threaded software applications that are susceptible to race condition defects. To take advantage of multi-core hardware requires new, multi-threaded applications that can simultaneously execute multiple, interacting computational tasks.

Designing multi-threaded applications is highly complex, and introduces a new class of potential application failures when the intricacies of concurrently running threads are not handled properly. To date, testing for concurrency defects such as race conditions has been extremely difficult due to the complexity in run-time environments where multiple threads execute simultaneously while accessing shared memory.

The latest release of Coverity Prevent introduces a new interface designed specifically to help developers understand the complex interleavings that exist within their multi-threaded applications. New advanced analysis capabilities in Prevent provide analysis of 100% of these interleavings, delivering unmatched insight into complex code bases.

Coverity Prevent helps developers control the complexity of multi-threaded applications by automatically identifying these hard-to-find, often crash-causing concurrency defects such as:

• Race Condition – Multiple threads access the same shared data without the appropriate locks to protect access points. When this defect occurs, one thread may inadvertently overwrite data used by another thread, leading to both loss of information and data corruption.


• Deadlock – Two or more threads wait for a lock in a circular chain such that the locks can never be acquired. When this defect occurs, the entire software system may halt, as none of the threads can either proceed along their current execution paths or exit.

• Thread Block – A thread calls a long-running operation while holding a lock thereby preventing the progress of other threads. When this defect occurs, application performance can drop dramatically due to a single bottleneck for all threads.

“Coverity has been helping our customers eliminate concurrency defects in multi-threaded applications for years, and we’re excited to expand those capabilities by adding race conditions to the list of dangerous defects we identify,” said Ben Chelf, chief technology officer of Coverity. “Race conditions are particularly difficult for developers because they are hard to test for, nearly impossible to replicate, and the consequence of a race condition in the field can be disastrous – Coverity’s new technology overcomes all of these challenges and helps developers eliminate this painful defect type.”

A new white paper available explains more about Coverity’s breakthrough application of static analysis to detect race conditions. The paper is available in for download at: http://www.coverity.com/html/library.php

About the Author

Coverity is a software engineering company that provides automated source code analysis tools to improve the software development process. Coverity’s advanced technology helps companies deliver the most reliable and secure software possible.


Hardware design has always been considered a difficult task, requiring significant investments in automation and verification. But the idea that building software is equally difficult has only recently gained credibility. Coverity meets that insight by providing automated tools that enable software developers to quickly, thoroughly, and accurately analyze their source code early in the development process.


These tools enable software developers to pinpoint defects that could cause catastrophic failures or security breaches. Coverity Prevent™ and Coverity Extend™ help software companies build better products, decrease time-to-market, and decrease risks




 Mail this post

Technorati Tags: , , , , , , ,

How To Improve Memory , , , , , , ,

Memory Doctor Download

October 29th, 2008

memory doctor download
putting a program onto a data memory stick?

hi all a quick question for you if i downloaded a program say spyware doctor (payed for )for my pc it gives you the option run/save/cancel i normally select run which ov course runs the program and automaticly saves to my pc but say i wanted to give the program or any program to someone else say my son or a friend .could i down load a program opted for save and save to my desk top could i then put a data stick into my usb and cut and paste from my desk top to the data stick then remove the stick and place into someone Else’s pc cut and paste to there desk top so i can open and run the program would it load and work on there pc ( im basically wanting to know how to put a program onto a data stick so i can let someone else use the program to remove a virus

you cannot do it. Because a memeory stik or pen drive is not for installing a software. If you are installing a program, computer asking for a location where it wants to install. But in background some other things are happening there…some small instructions are added to your system registery. ( i dont know how much you are familier with system registery). Better you copy the entire file your have downloaded into the pen drive or memory stick and install in someones computer. I think spyware doctor, if it is a paid version…. you can install and update in three computers, ( probably there may be oinly one file called ” spywaredoctor.exe” something like that).




 Mail this post

Technorati Tags: , , , ,

How To Improve Memory , , , ,

Memory Duo

October 28th, 2008

memory duo

Samsung D880 Duos: in Depth Review

At first glance, the Samsung D880 Duos does not catch the eye.  In a day and age where phones are equipped with 5- Mega Pixel cameras, GPS, Wi-Fi, music players, and absurd amounts of memory, what does the D880 have that distinguishes itself from the rest of the crowd? Now, you probably either see the plus points of this dual-SIM arrangement straight away, or you don’t. Just in case you don’t - the advantage is that one phone can act as a home or business device, or perhaps the second SIM card can be on a network from a different country that you visit often, or perhaps the tariff on one SIM card is designed for data and the other for voice.

Further, the phone has an amazing interface that allows the user to easily select which card to use for mobile browsing, e-mail and other multimedia services. Your WAP/MMS/E-mail profiles are switched automatically when different card is selected.

When you receive the call, the name of the card that for the call flashes on screen and each SIM card can be assigned it’s own ring tone. In case of missed calls, the relevant card is also indicated. Except for the dual SIM cards, the Samsung D880 Duos is your ordinary 2.5G Samsung slider, almost identical to the Samsung D900, but Tri-Band. The phone is equipped with a 3.2 Mega Pixel camera, and at 18.9 mms thick, it is clear the style was not compromised to build in this convenient feature.

The phone itself is not cheap, at around 300 dollars, but considering the benefits that a Dual SIM phone could bring you in the long-run:  lower rates when traveling internationally, added pocket space, the ability to have a work (public) and personal (private) number, as well as the ability to assume multiple identities- there is no doubt that the Samsung D880 Duos is worth the price. 

The phone can be purchased here: http://www.cellswholesale.com/Samsung-D880-Duos,C,623/

 

About the Author

Justin Yoshimura is the President of CellsWholesale.com, and has been in the mobile phone industry for four years. CellsWholesale.com is established as an industry leader in the Unlocked GSM Cell Phone marketplace.

Anemonen Duo I by Frauke Meszaros 9.00X4.50. Art Poster Print Anemonen Duo I by Frauke Meszaros 9.00X4.50. Art Poster Print

Anemonen Duo I by Frauke Meszaros 9.00 inches width X 4.50 inches height.Printed on Fine Art Paper, Thicker and Nicer Finish. This item is a higher quality reproduction than a typical poster.Museum quality fine-art print, printed on high quality archival acid free paper. Most prints are on a thick (120 pound or higher) stock of paper. Each print is of the highest museum art print reproduction qual...
Autumn Duo by Jo Moulton 12.00X12.00. Art Poster Print Autumn Duo by Jo Moulton 12.00X12.00. Art Poster Print

Autumn Duo by Jo Moulton 12.00 inches width X 12.00 inches height.Printed on Fine Art Paper, Thicker and Nicer Finish. This item is a higher quality reproduction than a typical poster.Museum quality fine-art print, printed on high quality archival acid free paper. Most prints are on a thick (120 pound or higher) stock of paper. Each print is of the highest museum art print reproduction quality and...
BAMBUS DUO II by MICHAEL FERNER. Size 39.00 X 13.50 Art Poster Print BAMBUS DUO II by MICHAEL FERNER. Size 39.00 X 13.50 Art Poster Print

BAMBUS DUO II by MICHAEL FERNER.Total Size : 39.00 inches width by 13.50 inches height.This is the Highest Quality Art Print Reproduction of the Original Work. Fully Authorized by the Artist. OnlineWall is the worlds best quality art print, poster and framing store with over 25 years custom framing experience our quality of art prints cannot be beat ....
Precious Memories Precious Memories

...
Diamond: Vol.5-Rounds/Adagio/Concert Piece For Orchestra/Elegy/Concert Piece For Flute And Harp Diamond: Vol.5-Rounds/Adagio/Concert Piece For Orchestra/Elegy/Concert Piece For Flute And Harp
$15.98

...
Chamber Music Chamber Music
$19.98

...
Mastro Duo Multi Location Smart Dimmer W/Smart Remote (MAW-603RH-LA) Mastro Duo Multi Location Smart Dimmer W/Smart Remote (MAW-603RH-LA)
$72.59

Sold as each. 600W. 3-way. Includes one multi location dimmer, one remote dimmer and two Claro single gang designer wallplates. Full function 3-way dimming from remote dimmer. LED's show light level: glow softly as night light. One tap brings lights on to preset level. Two taps bring lights to full brightness. Press and hold to slowly fade to off. Power failure memory. RFI suppression. Indoor use ...
Heroic Duo Heroic Duo
$2.34

Tough cop Ken Li (Cheng) is at the top of his game, but he's going to need some help to solve a grisly crime that the offender, a respected police officer, doesn't even remember committing. He seeks out Jack Lai (Lai), a former psychologist now in disgrace and behind bars, who has an uncanny ability to bend people to his will. Making an uneasy truce, this unconventional pair set out on a mission t...
Heroic Duo Heroic Duo
$2.22

Studio: Genius Products Inc Release Date: 06/27/2006...
Matrix Shade.memory Rich Brunettes Shampoo/conditioner Duo - LARGER TRAVEL SIZE - 4.2 Oz. Ea. Matrix Shade.memory Rich Brunettes Shampoo/conditioner Duo - LARGER TRAVEL SIZE - 4.2 Oz. Ea.

MATRIX SHADE MEMORY RICH BRUNETTES SHAMPOO/CONDITIONER DUO MATRIX SHADE MEMORY RICH BRUNETTES SHAMPOO Matrix Rich Brunettes Shampoo with an ingredient memory pod of nourishing Panthenol, moisturizing Shea Butter and high-shine oil. Gently cleanses away dulling residue to reveal the radiance of Salon Brunettes. Nourishes hair, leaving it lush, silky and luminous. Non color-depositing. MATRIX SHA...




 Mail this post

Technorati Tags: , , , , , , , , ,

How To Improve Memory , , , , , , , , ,

Memory Recording Unit Sony

October 26th, 2008

memory recording unit sony
Recording from Digital Handy cam to Computer?

I have a Sony DCR-PC115E camcorder. When I got the unit it did not come with any software CD. I have quite a number of videos on the Mini DV cassette and I want to transfer them to my computer. Need information on what wires to use. Tried using the USB cable but it only detects my memory card. Anything else that I can do?

well, just check if you have a firewire port on your camera or something like IEEE1394 written. if yes, you would need to get a cable that connects that port to your computer’s USB (or firewire if you have the latest motherboard).

Now once you are connected, you need to put your camera in the VCR mode.

Once that is also done, open an application like the Microsoft Movie Maker. and go to the File>Capture Video Option

Now, if your camera was detected by the computer [mine does, without the drivers] the Movie Maker will take you to the next page, where you can decide on the quality and start recording!

I hope this helps.

Hvrmrc1k Mem Recording Unit Hvrmrc1k Mem Recording Unit
$799.95

The Sony HVR-MRC1K captures the HDV, DVCAM, or DV stream output from the camcorder and allows users to record HDV/DVCAM/DV files to a standard Compact Flash solid-state memory card, while simultaneously recording to tape. Extremely compact and lightweight, the HVR-MRC1K can be attached directly onto the new HVR-Z5U without cabling, converting the camcorder to a tape and memory 'Hybrid' recording s...




 Mail this post

Technorati Tags: , , , ,

How To Improve Memory , , , ,

Memory Interface Wiki

October 25th, 2008

memory interface wiki

REG file parser using the Boost Spirit Parser Framework

Testimonials

I would like to thank the people who developed the following projects - they made the implementation of this project easier:

  • Boost:
    • Spirit Parser Framework
    • Program options
    • Pool library
    • Testing Framework
    • Other Utils: Bind, Function, Scope Exit, String Algorithms Library

I want to say a personal thank you to Silviu Simen for his article “INI file reader using the Spirit library”.

Background and history of this task

There was a project in which I took part and we needed to test the working of a parser for Windows hive Registry files. These files are stored in binary representation and the structure of such a file is not documented by Microsoft. But, by means of research, my colleagues managed to clear out this structure, and after that, the question of verifying the parser work appeared.

To perform testing, I decided to use the functionality of exporting of Registry in two formats: hive and reg. Thus, I could obtain two different files for the same Registry key and after that check the working of the Windows hive Registry file parser.

The structure of the Registry file - I’ll give an example below - is very similar to the structure of the ini file, so you can use standard Windows functions for reading values in this file. But the problem is that, functions work very slow for big files, and that is why this parser was developed - a parser for reg files where I use the Boost Spirit Parser Framework. The reasons why standard Windows functions are slow will be considered below in this article.

What is a reg file?

Let’s consider the general view of a reg file structure first, and some special complicated cases will be considered as necessary.

I’ve taken the following material from here http://en.wikipedia.org/wiki/Windows_Registry.

.REG files (also known as Registration entries) are text-based human-readable files for storing portions of the Registry. On Windows 2000 and later NT-based Operating Systems, they contain the string Windows Registry Editor Version 5.00 at the beginning and are Unicode-based. On Windows 9x and NT 4.0 systems, they contain the string REGEDIT4 and are ANSI-based. Windows 9x format .REG files are compatible with Windows 2000 and later NT-based systems. The Registry Editor on Windows on these systems also supports exporting .REG files in Windows 9x/NT format. Data is stored in .REG files in the following syntax:

[<Hive Name><Key Name><Subkey Name>]


“Value Name”=<Value type>:<Value data>

Example 1 (different types):

[HKEY_LOCAL_MACHINESOFTWAREMicrosoft]


“Value A”=”<String value data>”


“Value B”=hex:<Binary data>


“Value C”=dword:<DWORD value integer>


“Value D”=hex(7):<Multi-string value data>




“Value E”=hex(2):<Expandable string value data>

Example 2 (real):

[HKEY_CURRENT_USERKey]


“Value string”=”B”


“Value dword”=dword:00000001


“Value hard”=hex(1000800c):53,00,65,00,72,00,76,00,69,00,63,00,65,00,53,00,


74,00,61,00,72,00,74,00,54,00,79,00,70,00,65,00,00,00,4d,00,61,00,78,00,44

Making a little digression, I want to stress that the number in the line ” hex(1000800c) ” is the type identifier and it can be anything. It’s often used as the data in the security branch [HKEY_LOCAL_MACHINESAM].

And now, let’s try to extend the information about the possible contents of the reg file. Here, I represent some facts obtained during our research process:

1) Key Name may consist of alphabetical symbols and ” , , [ , ].


2) Number of values of one key can be from 0 to infinite


3) Value Name can be:


- symbol ‘@’ - it means default


- “text” - any symbols can be in this “text”


even these ones: n , ” , , [ , ]


but it always ends with “n symbols in sequence


4) Value data can be:


- “text” - any symbols can be in this “text”


but it always ends with ” and n in sequence


- binary:


- dword:XX


- hex:XX


- hex(N):XX


Comments:


XX can be the pairs of number symbols separated by comas and


it can end with ” symbol that means that


data continue in the next line


Example:


dword:72,…,00,


00,..,20

Two approaches and their comparison

As it was mentioned, the structures of reg files and ini files are quite the same, so I started to search for methods for working with ini files. I found the standard Windows functions.

Using the Windows API functions

Windows gives a lot of functions to work with INI files; we are interested in two of them for our task:

  • GetPrivateProfileSectionNames<link>: Retrieves the names of all the sections in an initialization file.
  • GetPrivateProfileSection<link>: Retrieves all the keys and values for the specified section of an initialization file.

So, we should call GetPrivateProfileSectionNames one time to obtain the list of keys and then call GetPrivateProfileSection to obtain the values inside the keys.

The problem is that if the file is quite big, i.e., there are a lot of keys in it, then we should call GetPrivateProfileSection several times to read from the file. Here is some row test data: file size: 30 MB, file includes about 30,000 keys, the parsing of this file takes about 20 minutes. And, I should say that reg files are often bigger than 100 MB.

So, the problem:

Unjustified number of readings from the file.

Solution:

It’s necessary to load the file to the memory at one time or in some parts and then parse its content using your own tools.

Using a custom parser

When parsing a reg file content using your our own tools, it’s good idea to use already developed work. Thus, I came across the article about the ini file reader using the Spirit library. Using the example of the ini file parser, I developed my reg file parser.

Why boost::spirit ?

The Spirit Parser Framework is an object oriented recursive descent parser generator framework implemented using template metaprogramming techniques. Expression templates allow users to approximate the syntax of Extended Backus Naur Form (EBNF) completely in C++.

I was also attracted by these factors:

  1. There are no intermediate conversions to some code needed, and also no external applications except for the compiler.
  2. You need to include only two header files and no libraries to use the Spirit Parser Framework.

Useful links:

Fleeting glance on boost::spirit

The main idea of using boost::spirit is in using the rules. Usually, several basic rules are defined, and then other rules are defined by means of overridden operators as a combinations of basic rules. The following example shows the creation of rules using “AND” and “NOT” operators:

RuleType simpleRule = ~ch_t(’A') &amp; ~ch_t(’B');

This rule works for any symbol except for ‘A’ and ‘B’.

Below in this article, each rule will be described in detail, but now, I want to give some quick information about possible operators - to let you imagine what the possible operations with the rules are.

Set operators:


a | b Union Match a or b. Also referred to as alternative


a &amp; b Intersection Match a and b


a - b Difference Match a but not b. If both match and b’s matched text


is shorter than a’s matched text, a successful


match is made


a ^ b XOR Match a or b, but not both




Sequencing Operators:


a >> b Sequence Match a and b in sequence


a &amp;&amp; b Sequential-and Sequential-and. Same as above,


match a and b in sequence


a || b Sequential-or Match a or b in sequence




Optional and Loops:


*a - Match a zero (0) or more times


+a - Match a one (1) or more times


!a - Match a zero (0) or one (1) time


a % b - Match a list of one or more repetitions


of a separated by occurrences of b.


This is the same as a >> *(b >> a).


Note that a must not also match b




Single character parsers:


anychar_p Matches any single character


(including the null terminator: ‘’)


alnum_p Matches alpha-numeric characters


alpha_p Matches alphabetic characters


blank_p Matches spaces or tabs


cntrl_p Matches control characters


digit_p Matches numeric digits


graph_p Matches non-space printing characters


lower_p Matches lower case letters


print_p Matches printable characters


punct_p Matches punctuation symbols


space_p Matches spaces, tabs, returns, and newlines


upper_p Matches upper case letters


xdigit_p Matches hexadecimal digits




Other comments:


negation ~


Example: ~ch_t(’x') - matches any character except ‘x’

Introduction to the parser development

Further in this article, I’ll try to keep the high level of clearness so I’m sorry in advance if you think that my descriptions are too detailed.

The description starts from the heart of the parser - its algorithm. The algorithm is described in parts, and then the wrapper for this algorithm is described, and then other auxiliary classes. At the end, we’ll consider a concrete usage example and test.

Algorithm description

The algorithm is represented by a function and interface:

template<class charT>




struct IResultProcessor


{


virtual ~IResultProcessor(){}




virtual void OnKeyFound(const charT* begin, const charT* end)=0;


virtual void OnValueNameFound(const charT* begin, const charT* end)=0;


virtual void OnValueDataFound(const charT* begin, const charT* end)=0;


};




template<class charT>


inline bool ParseRegFileImpl(const charT* buffer,


IResultProcessor<charT>* resultProc);

It follows from the function names that the algorithm will call the OnKeyFound function for each key name found, OnValueNameFound for each value name found, and OnValueDataFound for the value content.

An observant reader can ask a question: “Why is the processing of value separated into two functions, OnValueNameFound and OnValueDataFound, after all it it one single entity?” The answer is simple: “The implementation of this processing inside the algorithm would be hard and so the algorithm entrusts calling inside it the processing of these two parts”.

Preparatory work

At this stage, we will prepare the environment for the convenient work. In particular, we should use namespaces, shorten the line for rule creation, and define frequently used rules.

using namespace boost::spirit;


typedef rule<scanner<const charT*> > RuleType;


typedef chlit<charT> ch_t; // Single character


typedef chset<charT> chs_t; // Character set


typedef IResultProcessor<charT> ResProcT;




chs_t anychar_t(anychar_p); // Pattern anychar to character set


chs_t eol_CR(’r'); // End of line CR


chs_t eol_LF(’n'); // End of line LF


chs_t eol_t(eol_CR);// CR or LF end of line


eol_t |= eol_LF; Auxiliary rules // Matches spaces or tabs


RuleType blanks = * blank_p;




// Symbols ‘]’and ‘[' - separate Key Name


RuleType not_name_separator = ~ch_t(']‘) &amp; ~ch_t(’[');




// empty data


RuleType empty_data = blanks >> (eol_t | ch_t(''));




// Data that we don't interested


// @ - it's default value name , " - requires additional processing


RuleType other_data = *(anychar_t &amp; not_name_separator &amp;


~ch_t('@')&amp; ~ch_t('"'));

The first rule is to omit the blanks and tabs. Asterisk means that the rule can work several times in a row or not work at all.

The second rule is to make sure that the current symbol is not the name separator.

The third rule is to omit empty data. The operator >> means that the rule at the left side of the operator and the rule at the right side should be performed in sequence, one after another.

The forth rule is assigned to free data not part of the separators. Any symbol matches this rule except for name separators, @ - the identifier of value by default, and the symbol " that signals the end of the line. This rule can work either several times or never.

Rule for the key name RuleType ident_kname_continue = ch_t(']‘) >> ~eol_t;


RuleType ident_key_name = *(anychar_t &amp; ~ch_t(’]')) ||


ident_kname_continue >> ident_key_name;

This rule can be illustrated on the scheme:

Rule ident_kname_continue is an auxiliary for ident_key_name. First of all, ident_key_name is the recursive rule, and after the process meets symbol ], it tries to define if it is the end of the name or the part of the name. If symbol ] is the part of the name, i.e., there is no symbol of line end after it, and then this rule starts itself again and continues parsing.

Let’s consider the following case for example:

[HKEY_LOCAL_MACHINESOFTWAREMicrosoft_HARD_NAME[123]_ABCD]

In this example, the symbol ] is the part of the name and that’s why it’s necessary to check if there is the symbol of line end after it. You can see such names in the Registry.

Rule for the Value name // if “= symbols sequence is found - value name ends


RuleType ident_vname_continue = +ch_t(’”‘) >> ~ch_t(’=');


// If ‘”‘ symbol is found - check if value name ends,


// if it doesn’t parsing continues.


RuleType ident_vname_sz_skip = ch_t(’\') >> ch_t(’”‘);


RuleType ident_vname_sz_body = *(anychar_t &amp; ~ch_t(’”‘) ||


ident_vname_sz_skip );


RuleType ident_vname_sz =


ident_vname_sz_body >> *(ident_vname_continue >> ident_vname_sz_body);


// Rule for default value name


RuleType ident_vname_sz_impl = ch_t(’”‘) >> ident_vname_sz >> +ch_t(’”‘);


RuleType ident_vname_def = ch_t(’@');


// “text” or DEFAULT


RuleType ident_value_name = ident_vname_def | ident_vname_sz_impl;

This rule can be represented on the scheme:

Rule for the value content // if value content is binary


// Data can be any character except for ‘\’ and ‘n’ in sequence


RuleType vdata_bin_body =*(anychar_t &amp; ~ch_t(’') &amp;


~eol_t &amp; ~ch_t(’\'));


RuleType vdata_bin_continue = ch_t(’\') >> eol_t;


// if ‘\’ and ‘n’ in sequence data continue on the next line


RuleType vdata_bin = vdata_bin_body >>


*(vdata_bin_continue >> vdata_bin_body);




// if value content is string


// String data always ends with ‘”‘ and ‘n’ symbols in sequence


RuleType vdata_sz_continue = +ch_t(’”‘) >> ~eol_t;


RuleType vdata_sz_body_impl = *(anychar_t &amp; ~ch_t(’”‘));


RuleType vdata_sz_body = vdata_sz_body_impl >>


*(vdata_sz_continue >> vdata_sz_body_impl);


// String data always starts and ends with ‘”‘ symbol


RuleType ident_vdata_sz = ch_t(’”‘) >> vdata_sz_body >> +ch_t(’”‘);




// Check value data format


RuleType ident_vdata = ident_vdata_sz | vdata_bin;

This rule can be represented on the scheme like this:

Rule that describes the line with the key name // line with key name


RuleType l_key =


other_data>> // Can be comments or start title


ch_t(’[') >> // start of the key name


// Call OnKeyFound function if rule succeeds


ident_key_name [bind(&amp;CRegFileParserImpl::OnKeyFound,


this, _1,_2) ] >>


blanks >> // can be blanks


ch_t(’]') >> // end of the key name


blanks >> // can be blanks


*eol_t; // one or more end of line symbols

This rule requires the execution of several rules in sequence. The new idea here is to use the operator []. In this case, it means that when the rule is activated, the functor transferred as the parameter should be called. And, the range where this rule worked will be transferred to this functor via two parameters.

Rule that describes the line with the Value // lines with value name and data


RuleType l_values =


other_data>> // Can be comments or start title


// Call OnValueNameFound function if rule succeed


ident_value_name


[bind(&amp;CRegFileParserImpl::OnValueNameFound, this, _1,_2) ] >>


blanks >> // can be blanks


ch_t(’=') >> // always separates value name and value data


blanks >> // can be blanks


// Call OnValueDataFound function if rule succeeded


value_data


[bind(&amp;CRegFileParserImpl::OnValueDataFound, this, _1,_2) ] >>




blanks >> // can be blanks


*eol_t; // one or more end of line symbols

This rule is much like the previous one. At this moment, we can return to the question stated during the interface discussion: “Why is the processing of Value separated into two functions OnValueNameFound and OnValueDataFound, after all it is one single entity?”. Now, we can give a more detailed answer. As it’s seen from the code above, it’s hard to support an interface corresponding to the reg file structure by means of boost::spirit - a function call with 4 parameters for the whole value.

Gathering everything together // Any line can satisfy one of the three rules


RuleType lines = l_key | l_values | empty_data;




// Start lexeme_d pars that compares also additional symbols


// if does just *lines, symbols ‘ ‘,’t',’n’ are not compared


RuleType reg_file = lexeme_d [*lines] ;




// Execute parse


return (parse(buffer, reg_file).full);

So, we finished the algorithm of reg file parsing. The rules for the key name are set, the value is aggregated, and the file parsing starts.

The whole function looks like the following:

template<class charT>


inline bool ParseRegFileImpl(const charT* buffer,


IResultProcessor<charT>* resultProc)


{


using namespace boost::spirit;


typedef rule<scanner<const charT*> > RuleType;


typedef chlit<charT> ch_t; // Single character


typedef chset<charT> chs_t; // Character set


typedef IResultProcessor<charT> ResProcT;




chs_t anychar_t(anychar_p); // Pattern to char set


chs_t eol_CR(’r'); // End of line CR


chs_t eol_LF(’n'); // End of line LF


chs_t eol_t(eol_CR);// CR or LF end of line


eol_t |= eol_LF;




/* ————————————————————– */


/* Help rules*/




// Matches spaces or tabs


RuleType blanks = * blank_p;


// Symbols ‘]’and ‘[' - separate Key Name


RuleType not_name_separator = ~ch_t(']‘) &amp; ~ch_t(’[');


// empty data


RuleType empty_data = blanks >> (eol_t | ch_t(''));


// Data in what we aren't interested


// @ - it's default value name, "




// - requires additional processing


RuleType other_data = *(anychar_t &amp; not_name_separator &amp;


~ch_t('@')&amp; ~ch_t('"'));




/* -------------------------------------------------------------- */


/* Rules that describe identifier of key name */




RuleType ident_kname_continue = ch_t(']‘) >> ~eol_t;


RuleType ident_key_name = *(anychar_t &amp; ~ch_t(’]')) ||


ident_kname_continue >> ident_key_name;




/* ————————————————————– */


/* Rules that describe identifier of value name */




// Skip ” sequence


RuleType ident_vname_sz_skip = ch_t(’\') >> ch_t(’”‘);


RuleType ident_vname_sz_impl =


*(anychar_t &amp; ~ch_t(’”‘) || ident_vname_sz_skip );


// Add trailing symbols to match pattern


RuleType ident_vname_sz = ch_t(’”‘) >>


ident_vname_sz_impl >> +ch_t(’”‘);


// Rule for default value name


RuleType ident_vname_def = ch_t(’@');


// “text” or DEFAULT


RuleType ident_value_name = ident_vname_def | ident_vname_sz;




/* ————————————————————– */


/* Rules that describe value content */




// if value content is binary


// Data can be any character except for ‘\’ and ‘n’ in sequence


RuleType vdata_bin_body =


*(anychar_t &amp; ~ch_t(’') &amp; ~eol_t &amp; ~ch_t(’\'));


RuleType vdata_bin_continue = ch_t(’\') >> eol_t;


// if ‘\’ and ‘n’ in sequence then


// data continue on the next line


RuleType vdata_bin = vdata_bin_body >>


*(vdata_bin_continue >> vdata_bin_body);




// if value content is string


// String data always end with ‘”‘ and ‘n’ symbols in sequence


RuleType vdata_sz_continue = +ch_t(’”‘) >> ~eol_t;


RuleType vdata_sz_body_impl = *(anychar_t &amp; ~ch_t(’”‘));


RuleType vdata_sz_body = vdata_sz_body_impl >>


*(vdata_sz_continue >> vdata_sz_body_impl);


// String data always start and end with ‘”‘ symbol


RuleType ident_vdata_sz = ch_t(’”‘) >>


vdata_sz_body >> +ch_t(’”‘);




// Check value content format


RuleType ident_vdata = ident_vdata_sz | vdata_bin;




/* ————————————————————– */


/* Put all rules together */




// line with key name


RuleType l_key =


other_data>> // Can be comments or start title


ch_t(’[') >> // starts key name


// Call OnKeyFound function if rule succeed


ident_key_name [bind(&amp;ResProcT::OnKeyFound,


resultProc, _1,_2) ] >>




blanks >> // can be blanks


ch_t(’]') >> // ends key name


blanks >> // can be blanks


*eol_t; // one or more end of line symbols




// lines with value name and data


RuleType l_values =


other_data>> // Can be comments or start title


// Call OnValueNameFound function if rule succeed


ident_value_name [bind(&amp;ResProcT::OnValueNameFound,


resultProc, _1,_2) ] >>


blanks >> // can be blanks


ch_t(’=') >> // always separates value name and value data


blanks >> // can be blanks


// Call OnValueDataFound function if rule succeed


ident_vdata [bind(&amp;ResProcT::OnValueDataFound,


resultProc, _1,_2) ] >>




blanks >> // can be blanks


*eol_t; // one or more end of line symbols




// Any line can satisfy one of three rules


RuleType lines = l_key | l_values | empty_data;




// Do lexeme_d pars that compare also additional symbols


// if do just *lines, symbols ‘ ‘,’t',’n’ are not compared


RuleType reg_file = lexeme_d [*lines] ;




// Execute parse


return (parse(buffer, reg_file).full);


}

CRegFileParser

It’s time to consider the wrapper class for this algorithm. This class assumes the processing of the value name and the value content. In other words, this class supports the following intrface:

template<class charT>


struct IRegFileObserver


{


virtual ~IRegFileObserver(){}




virtual void OnKeyFound(const charT* begin, const charT* end)=0;


virtual void OnValueFound(const charT* nameBegin, const charT* nameEnd,


const charT* dataBegin, const charT* dataEnd)=0;


};

And the class itself:

template<class charT>


class CRegFileParser:public IResultProcessor<charT>


{


typedef std::pair<const charT*,const charT*> BuferRange;


BuferRange lastVName_;




IRegFileObserver<charT>* pObserver_;




bool bLastVNameProcessed_;


public:


CRegFileParser(IRegFileObserver<charT>* pObserver)


: pObserver_(pObserver)


, bLastVNameProcessed_(true)


{}




bool Parse(const charT* buffer)


{


return ParseRegFileImpl(buffer,this);


}




private:


void OnKeyFound(const charT* begin, const charT* end)


{


CheckVNameProcessed(true);




pObserver_->OnKeyFound(begin,end);


}


void OnValueNameFound(const charT* begin, const charT* end)


{


CheckVNameProcessed(true);




bLastVNameProcessed_ = false;


lastVName_.first = begin;


lastVName_.second = end;


}


void OnValueDataFound(const charT* begin, const charT* end)


{


CheckVNameProcessed(false);




bLastVNameProcessed_ = true;


pObserver_->OnValueFound(lastVName_.first,


lastVName_.second,begin,end);


}


void CheckVNameProcessed(bool needToBeProcessed)


{


if(bLastVNameProcessed_ != needToBeProcessed)


throw std::exception(”Value data not ” +


“found for founded value name”);


}


};

Using Pool

Before considering the observers created for testing, we should describe the usage of the boost Pool library.

What is Pool?

Pool allocation is a memory allocation scheme that is very fast, but limited in its usage.

Installation

The Boost Pool library is a header file library. That means there is no .lib, .dll, or .so to build; just add the Boost directory to your compiler’s include file path, and you should be good to go!

How do I use Pool?

To make it convenient, I created the following classes that have the functionality of the standard STL containers but use the boost Pool library:

#include <boost/pool/pool_alloc.hpp>


#include <map>


#include <vector>


#include <list>




#include <string>




template<class _Kty, class _Ty>


class QMap : public std::map< _Kty, _Ty, std::less<_Kty>,


boost::fast_pool_allocator< std::pair<_Kty,_Ty> > >




{};




template<class _Ty>


class QVect : public std::vector< _Ty, boost::pool_allocator<_Ty> >


{};




template<class _Ty>


class QList : public std::list< _Ty, boost::pool_allocator<_Ty> >




{};




template<class _Ty>


class QStringStream :


public std::basic_stringstream< _Ty,std::char_traits<_Ty>,


boost::pool_allocator<_Ty> >


{};




template<class _Ty>


class QString: public std::basic_string<_Ty,std::char_traits<_Ty>,


boost::pool_allocator<_Ty> >




{


typedef std::basic_string<_Ty,std::char_traits<_Ty>,


boost::pool_allocator<_Ty> >


BaseClass;


public:


QString(){}


// construct from [_First, _Last), const pointers


QString(const _Ty* first,const _Ty* last)


: BaseClass(first,last)


{}


};

The only disadvantage - as you could notice - is no full support for original constructors. I actually think that it's not a big problem, you can just insert the necessary constructor if it's needed.

Observers

Some observers were created for testing purposes:

  1. CRegStatusObserver - assigned to print the status of the parsing process on the screen in percentage.
  2. CRegCountObserver - assigned to print the number of keys and the values on the screen.
  3. CRegPrintObserver - assigned to print all the keys and values on the screen.
  4. CRegFullObserver - assigned to store all the keys in std::map, where the name of the Registry key is key and the vector of all the values of this Registry key is the std::vector values.
  5. CRegObserversPool - assigned to make it possible to use several observers simultaneously.

It's important to mention that these observers print information on the screen, but they can be used to print to the file or some other stream. For example, CRegCountObserver:

template<class charT,class streamT>


class CRegCountObserver:public IRegFileObserver<charT>


{


size_t keysCount_;


size_t valuesCount_;




streamT&amp; out_;


public:


CRegCountObserver(streamT&amp; out)


: keysCount_(0)


, valuesCount_(0)


, out_(out)


{}


~CRegCountObserver()


{


out_ << "Keys count: "


<< keysCount_


<< "t Values count: "


<< valuesCount_


<< "n";


}


...


};

And some examples of its usage:

// 1


CRegCountObserver<char> screenObsr(std::cout);




// 2


std::stringstream strStream;


CRegPrintObserver<char,std::stringstream> stringObsr(strStream);




// 3


std::fstream fileStream;


CRegPrintObserver<char,std::fstream> fileObsr(fileStream);

The usage of other observers is the same.

Auto-tests description

All auto-test are represented in the one project, RegFileParserAutoTest.

The test is a console application developed with the Boost Testing Framework. Five complicated cases were chosen to be the test data: one for key name, two for value name, and two for value content.

There is one more case with the typical content of a reg file. So, we have six cases, and there are two versions of reg file format - ANSI and UNICODE (Regedit4 and Regedit5 correspondingly); each of our cases duplicates for two formats. As a result, we have 12 test files.

To control the results of parsing, we use a comparison of the original content and the content parsed and saved in memory using CRegPrintObserver:

template<class charT>


class TestRunner


{


protected:


typedef std::basic_string<charT> stringT;


typedef std::basic_stringstream<charT> stringstreamT;




typedef std::basic_fstream<charT> fstreamT;


public:




...




static void


RunTest(const std::wstring&amp; fileName)


{


std::vector<char> buffer;


ReadFile(fileName,&amp;buffer);




stringstreamT stream;


reg_parser::CRegPrintObserver<charT,stringstreamT>


coutObserver(stream);


reg_parser::CRegFileParser<charT> regParser(&amp;coutObserver);




// Run parsing


if( !regParser.Parse( (charT*)&amp;buffer[0] ) )


throw std::exception(”Parsing fail.”);




// Prepare data for comparison


stringT parsedStr;


AddRegHeader(&amp;parsedStr);


parsedStr += stream.str();




stringT originalStr = stringT((charT*)&amp;buffer[0]);




// Trim unneeded symbols


using namespace boost;


trim_if(originalStr,is_any_of(”nt “));


trim_if(parsedStr,is_any_of(”nt “));




if( parsedStr != originalStr)


{


// Save to file result of parsing


std::wstring parsedFileName = fileName + L”_parsed”;


fstreamT file(parsedFileName.c_str(),


fstreamT::out | fstreamT::trunc);


if( file.is_open() == false )


throw std::exception(”Can’t create file for “


“result of parsing.”);




BOOST_SCOPE_EXIT( (&amp;file) )


{


file.close();


}


BOOST_SCOPE_EXIT_END




file << parsedStr;




throw std::exception(”Parsed data not “


“equal to original data.”);


}


}







};

Description for manual testing

Manual tests are represented in one project, RegFileParserTestCmd. The test is a console application implemented using Boost Program Options that has these parameters:

C:RegFileParserbinDebug>RegFileParserTestCmd.exe –help


Allowed options:


–help produce help message


–reg_file arg source reg file


–print Enable printing to the screen


–count Enable counting parsed keys and values


–status Enable printing status of parsing

It’s a pity that I don’t have enough time to add options to save the parsed content to a file, and using the save option like it is in autotest doesn’t seem to be aesthetic to me.

Registry export using Regedit

Conclusion

This article is a special piece of knowledge, so may be it’s not as systematic as it should be.

It was really interesting to learn boost spirit, and I managed to get the pleasure of my work with it and some aesthetic satisfaction - not just get my task done. After all, this discovered to be very effective; for example, the calculation of number of keys and values in a Registry file of 250 MB now takes a couple of seconds only.

So learn something new, and good luck to you in your development!

Download sources from Apriorit site.

About the Author




 Mail this post

Technorati Tags: , , , ,

How To Improve Memory , , , ,

Free Memory Optimizer Vista

October 25th, 2008

why my physical memory is low in vista?

i am using vista home premium the physical memory is very low what is the reason for this …. the physical memory is 3068 cached memory is 2078 mb and free memory is 0mb sometimes it is 4 mb and sometime it is 500 mb free ..the processor is always busy up to 40-60-80 % usage…processes working 90 …..i am using advance system care optimizer even the problem exist …system is slow…

The reason why its slow is microsoft didn’t make the memory bigger then windows XP. Plus there are sometimes errors in the code for vista. If you have anything you don’t want in there, use system restore then get rid of the files you don’t need.




 Mail this post

Technorati Tags: , , , ,

How To Improve Memory , , , ,

Memory Tapes Treeship Mediafire

October 24th, 2008




 Mail this post

How To Improve Memory

Royal Albert Memory Lane China

October 21st, 2008

royal albert memory lane china

Host your very own vintage-style garden party

1. Put out the flags
Capture the very heart of the vintage English garden party by decking your outdoor space with a decorative flurry of bunting. And nothing makes a vintage statement better than this charming blue gingham and Union Jack bunting from Dotcomgiftshop.

2. Dress your table for success
Add a little vintage glamour to your outdoor table by dressing it up in a beautiful tablecloth. A splash of vintage-style floral will make your spread appear all the more deliciously chic. Get your guests’ mouths watering with this adorable tablecloth from the queen of florals, Cath Kidston.

3. Time for tea
With tea very much a garden party staple, make sure your event isn’t thirsty for style by selecting a vintage statement teapot to sit as a table centrepiece. Celebrating over a century of English craftsmanship, who better to be a guest at your garden party than Royal Albert with their exquisite Memory Lane bone china teapot, designed in the classic baroque Montrose shape.

4. A sweet treat
No garden party would be complete without a beautiful display of homemade cakes. But for hygiene purposes, it’s best to keep them covered up. Show-off your gorgeous culinary skills with this classic shaped glass covered cake stand from Cocomale, ideal for keeping cakes fresh throughout the day.

5. Hampers for old-fashioned style
For a garden party on a smaller scale, you might like to consider investing in a traditional picnic basket and having a smaller spread on your lawn. This gorgeous
Optima Traditional Picnic Basket from PrezzyBox comes in a lovely Cottage Garden design, with sustainable willow basket, cotton napkins, ceramic plates, cutlery, and a choice of wine glasses or cups.

6. Shabby? More like chic.
Jazz up even the shabbiest of chairs and make them look inviting to your guests by adding a little vintage-style padding. These cute reversible seat pads from La Maison boast a vintage French floral on one side, and a candy stripe on the reverse - just perfect for elegant behinds!

7. Service with a smile
As the perfect host, make sure your guests’ plates and glasses are never empty by serving up your delicious treats, from a vintage-style cake trolley. This beautiful rosewood carved trolley from Amazon, which comes complete with a detachable serving tray, and opens up as a table is ideal to make you the host or hostess with the mostess.

8. Shade with sartorial conscience
In true English garden party style, weather is bound to be a topic of conversation, so offer your guests a little shade from the sun, with a decorative vintage-style sun parasol. Make a bold and glamorous vintage statement with this Victoriana-shaped cream umbrella with tassels, from Burford.

9. In full swing
Add a touch of vintage romance to your garden party with a feature swing bench, ideal for couples. Sneak away from the crowd for a little together-time this traditional regency-striped, swinging hammock bench from Amazon which comes with a weather-proof canopy.

10. Twilight-lighting
As the sun begins to set on your garden party and twilight settles in, create a warm, romantic glow from the trees, tables, and paths with some vintage-style candle lanterns. These pretty glass lanterns from Not on the High Street bear the words ‘Fete au Jardin,’ and have room for a tea light. What better way to leave a lasting impression on guests than with a little candlelit chic.

About the Author

Annie is an expert furniture and interior design writer. Her current area of specialism is garden tools, mattresses and decking

Royal Albert Memory Lane Hostess Tray 2 Tier Royal Albert Memory Lane Hostess Tray 2 Tier
$44.99

Hostess Tray 2 Tier - Blue And Pink Floral Decor - White Background - Gold Trim - Made In England...
Royal Albert Memory Lane Tidbit Tray Royal Albert Memory Lane Tidbit Tray
$19.99

Tidbit Tray - Blue And Pink Floral Decor - White Background - Gold Trim - Made In England...
Royal Albert Memory Lane Antique China Coffee Pot Large Royal Albert Memory Lane Antique China Coffee Pot Large

This antique china is from the original Royal Albert series of dishes produced between 1964 and 1973 making them over 35 years old. This beautiful large coffee pot comes with the lid. The widest portion of the pot is 4-1/8 or 10.5 cm across and the total height with the lid in place is 9-7/8 or 25.2 cm high. The measurement to the top of the pot only is 7-1/8 or 18.1 cm. This china is actually...




 Mail this post

How To Improve Memory