Saturday, December 14, 2013

Book Review : Instant Responsive Web Design [Instant] - Cory Simmons




Quick and to the point 

RWD is short introduction to designing responsive web pages. It includes start code, some best practices and lots of pointers to information that will help you learn more about responsive web. It is written in a simple and clear manner keeping it short and to the point. The author focuses on the main point and you can read this book and try out lots of code in a day.






Some examples of what is covered in the book:
1. media queries like max-width, braille, handheld
2. screen, print interface
3. Different strategies to make responsive websites
Goldilocks Approach
The Fluid Approach
4. Design aspects
Desktop first v Mobile first
5. Media
Images and Movie responsive


Table of Contents
Instant Responsive Web Design
Instant Responsive Web Design
So, what is Responsive web design (RWD)?
Getting started
Quick start – making your first responsive web page
Step 1 – creating an HTML page
Step 2 – adding a stylesheet
Step 3 – making it responsive
Top 5 features you need to know about
The power of CSS Media Queries
Media types
Logical operators
Different strategies to make responsive websites
The Goldilocks approach
The Fluid approach
Desktop-first versus Mobile-first
Desktop-first
Mobile-first
Gotchas and best practices
Putting it all together
People and places you should get to know

Download code : http://www.packtpub.com/support/14547
Link to book : http://www.packtpub.com/responsive-web-design/book

Wednesday, December 04, 2013

Mom365 customer care

image

Tuesday, November 05, 2013

Error on AMC website

 

image

 

Server Error in '/Forms' Application.

A potentially dangerous Request.Form value was detected from the client (Comment="...10:27 PM, <CustomerService@amc...").

Description: ASP.NET has detected data in the request that is potentially dangerous because it might include HTML markup or script. The data might represent an attempt to compromise the security of your application, such as a cross-site scripting attack. If this type of input is appropriate in your application, you can include code in a web page to explicitly allow it. For more information, see http://go.microsoft.com/fwlink/?LinkID=212874.
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (Comment="...10:27 PM, <CustomerService@amc...").
Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
  <%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (Comment="...10:27 PM, <CustomerService@amc...").]
System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) +9664445
System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection) +184
System.Web.HttpRequest.get_Form() +55
System.Web.HttpRequest.get_HasForm() +9666031
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +95
System.Web.UI.Page.DeterminePostBackMode() +69
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6704
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245
System.Web.UI.Page.ProcessRequest() +72
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +58
ASP.amcstubs_irpt_update_amcstubs_aspx.ProcessRequest(HttpContext context) +37
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69




Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18056


Sunday, November 03, 2013

Website Scalability

Scalability

Sessions. Unless you use 'sticky' load balancing, you will have to have some way of sharing session state between servers. This probably means storing session data on either shared storage, or in a DB.

File uploads and replication. If you allow users to upload files, or you have a CMS that allows you to upload images/documents, it needs to cater for the fact that these files will also need to find their way onto other nodes in your cluster. However, if you've gone down the shared storage route mentioned above, this should cover it.

DB scalability. If you're using traditional DB servers, you might want to think about how you'll implement scalability at that level. This may mean coding your app so you use one connection string for reads, and another for writes. Then, you are free to implement replication with one master node handling the inserts/updates cascading the changes to read only nodes that handle the bulk of the work.

Middleware. You might even want to go down the route of implementing some kind of message oriented middleware solution to completely hand off business logic functions - this will give you a great level of flexibility in how you wish to scale this business logic layer in the future. Although initially this will be a lot of complication and work for not a great deal of payoff.

Load balancer

Friday, November 01, 2013

How to fix Healthcare.gov

CDN
minified Js
Load testing


UI issues
apply now, start here
enter address and details for each family member
carousal scrolling
sitemap organization
error and try again requires to fill application again
no clear messages

Wednesday, October 30, 2013

Boston.com

Boston.com was redirecting to mobile.boston.com immediately after Red Sox won the World Series 2013

image

Monday, October 28, 2013

Children’s Hospital Boston

ColdFusion error page without any user friendly error message! – well almost user-friendly Winking smile 

image

Saturday, October 12, 2013

Server4you Review

Disadvantages
Wrong invoice
Support in Germany
Support and Customer Service does not understand English
Servers are old and frequently go down
Customer Service do not acknowledge their server issues
Not easy to transfer between servers

Advantages
One of the cheapest Server space
simple and clean interface

Thursday, October 10, 2013

Saturday, October 05, 2013

Rooting HTC Inspire 4G/HTC Desire HD

