Using find with grep to find strings in files

Here is how to find files containing a certain string. This works in any system supporting Unix commands, including OSX. find . -name ’*.xml’ -exec grep ’string to find’ {} \; Sometimes the files have no line breaks, so you just want to see the filename of the matches. Then you need the -l parameter. …

Objektorientering i JS

Som i princip alla moderna språk stödjer JavaScript objektorientering. Enligt min mening ska man objektifiera så mycket som möjligt. Det är egentligen inte svårare att köra med objekt än utan, snarare blir koden lättare att överskåda och framförallt lättare att fortsätta utveckla senare. Här är ett grundexempel som t ex kan vara en del av …