background preloader

You Don’t Know Anything About Regular Expressions: A Complete Guide

You Don’t Know Anything About Regular Expressions: A Complete Guide
Regular expressions can be scary...really scary. Fortunately, once you memorize what each symbol represents, the fear quickly subsides. If you fit the title of this article, there's much to learn! The key to learning how to effectively use regular expressions is to just take a day and memorize all of the symbols. . Yep - it's not fun, but just memorize them. You can be certain that you'll want to rip your hair out at one point or another when an expression doesn't work, no matter how much it should - or you think it should! The next step is to learn how to actually use these symbols! In this final section, we'll review a handful of the most important JavaScript methods for working with regular expressions. This one accepts a single string parameter and returns a boolean indicating whether or not a match has been found. Above, we begin by declaring a regular expression which only allows upper and lower case letters, an underscore, and a dash. The code above will alert a single "e."

List of Algorithms A complete list of all major algorithms (300), in any domain. The goal is to provide a ready to run program for each one, or a description of the algorithm. Programming languages include Java, JavaScript and PHP, C, C++ either in direct form or generated from a Scriptol source. Automata Powerset construction. Artificial intelligence Alpha-beta. Computer vision Epitome. Genetic algorithms They uses three operator. selection (choose solution), reproduction (use choosen solutions to construct other ones), replacement (replace solution if better). Neural networks Hopfield net. Machine learning PAVA (Pool-Adjacent-Violators Algorithm). Bioinformatics and Cheminformatics Needleman-Wunsch. Compression Lossless compression algorithms Burrows-Wheeler transform. Entropy encoding Coding scheme that assigns codes to symbols so as to match code lengths with the probabilities of the symbols . Huffman coding. Lossy compression algorithms Linear predictive coding. Cryptography Secret key (symmetric encryption)

Web 2.0 Design Guide In this tutorial, I describe various common graphic design elements in modern web “2.0” design style. I then attempt to explain why they work (i.e. why they have become common), as well as how, when and where you might use each element in your designs. It follows on from my Current Style article, and analyses in greater depth the design features of the current “Web 2.0” design style. To learn how to design Web2.0 sites yourself, you must read “Save the Pixel – The Art of Simple Web Design”, which is a comprehensive guidebook to the principles and techniques of Web2.0 design. Summary of Best Web Design Features The list below is a summary of many of the common features of typical “Web 2.0” sites. Clearly, a site doesn’t need to exhibit all these features to work well, and displaying these features doesn’t make a design “2.0” – or good! I’ve already addressed some of these factors in my introductory Current Style article. Best Website Design? Web 2.0 ?! Best Web Design Features 1. When? Always! 2.

Toolbox - Regular Expression Tester - Test and Learn Regex Search Syntax v1.31, 2006.05.01 by Robert Giordano Regular Expression Syntax: [agk] matches any one a, g, or k [a-z] matches any one character from a to z [^z] matches any character other than z [\\(\\)] matches ( or ) (in javascript, the escape slash must be escaped!) . any character except \n \w any word character, same as [a-zA-Z0-9_] \W any non-word character \s any whitespace character, same as [ \t\n\r\f\v] \S any non-whitespace character \d any digit \D any non-digit \/ literal / \\ literal \ \. literal . \* literal * \+ literal + \? Examples: /\b(gr[ae]y)/ig,"GRay" Replaces any "gray" or "grey" with "GRay". /\b(cat|dog)\b/ig,"pet" Replaces any "cat" or "dog" with "pet". /(a|e|i|o|u)/ig,"[$1]" or /([aeiou])/ig,"[$1]" These two expressions put square brackets around every vowel in a string. $1 in the replacement string is replaced with what was found in the parenthesis. /feb(ruary)? /( ){2,}/g," " Replaces 2 or more consecutive spaces with a single space. /\b(is)(?! /(.+)((\r? /\b(\w{4})\s? bartj

Damn Cool Algorithms: Levenshtein Automata Posted by Nick Johnson | Filed under python, coding, tech, damn-cool-algorithms In a previous Damn Cool Algorithms post, I talked about BK-trees, a clever indexing structure that makes it possible to search for fuzzy matches on a text string based on Levenshtein distance - or any other metric that obeys the triangle inequality. Today, I'm going to describe an alternative approach, which makes it possible to do fuzzy text search in a regular index: Levenshtein automata. Introduction The basic insight behind Levenshtein automata is that it's possible to construct a Finite state automaton that recognizes exactly the set of strings within a given Levenshtein distance of a target word. We can then feed in any word, and the automaton will accept or reject it based on whether the Levenshtein distance to the target word is at most the distance specified when we constructed the automaton. Of course, if that were the only benefit of Levenshtein automata, this would be a short article. Indexing

Javascript For Designers: Getting on Your Feet Fast Aug 04 2009 Web designers are a special breed – we’re one of a small group of professionals that actively seeks out to improve ourselves and our craft through any means possible. This generally means on our own, from each other, and through an awful lot of ‘guess, test and revise.’ Web design isn’t for the faint of heart or those with any fear of failure. The most daunting ‘learning experience’ for developing developers is to make the jump from the HTMLs and the CSSs of the world to web scripting. It looks good from the outside – all that added interactivity and animation and cool effects and features – oh my. Getting on Your Feet Fast Let’s take a look at bulletproof ways to ease into Javascript at an accelerated pace. The first place I start when looking to learn anything new is on the web – makes sense to learn the web from the web, right? Websites That Teach Javascript Javascript learning sites spend more time on simple logic and processes. Tizag.com W3schools.com About.Com Put It to Use

Buying an iBeacon: Guide to Bluetooth LE Devices Having trouble figuring out all of the options for iBeacons and Bluetooth LE devices? You’re not alone. Every day there seems to be a new device or beacon being launched – and confusing things further, the terms iBeacon, beacon and Bluetooth LE often seem interchangeable. To try to make life slightly easier, this page is your resource and link list for the physical devices called ‘beacons’. Definitions First, however, a few simple definitions: Beacons: A beacon is any device that transmits a signal which allows another device to determine its proximity to the broadcaster. Bluetooth Low Energy: This is the specification for one type of signal that beacons transmit. iBeacon: The term iBeacon and beacon are often used interchangeably. Devices: The list below includes all devices that are capable of Bluetooth LE broadcasting. List of Bluetooth LE Devices Accent Advanced Systems iBks101 are one of a suite of products by Accent Advanced Systems. AIRCable USB Dongle BlueCats BlueSense Networks Estimote

Related: