Today is my first day in my machine to work in Windows 10. And my machine has Windows 10 installed alongside Ubuntu 14.04 LTS. But I faced my very first problem with Windows 10 today that was related to NTFS drive mounting from Linux. At last I figured out the problem.
If you use Windows 10 and Linux in same machine then when you will use Windows 10, by default Windows 10 has Fast startup turned on and that will prevent mounting your Hard disk again from Linux OS. So in that case you have to turn of the Fast startup option from your Windows 10 so you can again mount your hard disk from your Ubuntu Machine.
Lots of folks out there about to make your website Mobile-friendly. It’s obvious that there will be significant impact on your website if your site is not mobile-friendly or what we regularly call ‘responsive’. Mobile friendly sites will get higher rank in search results in Google. And Google already started to rolling out this algorithms.
After searching on internet, I didn’t get any quick solution to check mobile-friendliness website in PHP. Although Google published it’s official Mobile-friendliness Test Tools.
When I tried to find some solutions then I figured out that Google has it’s public Pagespeed Test API v2. But in this version Google didn’t make it clear to see Pass or fail result for mobile-friendliness test. It only shows UX score. But in their v3beta1 API version they have a clear indicator about mobile-friendliness. And I figured it out and made a simple PHP functions to check the mobile-friendliness test of any website. Here is my scripts:
Now, run your script and you will get the following array.
From the above array $result['ruleGroups']['USABILITY']['pass'] is the actual result of your website’s mobile-friendliness status. true means your website is mobile friendly and false means your failed to make your website mobile friendly. Simple.
Have fun! Write comments if you need any more assistance.
This example will help you to learn how to interact between your backened RESTful apps and AngularJS. AngularJS has a service factory called ngResource which you can use to do CRUD operation with your RESTful backend application.
Here you just need to define the service factory which will get all notes by calling an ajax request to your http://yourRESTAPIBackendserver.url/notes. Also you can do rest of the CRUD services with that script. This script represents very basic usage of ngResource. So you learn it and try to DYI.
Don’t forget to add the main angularjs library and ng resource service library in your html head tag.
Whoever loves to work with Twig template system for their PHP driven web application may want to implement AngularJS within Twig template. But the main problem will be Twig’s curly braces. AngularJS and Twig both use __ inside their template to output data. So simply, it can cause trouble to work with this two lovely systems together in your application.
But here is the solution. According to AngularJS $interpolateProvider docs I figured out the easy solution. You can change AngularJS __ symbol with any other symbol. Cool! So see how you will override that configuration.