Wordpress Error: Download failed. There are no HTTP transports available which can complete the requested request.

Today I found this error when I tried to update to wordpress version to 4.3.1. Remember, my wordpress was hosted in IIS with Windows Server 2008 R2 Standard. In the past whenever I tried to update the wordpress it worked like charm.
It was very frustrating for me to suddenly receive the error

Download failed. There are no HTTP transports available which can complete the requested request.

On googling I found to uncomment the following extensions from php.ini
  • extension=php_curl.dll
  • extension=php_openssl.dll
Remember, I hosted my blog on windows environment with IIS so I uncommented both extensions from PHP folder (Where PHP is installed) & Windows folder as both of these folders were containing php.ini file. You just have to remove the preceding semi colon, save the file & that’s it you have enable the extension. If you guys know any other method to get rid of this error then please share in the form of comments.

Replace empty record in ms sql server

Couple of days ago while working in a project I got requirement to replace empty or we say blank record with space. Remember I am asking to replace the record that doesn’t exist with space, means it’s not related to NULL data, not related to space in column etc.
One more thing which was very strange for me at that time and I want to add it here that you can replace empty record with space by using different possible ways but to retrieve space in front end (Website) most of them doesn’t work and you may surprise that in ms sql server it is returning space but why let's suppose asp.net code is unable to get that space. So the methods work fine for me are listed below
NULLIF returns the first expression if the two expressions are not equal. If the expressions are equal, NULLIF returns a null value of the type of the first expression and if first expression is empty/blank then NULLIF returns a null value of the type of the first expression.

So that’s it. Enjoy your life.

Check whether first character in a string is capital or not

In this tutorial we will learn how to check whether first character in a string is capital or not. It’s pretty simple and don’t required any professional coding. Let’s have a look how to do so.
string mystring = "Adeel";

if (mystring[0].ToString() == mystring[0].ToString().ToUpper())
    Response.Write("First character is capital");
    Response.Write("First character is not capital");

So that’s it, this is the proper and simple way.

Happy Coding!!!


Make first character of a string upper case in asp.net

Couple of days ago I got requirement of make first character of a string upper case in asp.net. I found but unable to get any built-in function available in .net so after some sort of coding, I develop my own function.
public static string MakeFirstCharUpper(string inputstring)
    if (String.IsNullOrEmpty(inputstring))
        throw new ArgumentException("ARGH!");
    return inputstring.First().ToString().ToUpper() + String.Join("",inputstring.ToLower().Trim().Skip(1));

So that’s it. Just you have to call this function and you will get desired output.

Happy Coding!!!


Image printing problem in google chrome

In this article we will look how to fix the image printing problem in Google chrome. Most of the developers complaint that there code snippet for printing content of any div works well in all browsers except chrome, they can see images being printed in all browsers but in Google chrome neither images shown in print preview nor printed. So for Google chrome the workaround is pretty simple, just you have to add the <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\> and that's it. How? Let’s have a look

Image printing problem in Google chrome

        function printcontent() {
            var docType = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
            var disp_setting = "toolbar=yes,location=no,directories=yes,menubar=yes,";
            disp_setting += "scrollbars=yes,width=800, height=800, left=50, top=25,_blank";
            if (navigator.appName != "Microsoft Internet Explorer")
                disp_setting = "";

            var content_vlue = document.getElementById("divContent").innerHTML;
            var docprint = window.open("", "", disp_setting);


            docprint.document.write('</head><body style="padding:0;margin-top:0 !important;margin-bottom:0!important;"   onLoad="self.print();self.close();">');

            //document.write(doct + divContent.innerHTML);

<div id="divContent">
        <table width="100%" cellpadding="2" cellspacing="2">
                    <img src="img/web_logo_new.jpg" alt="logo" /></td>
                <td>Some content will come here </td>

    <input type="button" value="Print" onclick="printcontent();" />

So that's it. Hopefully it will fix your problem of printing images in Google chrome.