Posts

Showing posts from February, 2017

Remove image_url related error appearing during structured data testing

Image
So your blog has structured data and now want to make sure that the web crawlers should also understand that you have placed structured data on your blog. The best way to make sure that is to test your blog URL using  https://search.google.com/structured-data/testing-tool . This is not a validator of the tags in your blog but a tool, using which Google makes sure it can read structured data from the page and if required can appear as a  rich card  in a search result. If you have a blog on Blogger and have validated it using the Google structured data testing tool, there are chances that you might have seen below error: The property postId is not recognised by Google for an object of type BlogPosting. Below are the steps to how to remove postId related error appearing during Structured data testing. Go to  Blogger.com Select the Blog in which you want to make the change. Click "Template" in the left menu. Click on "Edit HTML" Once the HTML editor appears

Copy local file to Azure storage

Image
When working with Azure you may require copying a file to and fro between Azure storage. Now when the Azure Price are reduced , you too might want to move your files to Azure. Copying a file to Azure is easy. You will need to have Az Copy   installed. Once you have installed it you can use the command prompt to copy files to Azure. You must execute AzCopy executable file from the directory in which it is installed. Below is the code to copy "sample.txt" from the local machine to Azure Storage. The code required access key of the storage the file is copied to or from. I use the above code in a batch file so I have mentioned the code to move to the "C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy" folder because by default the Az Copy tool is installed in that folder. The code also requires access key of the storage where the file is copied to or from. This access key can be found in Azure. Below screenshot shows you how to get the storage access key in Azure po

Storing and retrieving data using HTML Local Storage

Here is the sample HTML file with javascript to store data in HTML local storage. You can run it here. Click the below button to add the lines for text1, text2 and text3 in local storage. Add This is text1. Sample text2. Text3 example. If you are using Google Chrome below are the steps to check if the data was stored. Click Menu > More Tools > Developer Tools (Ctrl + Shift + I) Click "Application" In the left pane under Storage navigate to Local Storage > http://SQLGear.blogspot.in In the right pane, you could find the data you just inserted against the key "List".

Get JSON data using Javascript

Below is the code of a simple HTML page used to fetch JSON data. I am using https://jsonplaceholder.typicode.com/ to fetch JSON data from. You can test it here.

Loop through all list items under an ordered or unordered list

Suppose you have the following HTML Code and you want to loop through each <li> tag under the top <ul> or <ol> tag: <ul id=" idOfTheListTag "> <li><ul> <li><input checked="1" type="checkbox" /></li> <li>A1</li> <li>B1</li> <li>C1</li> <li>D1</li> </ul> </li> <li><ul> <li><input checked="1" type="checkbox" /></li> <li>A2</li> <li>B2</li> <li>C2</li> <li>D2</li> </ul> </li> <li><ul id="menu"> <li><input checked="1" type="checkbox" /></li> <li>A3</li> <li>B3</li> <li>C3</li> <li>D3</li> </ul> </li> </ul> To loop through all the <li> tags below is the javascript function:

Moving SQL Database to In-Premise from Azure? Consider this first.

Image
You can find many articles on the internet for moving to SQL Database but very less on moving to in-premise from SQL Azure . SQL Azure is a good product but sometimes you will need your database to move or copied over to in-premise SQL Server for a task. SQL Azure constantly updating itself and if your in-premise SQL Server in not of the latest version you might face error while trying to import it. This happens when developers are developing on SQL Azure so the code they had written was not tested for compatibility with in-premise. If you start importing the .bacpac file you might face only one error at a time. You fix that in SQL Azure and again start and export and then try importing it and again you face an error with another object. You will face only one error at a time even the database has more than one compatibility issues. So how to know how many such issues are there in SQL Azure database? To find that you have to do this check. Even before you start to export your database

Azure - A system maintenance operation is in progress

