Wednesday 5 August 2015

ATM

If your ATM card blocked after entering wrong PASSWORD 3 times then here is the solution.

Last week a friend of mine tried to withdraw some cash using his HDFC Debit card at a Union Bank of India ATM. May be he was in some sort of hurry, he entered his PIN wrongly, thrice. As you’d expect, his Debit card was blocked. It was written on the ATM transaction slip: ‘ATM card blocked, please visit your branch’.

I told him that it’d only be blocked for a day and in case he remembers the PIN correctly he can use the same PIN without any problem from the next day. He wasn’t convinced and immediately went to his home branch, which was just a Kilometer or so away from where we were. Another friend of mine accompanied him to the branch while I was waiting there. They came back, with confirmation that the same PIN will work after 24 hours.
So why this story now?
Because in case you come across such situation, all you need to do is wait for a day and then try with the same PIN again tomorrow. My friend has a HDFC Debit card, and I can confirm this is also applicable to ATM/Debit cards of popular banks such as SBI (and all its associate banks), ICICI Bank, Axis Bank and PNB.
In case you really forgot the PIN, then you need to visit the branch or call the respective phone banking numbers to get your PIN reset. Different banks’ have different charges for resetting the PIN. For SBI or its associate banks’, its a nominal charge of Rs.100.
Note: Your card can also be blocked if you enter the PIN wrong (3 times) at a Point of Sale, for example at any merchant store. And it will also be blocked, if 3 wrong entries occur in a combination of ATM and Point of Sale tries, such as 2 at ATM and 1 at Point of Sale.

PIN RESET 
If you enter your PIN wrongly thrice or you have forgotten your PIN, you should immediately get a new PIN. Now, you don’t have to get a new ATM card to get a new PIN. You can simply get the PIN reset at the branch while using the existing card itself. A charge of Rs.51 will be charged to reset your PIN.
In future, the bank aims to make this process even more easy by bringing the feature of PIN reset online. Users will be able to reset their ATM PIN using their Internet Banking account. Certain prepaid travel cards from SBI already has this option to reset PIN online and this facility will soon be available for normal ATM Debit cards too.
In case where you know your PIN number and want to change it to something of your choice, you can do that by visiting any State Bank ATM itself. Insert your card and select services and then change the PIN number by entering your old PIN number first.

Friday 24 July 2015

MSDN

Diagnostic Tools debugger window in Visual Studio 2015

Diagnostic Tools debugger window in Visual Studio 2015

