CategoryJavaScript

Terminal – calculate number of lines of code in a directory

T

We had an interesting question, can we calculate how many lines of code we have written for an entire project? It turns out this isnt the easiest thing to calculate for a web-project, but we gave it a go. This is the best we have come up with so far for all code we have written to calculate the number of lines of code in all PHP, CSS, JS, HTML and HTM pages. ( find ./ -name '*.php' -print0 -o ...

JQuery set focus on an input control with a name (not an id)

J

There is lots of documentation on how to set the focus to a control with an ID, however there is very little showing how to do this when your form controls only have a name tag, rather than id. Make sure you have JQuery loaded further up the page than this script runs. Here is how to do it!   <script type=”text/javascript”> $(document).ready(function(){...

Archive

Tags

Get in touch

I'm available on just about every social media platform out there as RMTWeb.