The HTC Inspire 4G with its 4.3 inch touchscreen and 1.0 GHz processor is a fantastic device for daily use. On paper, the Inspire 4G is overshadowed by many dual-core devices, but once you have root access on this device, the possibilities are endless. My prime for rooting include sluggishness of the device, more than 10 apps installed by service provider AT&T, speakerphone not working (needs patch), inability of HTC to release ICS update.
Thanks to a rooting kit known as the Advanced Ace Hack Kit, HTC Inspire 4G owners will never have problems in rooting their phone again. Using this method will not only root your device but also SIM-Unlocks your phone as well as letting you gain S-OFF on your phone.
Features:
  • COMPLETELY INTEGRATED/INVISIBLE GOLD CARD PROCESS
  • Only ONE menu step
  • No ROM downgrade required (only radio/kernel)
  • No wiping data
  • Rom is fully functional (yes, inc wifi)
  • Fully rooted with insecure boot image (supports adb remount for rw system)
  • Busybox manager app installed
  • S-Off, superCid & carrier sim unlock
  • Correct Radio is automagically restored for HSPA+ operation
  • ClockworkMod Recovery and ROM Manager included
  • Both stock Froyo and Gingerbread (pre Sense 3.0) supported
  • Easy return to stock for AT&T, Telus and WWE CID HTC__001
  • Much smaller download
  • Much smaller firmware flash to obtain the exploit – comparatively very fast processing.

Warnings

Do not attempt this procedure on any other device other than the HTC Inspire 4G.  Using this procedure on a non-compatible phone can result in damage.
Certain builds of HTC Sense 3.0 will necessitate downgrading to earlier versions in order for the Advanced Ace Hack Kit to work.  Check the manual included in the package for the versions.  The Advanced Ace Hack Kit performs the downgrade automatically but, in the process, your phone data will be completely wiped; so, make sure you create backups of your important phone data including : messages, app data, phone book (sync with google contacts)

Requirements

  • HTC Inspire 4G running stock ROM (not a custom ROM)
  • A PC running Windows 7, Vista, XP, or XP Home
  • If you have Droid Explorer, remove it.
  • Remove HTC Sync.
  • Remove your phone’s drivers from your computer if the drivers are installed.
  • Remove any phone, PDA, or tablet management software on your computer.
  • Back up your important phone data.
  • Disable all system utilities such as antivirus and firewall programs before extracting the Advanced Ace Hack Kit.
  • If you have any Apple program running in the background or as a service, stop it.
  • Do not run any other program while the Hack Kit is running.
My idea : use Linux machine (I used my Ubuntu)

Instructions

  1. Download the Advanced Ace Hack Kit from here or here (aahk-13012012.zip, md5sum: d04975c6d085419c7c15f6d1934f7852) and save it to your PC.
  2. Extract the downloaded ZIP file and place the contents inside a single folder.
  3. The package includes the HTC USB drivers for your phone.  Use the installer file inside the “toolswindrivers” subfolder located within the extraction folder to install the drivers.  You may need to reboot your computer after installing the drivers.
  4. Enable USB Debugging on your phone. You can do this by heading to Settings > Applications > USB Debugging. Make sure that there is a check mark beside that option.
  5. On your phone, go to Menu > Settings > Connect to PC and set the default mode to “Charge only.”
  6. Connect your phone to your PC via USB cable in charge-only mode.  Use the USB port that is directly connected to the motherboard.  Do not use the USB port on the front panel.  Do not use a USB hub.  Do not use a USB extension cable.
  7. Open the folder where you extracted the Hack Kit files to.  Depending on your Windows version, right-click on the script file and run it as Administrator (from the popup menu):
    • hack-ace.cmd — for Windows 7 or Windows Vista
    • hack-ace.cmd — for Windows XP (make sure you’re logged in as Administrator)
    • hack-ace-xph.cmd — for Windows XP Home (make sure to use an Administrator user account)
  8. A command prompt window will open.  Type 1 to select “Hack Ace” and press the Enter key.
  9. You will see text on the screen as the script performs the following:
    • Copy the needed files
    • Root the phone temporarily
    • Turn your SD card into a goldcard (required for setting S-OFF)
    • Activating S-OFF
    • Setting SuperCID
    • Unlocking the phone from network/carrier (SIM unlock)
    • Install ClockworkMod Recovery
    • Root the phone permanently
    • Install the Superuser app and binaries
  10. During the whole process, your phone will reboot several times.  Do not touch the phone, turn it off, or unplug the phone while the script is still doing its job.

After Rooting

  1. Plug your phone into the computer via USB cable.
  2. Open a command prompt on your computer.
  3. Change directory (using the cd command) to where you extracted the Advanced Ace Hack Kit package files.
  4. Change directory to the “tools” folder (i.e., cd tools).
  5. Change directory to the “win” folder (i.e., cd win).
  6. Enter this command at the prompt:
    • adb reboot recovery
  7. The command above will reboot the phone into ClockworkMod Recovery.
  8. Reboot the phone into normal mode.
  9. Enter this command at the prompt:
    • adb reboot bootloader
  10. The command above will reboot the phone into fastboot mode.  The text at the top of the bootloader screen should show “S-OFF” and not “S-ON.”
  11. Enter this command at the prompt:
    • fastboot reboot
  12. Your phone will boot into normal mode.
  13. On your phone, launch the BusyBox Installer app.  From within the app, install BusyBox.  The Superuser app will prompt you to grant the app root permission.  Allow it to.
