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

Wednesday 15 July 2015

STOCKS

The Indian market trend comes handy

Guruji.com the most powerful Indian search engine and India's Number one music search engine has yet another feature that proves itself. Guruji finance offers most interesting and a powerful market trend analysis site can be used as a powerful market analysis tool to forecast and predict the future returns about various equities,mutual fund and commodities. Google finance also has a similar interface but not suitable for the Indian market as the data fetch by it is delayed for India market.




Lets showcases some of the best usages and tools that is offered by Guruji finance.
  • Sensex, Nifty Chart
  • Portfolio,Watchlist and Finance
  • News and Research about a particular equity
  • Top gainers and losers
  • Sector wise performance
  • Mutual funds
  • Futures
  • World currency
  • Search for a particular stock
  1. Create Portfolio and track your stocks with real time data and analysis 


     2.  Search and get performance of a particular stock