Sunday, August 4, 2013

brew: command not found

If HomeBrew is not installed, Please follow the instruction mentioned here

1. Install XCode, check whether command line tools are installed or not.

2. $ gcc --version

3. It will display "i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."

4. Then you can execute the following command to install the home brew
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

5. It will display "You should run `brew doctor' *before* you install anything." as last sentence after installing the home brew

6. Now type "$ brew doctor" .

7. Before implementing the recommendation, make sure whether it correct or not.

8. Finally, $brew update. That's it.

Reference : http://ricardianambivalence.com/2012/10/02/install-homebrew-on-your-mac-a-tutorial/

Install RVM Error

Can not find compiler and 'make' tool - make sure Xcode and/or Command Line Tools are installed.


1. Check whether you have install Xcode and its command line tools.

2. After installing the XCode, click on Xcode -> Preferences -> downloads

3. Check whether "Command Line Tools" got installed or not.



Thursday, July 18, 2013

System.Web.HttpException: The length of the query string for this request exceeds the configured maxQueryStringLength value

By default, the query string lengths was set to 2048 characters. To change the query strings length, modify the maxQueryStringLength attribute in httpRuntime.
It will be in the web.config file. <system.web> <httpRuntime /> </system.web>
<httpRuntime maxRequestPathLength="260" maxQueryStringLength="2048" />


Tuesday, April 2, 2013

PHP - IFrame - IE issues

I was banging my head for a week to fix the issue with sessions not maintaining in PHP iFrame in IE browser.

I thought this would be helpful for others.

In IIS7, click the site, goto Feature view, click the "HTTP Response Header"


  1. In the Custom HTTP Headers box, click Add.
  2. In the Custom Header Name text box, type p3p.
  3. In the Custom Header Value text box, add your compact codes. For example, to have the following mini header for your site

     P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"


Tuesday, March 12, 2013

MakeCert Error: Too many parameters

Sometime, while copy pasting the command in command prompt the minus sign "-" will be understand differently, so try changing the '-' characters to the correct one. Its will work.


Error: CryptCertStrToNameW failed => 0x80092023 (-2146885597)

You get this error, when the CN contains characters not conform to X500. In your example you use a name such as "CN=norcron-develop". Here the "-" causes the problem. The same also goes for ".", "," and ";" 


Error: WriteFile failed => 0x5 (5)

Open the command prompt as admin

MakeCert.exe not found

You can find this file in Windows SDK

Path : C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin


Use the makecert and pvk2pfx tools that ships with Visual Studio (e.g. C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin\makecert.exe) to create certificate files and private key files.

Makecert.exe –r –pe –n “cn=www.idp.com” –sv idp.pvk idp.cer

You then need to convert the PVK file to a PFX file so it can be loaded with the .NET framework classes.

Pvk2pfx.exe –pvk idp.pvk –spc idp.cer –pfx idp.pfx –po <password>

Refer to the Microsoft help for additional options.

Generate .pem from pfx : http://help.globalscape.com/help/eft6-2/mergedprojects/eft/exporting_a_certificate_from_pfx_to_pem.htm

Wednesday, March 6, 2013

Frequently Used Methods


Browser Close Button detection using JavaScript


    window.onbeforeunload = confirmClose;
            function confirmClose(e){
                var Confirm_Close = "0";
                if(Confirm_Close=="0")
                {
                    var msg = "Are you sure?";
                    if (e) {
                        e.returnValue = msg;
                    }

                    return msg;
                }
                else{
                    Confirm_Close="0";
                }
            }



Detect any hyperlinks detection event


$(".pageclass a").click(function()
{
});


Relief from tool-tip headache

http://jqueryui.com/tooltip/#tracking

Saturday, March 2, 2013

First Android App

Are you ready to start creating your own App?

If you are not familiar with android application development environment, click here.

Let's Start.

In this example, I have just given the multi-line text in the screen. The main intention of this app, is just make yourself feel proud that you have created Your own app and get familiarized with the Eclipse ADT. Later we can see how can we build sophisticated app.

First, Create the Android Application project,

click on the img for original size

You will get the option to give the application name, project name and package name. And also, select the SDK version and theme.

click on the img for original size


Click Next, Configure Project option screen will appear, -> Click Next. Configure Launcher Icon -> Click Next. Create Activity -> Select FullScreenActivity -> Click Next. New FullScreen Activity -> Give the name for your Activity and Layout. Click Finish. You will see the IDE, just like below, if you choose the perspective as "Java Browsing"(Menu->Windows->Open Perspective->Java Browsing).

click on the img for original size




If you execute your project, It will ask you to choose the Android Virtual Device. Click the Manager and configure it as like

click on the img for original size

Click Ok and execute, your first app is ready. 

click on the img for original size


Soon, I'll update this post for the following questions, that I assume already popped up in your mind.... Keep following the post.


What is FrameLayout?

What is Activity class and Does all the class should inherit the Activity class?

What the members of activity class? which is most frequently used members?

What are auto-generated java files? Can we modify the auto-generate java files?

What are the required JAR files?

How can we test the Android app locally and in App Store?

How can we upload our App in PlayStore and reachable to everyone?

What is the best way to define the configuration for AVD(Andriod Virtual device)?