Amazon Ad

Friday, 31 May 2013

How To Detect and Run Xolo A500 As Android Emulator

Hi Guys,

I bought a new Xolo 500 but was disappointed when the phone was not detected by my laptop. I tried to find out the solution as i wanted to run my apps on phone as android emulator.

Step 1. Install Intel Android USB driver from Intel's website.

Step 2. Recognize the files of type "Setup Information". This can be seen in the windows explorer in Type column.

Step 3. In my case, I was having the following files

1. android_winusb
2. gadget_multi
3. gserial
4. intelmtp
5. rndis

1. android_winusb : Go to my computer, right click and select properties, Click on "Device Manager".
Right Click on Unknown device and get the Hardware Ids. Copy the value which is like
"USB\VID_05C6&PID_9025&MI_00". Now open android_winusb present in C:\Program Files (x86)\Intel Android Device USB Driver and edit it

in notepad. Make the below line by using the copied hardware id and paste the line in my case its

%CompositeAdbInterface%  = USB_Install, USB\VID_05C6&PID_9025&MI_00

Now right click on the Unknown Device and click on Update Driver button. Select the Android Adb Interface and browse the driver from the location and install the driver. Once you install the driver you see the updated list in Device Manager.

Do the same for the above i.e gadget_multi, gserial,intelmtp and rndis and install the rest of the drivers required for the android device once all are done, Do remember to restart your machine. Once its restarted the phone is ready to use with your machine.

Hope this help!!

Thanks
Ritesh

Wednesday, 29 May 2013

Creating Customised Confirm Box In Phonegap

Hi Guys,

I was facing a problem with JavaScript confirm box with push notification timer. There is no way to close the JavaScript confirm box programatically. I have created my own confirm box using html and JavaScript which is also easy to handle and customizable.

Here is the HTML and JavaScript code for the same.

<div id="notificationpopup" style="left:0;top:0;position:fixed;width:100%;height:100%;background-color:#000;opacity:0.6">
           <div id="popup" style="margin-top:50%;background-color:yellow">
                  <div id="header">
                     <h2>Please Confirm</h2>
                  </div>
                 <div id="popupbody">
                     <div>Do you want to accept?</div>
                     <div>
                           <input type="button" value="Yes" onclick='dialog(1)'>&nbsp;
                           <input type="button" value="No" onclick='dialog(2)'>
                    </div>   
                 </div>
           </div>
</div>
<script src="js/jquery.1.7.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
               function dialog(response)
               {
                        if(response==1)
                          alert("You Clicked Yes");
                        else
                          alert("You Clicked No");
               }
</script>

Thanks
Ritesh

Wednesday, 8 May 2013

Column increment not generating unique values in MS SQL


Hi!,

Sometimes there is a need to increment a column value for generating unique ids. People usually increment the value by one to update the column's value, But sometimes the same value is generated as the requests come at same time and query executes for the request at the same time which results in duplicate values. Here is the solution for the problem

DECLARE @IncrementId AS INT

BEGIN TRANSACTION

SELECT @IncrementId = LastId + 1 FROM table_name WITH (TABLOCKX)

Commit Transaction

END

TABLOCKX acquires exclusive lock on the table it also restricts the deadlocks on the table, There is also TABLOCK which acquires "shared" lock on the table.

How to implement Captcha v3 in ASP.NET

 I was facing an issue of dom parsing in my website. I finally resolved it by using Google Captcha V3. Step 1: Get your keys from https:...