http___blog.petkanski.com_2011_04_mysqlrealescapestring.html_1.xml
http___inspirevolunteer.co.uk_characteristics-teach-english-abroad_.xml
1.1 2.1 2.2 2.3 3.1 4.1 4.2 5.1 5.2 5.3 6.1 7.1 8.1 9.1 9.2 10.1 11.1 12.1 12.2
По темата.. Днес ми се наложи да сравнявам предимства и недостатъци на няколко framework-чета. При едното от тях липсваше вграден database model, така че се наложи да ползвам нещо отделно. В конкретният случай се спрях на PDO и реших да си напиша няколко базови класчета.. За да съкратя историята, направо ще ви синтезирам това което Ви е нужно да знаете ;) При МySQL имате два вида сравнение на низ от символи (string) - това са равенство и сравнение с pattern, посредством LIKE или регулярен израз. В моят случай използвам LIKE, защото е най-бърз за имплементация и защото отговаря на нуждите ми и няма смисъл от overengineering. Случаят е простичък - имам данни в базата, имам и търсачка която търси с LIKE. Това което ме изненада, беше, че mysql_real_escape_string() допусна символи в низа които са със специално значение, а именно - символите за процент (%) и долно тире (_). В най-общият случай - при вмъкване на данни или сравнение със равенство това не ви бърка, но когато ползвате LIKE нещата стоят по малко по-различен начин. Получи се ситуация, при която аз търся в базата данни къде е споменато "100%", но тъй като символът за процент не се escape-ва, се получава, че търся низ който съдържа 100. SELECT * FROM SomeTable WHERE `textField` LIKE '%100%%' Очевидно, това не е поведението което би се очаквало, след като имаш илюзията, че данните са ти escape-нати правилно. След като разбрах какъв е проблема си помислих, че може би е проблем на mysql_real_escape_string() и веднага си отворих http://www.php.net/mysql_real_escape_string - но се оказа, че това е очаквано поведение. В документацията на функцията ясно са писали, че тя "prepends backslashes to the following characters: \x00, \n, \r, \, ', " and \x1a". Ето го точният цитат от сайта: Може би символите за wildcard попадат точно в тези изключения които са споменали.mysql_real_escape_string() calls MySQL's library function mysql_real_escape_string, which prepends backslashes to the following characters: \x00, \n, \r, \, ', " and \x1a.This function must always (with few exceptions) be used to make data safe before sending a query to MySQL. Изводът е простичък - винаги минавайте един профилактичен str_ireplace() или preg_replace() на данните които използвате при генериране на заявка за търсене в базата данни за да няма изненади. Нека това, че ползвате prepared statements не ви дава чувство за сигурност.
1.1 2.1 3.1 4.1 5.1 6.1 7.1 8.1 9.1 10.1 11.1 12.1 13.1 14.1 14.2 15.1 15.2 16.1 17.1 17.2 18.1 18.2 19.1 19.2 20.1 21.1 21.2 22.1 23.1 23.2 24.1 24.2 25.1 26.1 27.1 27.2 27.3 28.1 29.1 29.2 30.1 31.1 32.1 33.1 33.2 33.3 34.1 35.1 36.1 36.2 37.1 38.1 38.2 38.3 39.1 39.2 40.1 41.1 41.2 42.1 43.1 44.1 45.1 45.2 46.1 47.1 48.1 49.1 49.2 50.1 51.1 51.2 52.1 53.1 54.1 54.2 55.1 56.1 57.1 58.1 59.1 60.1 60.2 61.1 62.1 63.1 64.1 64.2 65.1 66.1
5 Characteristics You Need to Teach English Abroad Warning: mysql_real_escape_string(): No such file or directory in /var/sites/i/inspirevolunteer.co.uk/public_html/wp-content/themes/nouveau/includes/shortcodes/shortcodes.php on line 3244 Warning: mysql_real_escape_string(): A link to the server could not be established in /var/sites/i/inspirevolunteer.co.uk/public_html/wp-content/themes/nouveau/includes/shortcodes/shortcodes.php on line 3244 Warning: mysql_real_escape_string(): No such file or directory in /var/sites/i/inspirevolunteer.co.uk/public_html/wp-content/themes/nouveau/includes/shortcodes/shortcodes.php on line 3244 Warning: mysql_real_escape_string(): A link to the server could not be established in /var/sites/i/inspirevolunteer.co.uk/public_html/wp-content/themes/nouveau/includes/shortcodes/shortcodes.php on line 3244 Warning: mysql_real_escape_string(): No such file or directory in /var/sites/i/inspirevolunteer.co.uk/public_html/wp-content/themes/nouveau/includes/shortcodes/shortcodes.php on line 3309 Warning: mysql_real_escape_string(): A link to the server could not be established in /var/sites/i/inspirevolunteer.co.uk/public_html/wp-content/themes/nouveau/includes/shortcodes/shortcodes.php on line 3309 Teaching English abroad is a rewarding but challenging experience requiring a dynamic and diverse skill set. It is a great fit for anyone who already has a qualification, such as TEFL (Teaching English as a Foreign Language), has a degree that is directly related or any relevant experience. However, while training and experience are helpful to have, you may find that you already have some of the key skills needed to be effective in the classroom. Below I will outline the 5 characteristics you need to teach English abroad. Confidence Having confidence is always something that’s easier said than done. It’s critical to feel confident in two main areas: knowledge of the English language and your ability to stand up in front of a class. After all, your job will essentially revolve around these two pillars of expertise every day! As a native or bilingual English speaker, you’re likely a linguistic minority in your destination country. It may help your confidence to know that you will automatically become “The Expert” in the language. With that being said, however, teaching a language is very different from speaking it. As native speakers, we pick up our mother tongue from a young age. We are not “taught” the language in the same structured way that you will be teaching it. As a result, we can sometimes develop some bad grammatical habits. Which may be generally acceptable in an informal, spoken context, but aren’t technically correct. Passing these bad habits on to your class will not do them any favors in the long run. You can certainly refresh your knowledge on these things through research. In fact, it’s encouraged! But, it’s important that you already possess a good level of spelling and grammar. At the end of the day, you’ll still have to be confident enough to occasionally tell your class, “I don’t actually know; I’ll find out for you and tell you tomorrow!” The Ability to Communicate and Present Clearly This skill does not just refer to being able to enunciate words and ensure they are understood. Communicational skills can take many different forms and are honed in many different professional contexts. This means that potential English volunteers don’t necessarily need to come from an English teaching background. You may find you have more transferable skills than you thought. Here are some examples of professions that often build the same communication skills required for teaching English: - Medical workers — These professionals are trained to understand and address people’s needs and communicate difficult topics. - Trainers, coaches, and teachers of topics other than English — Actually, the subject matter is the least of these professional’s concerns. Knowing how to create an engaging learning environment is one of the biggest learning curves for most new teachers. Teachers of any subject will have experienced this. - Childcare or youth workers — Regardless of your specific experience in teaching, past experience of working with children or young people in any capacity will be invaluable if you are interested in teaching English to that cohort. - Managers — Those who are entrusted with the working lives of their employees have often have to manage delicate situations. They must understand the needs and strengths of their teams, be able to communicate personal, team, and company-wide goals and work towards the growth and development of each individual. - Any professional who frequently gives training or presentations at work — In any situation of this nature, these professionals have to have an intimate understanding of their audience and their respective priorities, interests, goals, and communicate information accordingly. - “People professions” — There are many other people-focused professions where people management and communication skills are used on a daily basis, providing you with relevant transferable skills. Patience and Flexibility They say Rome wasn’t built in a day, and neither was language learning. Change can happen slowly in a classroom. So patience and flexibility are highly necessary traits for an English teacher. No one in your class will become fluent in your first week! But, the joy of seeing your students slowly, yet steadily picking up new words and building their confidence will be incredibly rewarding. Have flexibility with your lesson plans as well. You might be tempted to plan out an entire week, down to the last activity of every day, however, in reality, you’ll have to adapt each lesson as you go. Each new lesson should be based on how far you were able to advance or how successful certain activities were. This also means you’ll have to think on your feet. The class may take a huge interest in one topic, and not engage at all with another. This has no reflection on you or on your ability to plan lessons! Take advantage of their interests by going back to the topics they enjoy. Let go of the ones that don’t take off. You’ll need to be flexible with gauging the “level” of your class. Most likely your students will have a range of English abilities. Meaning, you’ll have to adapt your lesson plans to ensure that the weaker students aren’t struggling and the stronger students aren’t bored. Empathy with Your Learners Your learners’ ability to feel comfortable, take risks, and be engaged in your classroom will depend on the relationship you build with them. Put yourself in your students’ shoes. Try to be understanding about the struggles they face, both inside and outside the school. For example, it’s quite possible that some of your students may be the first in their family to experience a formal classroom. Consider what this might mean for their mindset, comfort level, and past experiences in the classroom. By displaying genuine interest in your students, showing them you truly care and are really invested in them (even outside of school hours), you can increase the possibility of them achieving their desired outcomes and yours. You’ll also have to be empathetic to be perceptive. It will help you identify what your students need and how they learn. Allowing you to adjust your teaching strategy accordingly. This may also be strongly related to the local culture, so gain some insight about the community you’ll be working in before you go. You’ll be more observant and open-minded about local customs, personalities, and traditions if you already have some knowledge. These factors could have a big effect on your classroom environment and interactions. Creativity You will most likely be in a classroom with limited resources based in a developing country. As such, you’ll likely have to get quite creative in order to develop an engaging learning experience. You won’t be able to rely on endless toys, games, or potentially even basic supplies. So, get ready to do some serious brainstorming on topics like: - Games that don’t require a lot of props, instead they revolve around people, voices, actions, and spaces. - Presenting new information that does not involve rote learning or just copying from the blackboard. - Strategies for involving every student in the lesson, regardless of having outgoing and shy personalities in the group as well as different levels of English. - Engaging strategies for practicing new vocabulary and grammar that keep students’ attention. It’s highly recommended to check out some resources online, both before and during your volunteer programme. There are many diverse ideas on all of these classroom strategies. You may even want to invest in physical resources to take with you, like a book of classroom activities, there are many to choose from. Feeling ready? Do you feel that a volunteer programme teaching English might be a good fit for you? Do you have further questions on whether your skills would be a good match? Well, don’t hesitate to ask them, we are here to help. Inspire offers English teaching volunteer programmes in several different countries and in various educational contexts, and we’d be happy to tell you more. Give us a call at +44 1635 285666, send us an enquiry, or just leave a comment below.