:(

Supported project types and configurations

The following startup project types and debugging configurations are supported by the Diagnostic Tools window in Visual Studio 2015 CTP 5:
  • Managed WPF, WinForms, Console projects running locally 
  • Native Win32, Console, and MFC projects running locally 
    • Note: the Debugger Events tool is currently not supported for Native projects 
  • ASP.NET 4 using IIS Express 
  • Managed or Native 32-bit Windows Store projects running locally 
The Diagnostic Tools window currently does not support:
  • ASP.NET 5 projects, or ASP.NET 4 projects using IIS 
  • Windows Store projects that are 64-bit, using JavaScript, or running on a remote device 
  • Targeting remote devices
http://blogs.msdn.com/b/visualstudioalm/archive/2014/11/13/memory-usage-tool-while-debugging-in-visual-studio-2015.aspx


http://blogs.msdn.com/b/visualstudioalm/archive/2015/01/16/diagnostic-tools-debugger-window-in-visual-studio-2015.aspx

Googlez

How Google works - Book Review

Google was a start up company. investor asked Eric to rally the  team  and create a plan that would establish clear deliverables across the company: product , sales , marketing , finance and corporate development. Plan needed to establish milestones and a roadmap of which products would ship and when.

To this day the rule of thumb is that late half of Google employees should be engineers.

Jonathan has plenty of experience in the "gate based" approach to building product which in most companies entails a series of well defined phases and milestone, governed by various executive reviews that escalate slowly up the corporate food chain . This approach is designed to conserve resource san funnel information up from far-flung silos to small set of design-makers.

Google engineers are business savvy and possessed a healthy streak of creativity.

Hire the best engineers and get out of their way.

How Google was able to beat Microsoft 11 billion dollar challenge is explained.

Why product excellence is required.

Cost of experimentation and failure has dropped significantly.


http://www.wsj.com/articles/book-review-how-google-works-by-eric-schmidt-and-jonathan-rosenberg-1412371982
"company is a symbol of innovation, success and technology leadership."

Anyone managing technology-focussed team should read this book, though not all the lessons will translate outside of Google's unique culture or the era when many of the decisions were made.

If you believe that Google sees the world as zeros and ones and manages that way, this book should serve to ground you in the potential challenges faced by management trying to see decision-making programmatically. What you will find is a framework held together by talented engineers, supported by an insatiable demand for data, and acted on with a set of principles that aren’t always as binary as “smart creatives” might prefer.


http://www.economist.com/news/books-and-arts/21620056-search-giant-shares-some-its-business-methods-dont-be-modest

Though it is not discussed in the book, Google’s management philosophy doubtless springs from the careers of the founders, Sergey Brin and Larry Page. Their youth, vision and technical genius, together with Google’s vast wealth, enabled the company to take risks that others would never contemplate. This is why it vies to photograph every street in the world and scan every book ever published, to say nothing of building self-driving cars and glasses that record almost everything.

In large part Google grew because it threw out the traditional MBA playbook; its success speaks for itself. However, this underscores a shortcoming of “How Google Works”. The experience of Messrs Schmidt and Rosenberg is so coloured by Google’s accomplishments that many of their recommendations best apply to managing teams of aces in lucrative, fast-growing markets, not to overseeing a wide range of talent in low-margin businesses—the life of most managers.

Androidz

Solution for Android SDK Manager not opening in Windows 8


I have installed windows 8 in my laptop and tried to open ‘Android SDK Manager’. It was not open. By googling I found the solution as below. 

Solution:- Go to android-sdk folder what you had set path under windows->preference menu for android.
Edit android.bat file.
Find java_exe=
And in front of add Java.exe path like “C:\Program Files (x86)\Java\jdk1.6.0\bin\java.exe

HTML

How to display Progress bar while page is loading


<pre>
<code>
protected void Page_Load(object sender, EventArgs e)
{
showPageLoad();
//do somthing
    }
private void showPageLoad()
{
int i=0;
Response.Write(“<div=’divTitle’>Loading(<span id=’message’>0%</span>)</div>”);
Response.Flush();
for(i=5;i<=100;i=i+5)
{
System.Threading.Thread.Sleep(200);// any codes can be typed here
outputflash(i.ToString() + “%”);
Response.Flush();
}
}
private void removePageLoad()
{
ScriptManager.RegisterStartupScript(Page, this.GetType(), “deleteLoading”, “var d = document.getElementById(‘divTitle’);d.parentNode.removeChild(d);”, true);
    }
private void outputflash(string value)
{
Response.Write(“<scriptpe=’text/javascript’>document.getElementById(‘message’).innerHTML='” + value + “‘;</script>”);
    }
</code>
</pre>

FTP

How to Download / Upload Files on FTP Server


Require following ftp details where you want to upload the files:
FTP URL: “ftp://ftp.yoursite.com/”
FTP Username: username
FTP Password: password
FTP Port: 21


Upload File

public string UploadFile(string FtpUrl, string fileName, string userName, string password, string UploadDirectory = "")
        {
            string PureFileName = new FileInfo(fileName).Name;
            String uploadUrl = String.Format("{0}{1}/{2}", FtpUrl, UploadDirectory, PureFileName);
            FtpWebRequest req = (FtpWebRequest)FtpWebRequest.Create(uploadUrl);
            req.Proxy = null;
            req.Method = WebRequestMethods.Ftp.UploadFile;
            req.Credentials = new NetworkCredential(userName, password);
            req.UseBinary = true;
            req.UsePassive = true;
            byte[] data = File.ReadAllBytes(fileName);
            req.ContentLength = data.Length;
            Stream stream = req.GetRequestStream();
            stream.Write(data, 0, data.Length);
            stream.Close();
            FtpWebResponse res = (FtpWebResponse)req.GetResponse();
            return res.StatusDescription;
        }

Download File

 public static string DownloadFile(string FtpUrl,string FileNameToDownload,
                        string userName, string password,string tempDirPath)
    {
        string ResponseDescription = "";
        string PureFileName = new FileInfo(FileNameToDownload).Name;
        string DownloadedFilePath  =  tempDirPath+"/"+PureFileName;
        string downloadUrl = String.Format("{0}/{1}", FtpUrl, FileNameToDownload);
        FtpWebRequest req = (FtpWebRequest)FtpWebRequest.Create(downloadUrl);
        req.Method = WebRequestMethods.Ftp.DownloadFile;
        req.Credentials = new NetworkCredential(userName, password);
        req.UseBinary = true;
        req.Proxy = null;
        try
        {
            FtpWebResponse response = (FtpWebResponse)req.GetResponse();
            Stream stream = response.GetResponseStream();
            byte[] buffer = new byte[2048];
            FileStream fs = new FileStream(DownloadedFilePath, FileMode.Create);
            int ReadCount = stream.Read(buffer, 0, buffer.Length);
            while (ReadCount > 0)
            {
                fs.Write(buffer, 0, ReadCount);
                ReadCount = stream.Read(buffer, 0, buffer.Length);
            }
            ResponseDescription = response.StatusDescription;
            fs.Close();
            stream.Close();
        }
        catch(Exception e)
        {
            Console.WriteLine(e.Message);
        }
        return ResponseDescription;
    }

SQL

Creating Transaction SQL Server



BEGIN TRANSACTION
BEGIN TRY

    -- put SQL commands here    INSERT/UPDATE/Delete

    -- if successful - COMMIT the work
    COMMIT TRANSACTION
END TRY
BEGIN CATCH
    -- handle the error case (here by displaying the error)
    SELECT 
        ERROR_NUMBER() AS ErrorNumber,
        ERROR_SEVERITY() AS ErrorSeverity,
        ERROR_STATE() AS ErrorState,
        ERROR_PROCEDURE() AS ErrorProcedure,
        ERROR_LINE() AS ErrorLine,
        ERROR_MESSAGE() AS ErrorMessage

    -- in case of an error, ROLLBACK the transaction    
    ROLLBACK TRANSACTION

    -- if you want to log this error info into an error table - do it here 
    -- *AFTER* the ROLLBACK
END CATCH