Recently while changing the pricing tier of one of the Azure databases I faced following error: Operation name: Update SQL database Error code: 45197 Message: A system maintenance operation is in progress on server 'servername' and database 'databasename.' Please wait a few minutes before trying again. I tried it again and again but was facing the same message. Ultimately it was resolved by the Microsoft Product Group team efficiently and in due time. There could be different reasons for the issue to occur but this was caused because of following reason as per Microsoft: When a database’s performance tier is changed, the database is moved from a container with the old performance tier to a container with the new performance tier.  The old container is then cleaned up at the end of the process.  In this case, cleaning up the old container was not making progress. It was mitigated by the MS support team by  manually forcing the cleanup to occur. As of now,

Remove headline related error appearing during Structured data testing

Image
So your blog has structured data and now want to make sure that the web crawlers should also understand that you have placed structured data on your blog. The best way to make sure that is to test your blog URL using  https://search.google.com/structured-data/testing-tool . This is not a validator of the tags in your blog but a tool, using which Google makes sure it can read structured data from the page and if required can appear as a  rich card  in a search result. If you have a blog on Blogger and have validated it using the Google structured data testing tool, there are chances that you might have seen below error: A value for the headline field is required. Below are the steps to how to remove headline  related error appearing during Structured data testing. Go to  Blogger.com Select the Blog in which you want to make the change. Click "Template" in the left menu. Click on "Edit HTML" Once the HTML editor appears, click inside the edit

Remove URL related error appearing during Structured data testing

Image
So your blog has structured data and now want to make sure that the web crawlers should also understand that you have placed structured data on your blog. The best way to make sure that is to test your blog URL using  https://search.google.com/structured-data/testing-tool . This is not a validator of the tags in your blog but a tool, using which Google makes sure it can read structured data from the page and if required can appear as a  rich card  in a search result. If you have a blog on Blogger and have validated it using the Google structured data testing tool, there are chances that you might have seen below error: A value for the url field is required. Below are the steps to how to remove url  related error appearing during Structured data testing. Go to  Blogger.com Select the Blog in which you want to make the change. Click "Template" in the left menu. Click on "Edit HTML" Once the HTML editor appears, click inside the editor and press Ctrl+F.

Remove image related error appearing during Structured data testing

Image
So your blog has structured data and now want to make sure that the web crawlers should also understand that you have placed structured data on your blog. The best way to make sure that is to test your blog URL using  https://search.google.com/structured-data/testing-tool . This is not a validator of the tags in your blog but a tool, using which Google makes sure it can read structured data from the page and if required can appear as a  rich card  in a search result. If you have a blog on Blogger and have validated it using the Google structured data testing tool, there are chances that you might have seen below error: A value for the image field is required. Below are the steps to how to remove image  related error appearing during Structured data testing. Go to  Blogger.com Select the Blog in which you want to make the change. Click "Template" in the left menu. Click on "Edit HTML" Once the HTML editor appears, click inside the editor and press C

Remove Publisher related error appearing during Structured data testing

Image
So your blog has structured data and now want to make sure that the web crawlers should also understand that you have placed structured data on your blog. The best way to make sure that is to test your blog URL using  https://search.google.com/structured-data/testing-tool . This is not a validator of the tags in your blog but a tool, using which Google makes sure it can read structured data from the page and if required can appear as a  rich card  in a search result. If you have a blog on Blogger and have validated it using the Google structured data testing tool, there are chances that you might have seen below error: A value for publisher field is required. Below are the steps to how to remove publisher  related error appearing during Structured data testing. Go to  Blogger.com Select the Blog in which you want to make the change. Click "Template" in the left menu. Click on "Edit HTML" Once the HTML editor appears, click inside the editor and pr

Remove dateModified related warning appearing during Structured data testing

Image
So your blog has structured data and now want to make sure that the web crawlers should also understand that you have placed structured data on your blog. The best way to make sure that is to test your blog URL using  https://search.google.com/structured-data/testing-tool . This is not a validator of the tags in your blog but a tool, using which Google makes sure it can read structured data from the page and if required can appear as a  rich card  in a search result. If you have a blog on Blogger and have validated it using the Google structured data testing tool, there are chances that you might have seen below warning: The dateModified field is recommended. Please provide a value if available. Below are the steps to how to remove dateModified  related warning appearing during Structured data testing. Go to  Blogger.com Select the Blog in which you want to make the change. Click "Template" in the left menu. Click on "Edit HTML" Once the HTML editor a

Make Money from Surveys