Congratulations! You successfully rooted your HTC Inspire 4G with S-OFF and with ClockworkMod Recovery installed.

Monday, September 30, 2013

Speed up website

Page load - CDN(static content or media), caching -  Cache page content, queries, expensive computation   
DB - connection pooling, distributed caching, in-memory db
profiler
reduce IO
load balancer and multiple servers
async processing and scheduling processes
compress pages and response

tools to benchmark and load test
soapUI
Fiddler
YSlow
JMeter

Saturday, September 21, 2013

Get Windows credentials from C# application

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Principal;

namespace ConsoleApplication1
{
    class Program
    {
        static string loggedInUser;
        static string userLocalGroup = null;
        static string usersGroupSIDs = null;
        static string currentUserDetails;

        static void Main(string[] args)
        {

            loggedInUser = WindowsIdentity.GetCurrent().Name;
            WindowsPrincipal principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());


            IdentityReferenceCollection irc = WindowsIdentity.GetCurrent().Groups;
            foreach (IdentityReference ir in irc)
            {
                usersGroupSIDs = usersGroupSIDs + " , " + ir.Value.ToString();
            }
            if (principal.IsInRole(WindowsBuiltInRole.Administrator))
                userLocalGroup = userLocalGroup + " Adminstrator ,";
            if (principal.IsInRole(WindowsBuiltInRole.AccountOperator))
                userLocalGroup = userLocalGroup + " AccountOperator ,";
            if (principal.IsInRole(WindowsBuiltInRole.BackupOperator))
                userLocalGroup = userLocalGroup + " BackupOperator ,";
            if (principal.IsInRole(WindowsBuiltInRole.Guest))
                userLocalGroup = userLocalGroup + " Guest ,";
            if (principal.IsInRole(WindowsBuiltInRole.PowerUser))
                userLocalGroup = userLocalGroup + " PowerUser";
            if (principal.IsInRole(WindowsBuiltInRole.PrintOperator))
                userLocalGroup = userLocalGroup + "PrintOperator ,";
            if (principal.IsInRole(WindowsBuiltInRole.Replicator))
                userLocalGroup = userLocalGroup + " Replicator ,";
            if (principal.IsInRole(WindowsBuiltInRole.SystemOperator))
                userLocalGroup = userLocalGroup + " SystemOperator ,";
            if (principal.IsInRole(WindowsBuiltInRole.User))
                userLocalGroup = userLocalGroup + " User";

            // }
            currentUserDetails = WindowsIdentity.GetCurrent().ToString();

            Console.WriteLine("Logged in user : " + loggedInUser);
            Console.WriteLine("Logged in user belongs to Local Groups : " + userLocalGroup);

            Console.WriteLine("Logged in user belongs to SID Groups : " + usersGroupSIDs);
            Console.WriteLine("Current user Object is  : " + currentUserDetails);
        }
    }
}

Bank of America–error page

image

Wednesday, July 17, 2013

Black box appears in youtube videos while watching a playlist

 

image

it's an iframe which this is it's ID

id="watch7-playlist-tray-mask"

Temp Fix

If you use developer tools you can delete it, or hide it.

But this is annoying since you'll need to do it too often.

More Permanent Fix...

If you are running adblock you can click on the badge for it and click "Block an ad on this page" and then click the top right area and just block it out or the whole top bar if you are feeling crazy.

More Permanent Fix Directed

Right Click on adblock –>options –>

goto customize tab

Click Edit for - Manually Edit Your Filters

add this:

www.youtube.com##IFRAME[ID="watch7-playlist-tray-mask"]

Saturday, July 06, 2013

Free Security Essentials

Avast Antivirus
Microsoft Security Essentials
Ms Firewall

Wednesday, June 26, 2013

LinkedIn error?!

image

Monday, April 15, 2013

Sunday, April 14, 2013

Wednesday, April 03, 2013

Comcast charges for self install !

One of the weird things – Comcast charges for self-install as well! So my time, my energy –$10 = comcast installation. I still don’t get it!

 

image

Monday, April 01, 2013

Thursday, March 28, 2013

Tmobile coding

image

Scripting gone wrong??

[%ESTIMATEDWAITTIME%]  [%QueuePosition%]

Thursday, March 14, 2013

Google Reader retiring :-(

image

Saturday, March 09, 2013

Tora–client for Oracle

image

Solution:

  1. Make sure that ORACLE_HOME path variable is set
  2. Make sure you install 32-bit Oracle server and Oracle client
  3. Install ODAC

Tuesday, March 05, 2013

The type initializer for Oracle.DataAccess.Client.OracleConnection threw an exception

For more details browse through the InnerException to make sure you get the correct exception

 

image

Sunday, February 17, 2013

Wednesday, January 02, 2013

Java 32-bit and 64-bit versions

Found out that Java 64-bit only works in Internet Explorer (IE). Mozilla and Chorme do not detect Java if 64-bit is installed. I had to uninstall all 64-bit versions and install 32-bit Java for all of the above browsers to detect.