Category / Very Short Trick

If you are using Nightwatch JS to test a website and you need to test an anchor nested in an unsorted list, be sure to add the name attribute in the anchor, otherwise, the click command will fail. Let’s see a simple case with an HTML markup like this:

Read More

When you would like to show a page only for a specified user or you wish to create a maintenance page, you may use this simple script:

Read More

Apple suggests using an instance of NSFileManager class and avoid the static class method defaultManagerbecause it will return a singleton instance: no thread-safe: In Mac OS X v.10.5 and later you should consider using [[NSFileManager alloc] init] rather than the singleton method defaultManager. Using [[NSFileManager alloc] init] instead, the resulting NSFileManager instance is thread safe. […]

Read More

We have to use a little trick! In other words, we will remove the meta box and then we will add a new one again:

Read More

Many developers use the HTML comment in order to analyse the page by using the “view source” feature provided by almost all browsers. However, these comments will be visible to everyone. Also, they are sent from the server to the client and that could take a lot of needless bytes. If you don’t need to […]

Read More