Jump to content
xisto Community

gogoily

Members
  • Content Count

    99
  • Joined

  • Last visited

Posts posted by gogoily


  1. Guys, I've got this document today and post here to share with you. I hope it is helpful to you.


    In JavaScript, regular expressions are represented by RegExp objects. RegExp objects may be created with the RegExp( ) constructor, of course, but they are more often created using a special literal syntax. Just as string literals are specified as characters within quotation marks, regular expression literals are specified as characters within a pair of slash (/) characters. Thus, your JavaScript code may contain lines like this: var pattern = /s$/; This line creates a new RegExp object and assigns it to the variable pattern. This particular RegExp object matches any string that ends with the letter "s." (I'll get into the grammar for defining patterns shortly.) This regular expression could have equivalently been defined with the RegExp( ) constructor like this: var pattern = new RegExp("s$"); Creating a RegExp object, either literally or with the RegExp( ) constructor, is the easy part. The more difficult task is describing the desired pattern of characters using regular expression syntax. JavaScript adopts a fairly complete subset of the regular-expression syntax used by Perl, so if you are an experienced Perl programmer, you already know how to describe patterns in JavaScript. Regular-expression pattern specifications consist of a series of characters. Most characters, including all alphanumeric characters, simply describe characters to be matched literally. Thus, the regular expression /java/ matches any string that contains the substring "java". Other characters in regular expressions are not matched literally but have special significance. For example, the regular expression /s$/ contains two characters. The first, "s", matches itself literally. The second, "$", is a special metacharacter that matches the end of a string. Thus, this regular expression matches any string that contains the letter "s" as its last character.


    Notice from jlhaslip:
    added quote tags. DO NOT cut and paste


  2. Just like all parts of a vacation, the photography portion must be planned. Photo opportunities should include local culture and famous scenes that would make it apparent where the vacation took place. Since the shots will most likely be taken outdoors, a time of day must be chosen to offer optimal lighting.PlanningPhoto Location OpportunitiesWhile researching the area that the vacation will take place, find locally significant sites that will reflect the beliefs and traditions of the area. These could be historic churches, temples, and parks.Find sites that the area is famous for. This could be certain theaters, amusement parks, famous restaurants, world record sites, and just about any site that is known outside of the vacation location.Even after locations are picked, keep your eyes open for other spur of the moment photo opportunities.LightingKeep in mind that most lighting for travel photography is going to be natural.In general, for rural areas, morning and evening are the best for optimum lighting. The light is not as harsh so it is easier to get portraits without squinty eyes. Sunrise and sunsets also cast an interesting glow over the landscape and the angle of the light will really bring out the textures.If it is a bit cloudy, lighting may be great all day long. The main thing is to get out there, enjoy yourselves, and capture the moment.When photographing outdoors, I always recommend using a polarized filter.LensesMost photographers want to incorporate at least some of the landscape in their vacation shots. The best lens to use for this is a wide angle. This lens will allow a person to still be prominent in the shot by being closer to the camera, while still keeping the background scenery perfectly in focus.A standard lens is fine for general photography throughout the day, but a wide angle lens should be used for shooting a person and landscape in the same scene. The short focal length allows the wide angle lens to keep everything equally in focus.


  3. truefusion may make a mistake in 18th line, try this:

    <?php$str = '<code lang="php"></code><code lang="javascript"></code><code lang="css"></code>';function parse_code($matches){	if ($matches[1] == "php"){		return "[ code ]".$matches[2]."[ /code ]";	} else if ($matches[1] == "javascript"){		return "[ code ]".$matches[2]."[ /code ]";	} else if ($matches[1] == "css"){		return "[ code ]".$matches[2]."[ /code ]";	}}$str = preg_replace_callback("/<code lang=\"(\w+)\">(.*)<\/code>/", "parse_code", $matches);echo $str;?>

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.