Just a quick one to save as a reference. This query will copy a table structure, including indexes, to a new one.
CREATE TABLE copy LIKE original;
Got it on Stack Overflow.
Just a quick one to save as a reference. This query will copy a table structure, including indexes, to a new one.
CREATE TABLE copy LIKE original;
Got it on Stack Overflow.
I invested $50 in DOGEs and I am now accepting donations in DOGE!
such currency
much richness
very donations
wow
And I’ve been back for a while now!
I actually missed my flight but caught one the day after, so everything went better than expected.
I spent a whole lot more than I wished to (the two-way train from Cambridge to London costs £45 and I had to book a new flight which amounted to approximately 100€).
Had to go to London to the embassy, where I got a temporary passport valid for a limited time only, which brought me back home safely.
No posts for a while because I’m lazy again!
Quick update though:
– I started working on a couple of new projects, one of which is my CV.
– I redesigned my url eater, Waka. Feel free to use it!
More soon, as I am about to start coding my first iOS app (which might end up being a HTML5+CSS3+JS game compiled with PhoneGap or sth).
If you, like me, own the best mobile phone in the universe, the Nokia Lumia 920, and design websites, you might have noticed that responsive sites are not responsive on this device.
This is a IE10 bug. To fix this, you should include the following snippet in the head (or wherever really) of your index file.
if (navigator.userAgent.match(/IEMobile\/10\.0/)) { var msViewportStyle = document.createElement("style"); msViewportStyle.appendChild( document.createTextNode( "@-ms-viewport{width:auto!important}" ) ); document.getElementsByTagName("head")[0]. appendChild(msViewportStyle); }
I don’t remember where I got this one, so no credits or reference, but it works!
It’s suck a beautiful sunny day here in Cambridge, UK.
And I lost the only identity document I own.
Good luck to me.
Cheers!
Recently I have added a “Like” feature to the blog, which allows you to… well, like my posts!
The Like button is situated under the post, after the category and the tags.
To add it there, I slightly modified an already existing plugin, WTI Like Post. If you’d like to know more, continue reading.
To display a custom page template you usually rewrite the default WordPress query that is used to read the post / page content and display it: $wp_query
.
By doing so, you end up somehow breaking it’s flow and don’t let it finish correctly (this is not what happens, you really break it though).
This, for instance, prevents the query to correctly set the current-menu-item and other css classes to the menu items that should be marked as selected when visiting a page with a custom template inside.
Let’s see where it goes wrong.
We all probably noticed more than once that PayPal’s got a very bad conversion rate, which usually makes you spend more money than expected, when buying stuff in another currency.
If you are like me and don’t want to spend 30€ instead of 25€ and donate the rest to PayPal because you are buying in a foreign currency, follow the steps below and let your bank manage the currency conversion instead of PayPal.
Your bank’s conversion rate will usually be similar to the one that Google uses when you use it to convert the price.
Set the permissions of all the files to 664 (current directory and all subdirectories)
find . -type f -exec chmod 664 {} +
Set the permissions of all the directories to 775 (same as above)
find . -type d -exec chmod 775 {} +
Another awesome guy that has a huge amount of talent and uses it to make great music.
Daft Punk again, this time with a special instrument.
Enjoy the show!
Listen to Atlas, the new song by Coldplay, released yesterday, the 6th of September 2013.
Taken from the soundtrack of the upcoming movie The Hunger Games 2.
Not bad, Coldplay. Not bad.
You can already find this process on other sites around the web, but it was only in a comment I found out that this only works with default forms (and not with custom made forms created by you). This is why you need to edit NewForm.aspx, DispForm.aspx or EditForm.aspx.
Also, to be able to use this you must be a Site Collection administrator.
This is done using prototype.js and SPUtility.