Advertuse

Search This Blog

Your Ad Here

Monday, 15 August 2011

Cities of the future: Ahmedabad



compile by
Divyang Panchasara
Sr. Programmer Analyst
Hitech OutSourcing

Wednesday, 27 July 2011

Najarna Jam Chhalkavine

Najarna Jam Chhalkavine

compile by
Divyang Panchasara
Sr. Programmer Analyst
Hitech OutSourcing

Friday, 15 July 2011

Tesco: Homeplus Subway Virtual Store (Movie)



compile by
Divyang Panchasara
Sr. Programmer Analyst
Hitech OutSourcing

Tuesday, 12 July 2011

ViewBag v/s ViewData

Hi Friends,
If you go through ASP.NET MVC 3.0 framework then you will find  two frequently  used collection of data object which  used to pass data between control and views  and partial views. as both are doing similar functionality but has  some difference in that , so today , I would like to  put some difference of those and interoperability of that .



ViewData
ViewBag
It is dictionary of name/value pair  collection
It is dynamic  type object
This features exist since 1st release of ASP.NET MVC
This features available from ASP.NET MVC 3.0
This will work  in ASP.NET with .net 3.5 framework and above
This will work well with ASP.NET 4.0  with .net 4.0 framework and above
ViewData is faster compare to ViewBag   
ViewBag is slower than ViewData
While retrieving  data from viewData in to view pages , one need to do proper type casting
While retrieving  data from viewbag in to view pages , one need  not to do  type casting
Hence it make code with lots of  type casting  fragments
Hence it make more clear code

Friday, 8 July 2011

How to decompile Android application to get sourcecode

Hi Friends,
reverse engineering is everywhere. but reverse engineering is meant for  code review of  vulnerable application. so I hope you guys will not  use this reverse engineering  tricks to do any illegal things.
all android application are running  on Dalvik , which is a Virtual Machine having register-base  architecture and different from Java Virtual Machine by sun-microsystem (and now by oracle ) which is stack machine.
hence all android application is consist of Dalvik Executable (.dex).  hence to convert those  android application( *.apk) to source code we have to follow below steps

(Note : apk is packing of  .dex  file and other resources.)

step to decompile

1) convert  .dex file format to  .class file
2) convert  .class file format to  java code file

1) android application will come with .apk file format. which contains  .dex file .
hence  to convert .dex file in to .class file ( and those compress .class files  are placed in .jar file)
one need to have .dex  to  .class file converter .(both are binary format)
you can download such  tool from below link.


 after downloading you need to extract them and it will have following files in you  file system.




















Wednesday, 6 July 2011

MVVM framework comparison sheet




In this MVVM framework comparison sheet includes as many aspects as possible. However, it might be possible that some were missed. If you have features that are not included in the comparison sheet, or you find that information is incorrect, please let us know!
Below is short list of definitions:
Definition
Explanation
VM
View-Model



Sunday, 3 July 2011

How to prevent from Cross-site scripting attacks on your ASP.NET website?

Hi friends,
Security is major concern for our clients when they ask us to develop their website. Hence we have to take care of  attacks like sql injection and cross-site scripting attacks.
today I come across with a very good library to  prevent our website against cross-site scripting attacks.

Cross-site scripting (XSS) attacks occur when an attacker uses a web apps to inject malicious code(mainly scripting), generally in the form of a browser side script(means java script), to a different end user.

Friday, 1 July 2011

How to compress our websites..!!??

Hi friends,
when you have website which has heavy  pages( means all page are loaded with lots of html and css etc...) .It is recommended to compress your website pages while serving. This will decrease your network traffic at your server. To achieve such compression of your website pages while delivering to browser  is done by two way.
 1) By server  setting
 2) do custom coding  in your web application

Wednesday, 29 June 2011

When your client will concern about his db password


Hi friends,

When you get a client who is more technical ,then it accentuate on safety of his critical data. Recently I faced such type of client. When my client went through publish asp.net project on server and he found that our db password inside  web.config ‘s connection string , and  expressed his concern for  it safety of db password. so   he suggested me not to  placed in web.config moreover he asked me to  hardcoded that password in my asp.net code and obfuscate that dll..!!.

Monday, 27 June 2011

Atom v/s RSS

Hi friends,
  to follow's  our favorite blogs or websites, usually we subscribe Atom or RSS feed  provided by those blogs or  websites. so one should  know the difference  and similarity between them

.: Forget '.com', are you ready for '.google', or '.b...

.: Forget '.com', are you ready for '.google', or '.b...: "Think of it as a cyberspace land rush, as companies and others try to stake claims to websites ending with names like '.bank' Come next yea..."

compile by
Divyang Panchasara
Sr. Programmer Analyst
Hitech OutSourcing

Sunday, 26 June 2011

GUIDs (Globally Unique Identifiers) in .NET




Hi Friends,

GUID is frequently used in .NET and  SQL database system to set uniqueness of record or object.  And my friend  Priyank has  describe GUID very nicely in his latest post on his blog so I have repost  it here. you may like it. and you can refere his blog by clicking his  name to read  full blog.

Saturday, 25 June 2011

Validation in HTML5 without JavaScript

Hi Friends,
any website or web page which  allowed to fill data,  should have  client side as well as server side validation  for those entered data. hence in any website  client side  validation is done by JavaScript only. but in  HTML 5  now we can do validation without JavaScript.

 
you can have required  filed  by providing  required  attribute to those input type as shown below.


 <input type="email" required/> where required will indicate that a value must be supplied
images/forms_validation_required.png


S
compile by
Divyang Panchasara
Sr. Programmer Analyst
Hitech OutSourcing

Thursday, 23 June 2011

EB algorithm for Azure Database connection

Hi Friends,
As cloud computing  buzzing now days, so I spend my spare time to do some hand-on code for Window Azure using trial pass and reading related blogs for that
  Then during  my hand-on , once I face the problem of frequent connection failure due to  my Azure db was unavailable for few seconds .

extention method for IComparable<T>


hello friends,
 C# 3.0 gives great feature of extension method. so i keep playing with this. today  I would like to show you something interesting way to use that extension method. This time it's extending IComparable. The API signature for IComparable<T> has been around since the birth of  C language . If the left is less than the right, return something less than 0, if left is greater than right, return something greater than 0, and if they are equivalent, return 0. Well, its readability leaves a bit to be desired.
So I wrote this set of extension methods for any type T that implements IComparable:

Dispatcher A good tool for threading in WPF Part -I


Hi friends,
In my career I  had come across many good looking desktop application in which user do some click or tap his/her figure on screen for certain task and it becomes  “not responding  status”  due to long running  tasks. This type of Painful user experience makes application unsuccessful.
Means responsiveness of your application make difference. Hence developer should use threading in their application with some care to make more responsive application. In older .net (winform ) we have background work and threadpool to do  threading. Now in WPF we got another feature named dispatcher which makes your threading  work more easy hence you can make your WPF application better when you have  long running task in you  WPF screen .

 Long-running processes are involved—whether getting large results from a database, making async Webservice calls, or any number of other potentially intensive operations makes our application more unresponsive so we need to make it responsive to make your end  users much happier in the long run. But before you can start using an async programming model in your WPF app, it is important that you understand the WPF threading model. In this blogI will not only introduce you to that threading model, but I'll also show you how the Dispatcher-based objects work and explain how to use the BackgroundWorker so that you can create compelling and responsive user interfaces(i  will do in next blog)

Wednesday, 22 June 2011

Monthwise report With Pivot Query

http://impulsecode.blogspot.com/2011/06/monthwise-report-with-pivot-query.htmlhi Friends,

Today I come arcross a very nice  dyanmic  query example  on Priyank's  blog. So I would like to repost same  details  here

Impulse Code: NEWID() - Generate Randomly Sort Records - TSQL

Impulse Code: NEWID() - Generate Randomly Sort Records - TSQL: "In our company, we have project for 'Quiz management'. On quiz page, we have to fetch 10 random question from large table. To get a..."

compile by
Divyang Panchasara
Sr. Programmer Analyst
Hitech OutSourcing

Tuesday, 21 June 2011

how to make comman control event for all child control of container

Hi friends
so time in my winform base project, I get scenario where the requirement was to assign a click event handler to all child/dynamic Controls contained in a .NET User Control. This is a simple technique but I found there was no good documentation on how to do this.

Monday, 20 June 2011

Visual studio trick and tips

Hi friends,

Today I would like to discuss some tricks that visual studio provided to increase my productivity

Tip #1 – You don’t need to select a line to copy or delete it

I always cringe whenever I see someone select an entire line of code in the Visual Studio code editor before copying the line or deleting the line (see Figure 1). You don’t need to do this.
Figure 1
image
f you want to copy a line of code then you can simply press CTRL-c to copy the line and press CTRL-v to paste the line. If you want to delete a line, don’t select it first, just press CTRL-x. You’ll be surprised how much time this one tip will save you.

Code Impulse: TSQL - Decimal to time

Code Impulse: TSQL - Decimal to time: " Yesterday I got one query to change numeric value to decimal value. Suddenly I thought 'Are datetime and numeric value convertible?' like..."

compile by
Divyang Panchasara
Sr. Programmer Analyst
Hitech OutSourcing

Tuesday, 14 June 2011

display https page in iframe of http

hi guys  in you website if you want to do some secure payment  and you also want to show http  in  adressbar then  how will you do...?
 well  iframe will come to your help. it is quite easy.  develop you site like this

<html>
<head>
</head>
<body>
<div>
Lorem ipsum <br/>
Lorem ipsum <br/>
Lorem ipsum <br/>
</div>
<iframe src="https://www.youdomain.com/yousecurepage.aspx" width="100%" height="600" scrolling="auto"> </iframe>
<div>
Lorem ipsum <br/>
Lorem ipsum <br/>
Lorem ipsum <br/>
Lorem ipsum <br/>
</div>
</body>
</html>

you can see following link  and  and see the view source then you can find that  it will works and in all browser..!!!

http://www.clevelandutilities.com/obppay.htm




compile by Divyang Panchasara Sr. Programmer Analyst Hitech OutSourcing

Monday, 13 June 2011

move ViewState to bottom of Page in ASP.NET

on last Saturday, in Community tech days Tejash Shah has discussed  about  viewstate's  prons and crons.  in his wonderful session and also give hint  that if you want to move your viewstate at bottom of  page to  load  page faster in ur browser then you can do it .
so question is   how to move  viewstate in bottom.....??...  for that we have to override render event of  page and put below code you can move your page's  viewstate  at bottom of your page.

       protected override void Render(System.Web.UI.HtmlTextWriter strwriter)
        {
        
                System.IO.StringWriter strWriter = new System.IO.StringWriter();
                HtmlTextWriter objhtmlWriter = new HtmlTextWriter(strWriter );
                base.Render(objhtmlWriter);
                string newhtml = strWriter .ToString();

                  int SPt = newhtml.IndexOf("<input type=\"hidden\" name=\"__VIEWSTATE\"");
                 if (SP >= 0)
                {
                    int EP = newhtml.IndexOf("/>", SP) + 2;
                    string viewstateInput = newhtml.Substring(SP, EP - SP);
                    newhtml = newhtml.Remove(SP, EP - SP);
                    //int FormEndStart = newhtml.IndexOf("") - 1;
                    int FormEndStart = newhtml.IndexOf("");
                    if (FormEndStart >= 0)
                    {
                        newhtml = newhtml.Insert(FormEndStart, viewstateInput);
                    }
                }
                writer.Write(newhtml);
          

        } 

and  if you want to see demo  application you can download from here which made using  scottes blog

File name: ViewstateDemo.zip
File size:20.79 KB




compile by Divyang Panchasara Sr. Programmer Analyst Hitech OutSourcing

Sunday, 12 June 2011

PHP on Windows and SQL Server Training Kit

Hi friends,
just now I come across with Pinal's Blog and I found  one interesting  small blog regarding  a toolkit available to develop application using PHP  for IIS 7.5  and SQL server 2008 R2.

Pinal Dave's Blog Link


The PHP on Windows and SQL Server Training Kit includes a comprehensive set of technical content including demos and hands-on labs to help you understand how to build PHP applications using Windows, IIS 7.5 and SQL Server 2008 R2. This release includes the following:
PHP & SQL Server Demos
  • Integrating SQL Server Geo-Spatial with PHP
  • SQL Server Reporting Services and PHP
PHP & SQL Server Hands On Labs
  • Introduction to Using SQL Server with PHP
  • Using SQL Server Full-Text Search and FILESTREAM Storage with PHP
  • New: Getting Started with SQL Server Migration Assistant for MySQL




compile by Divyang Panchasara Sr. Programmer Analyst Hitech OutSourcing

ASP.NET 4.0 Active MarkUp v/s Passive Markup , Part-I

ASP.NET  4.0  gives us two main flavor of programming  style.  Active Markup and Passive Markup.
ohh..!! what is this  new  terminology Active Markup and Passive Mark Markup.. ?!!!.  This  term you never find on msdn or any Microsoft Evangelist's  blog or book.  this is new term coin by me for  ASP.NET webform and ASP.NET MVC..

asp.net webform  v/s

  why I have used this new term to make things more messy...!!! ...well I have used this terms to make things much easier to understand ASP.NET MVC  if one has knowledge of ASP.NET Webform programming and page life cycle.
So lets go back to our understanding of ASP.NET Page and it's Life Cycle.
normally in ASP.NET we have page name .aspx  and their code behind  .aspx.cs or .aspx.vb . In asp.net page we usually write html markup and server control markup like <asp:bla runat="server" >...</asp:bla> ...... in sort  .aspx page is nothing but the a markup page.
 Similarly  in MVC we also have .aspx page and those are called view pages  and  in those  .aspx page we wrote html (means  markup code) and wrote some binding  to those html with model entity and  if we are using razor view engine then we may have .chtml file which is again  have  html and their  binding with model entity. means  view are nothing  but the  markup pages. hence in both  programming framework we have markup pages where we write our UI as markup..
But, both framework  while request is processed, they handled Markup in different way to generate response . in WebForm markup page comes first to process  while in MVC  markup page come at last to process hence  webform is  ActiveMarkup and MVC  is PassiveMarkup.

ASP.NET  Webform.
when user request  http://somedomain.com/somepage.aspx then IIS server will search somepage.aspx file in virtual directory where your webproject is placed. means  request  1st comes to  your aspx page then from  page directive it will find out  which  page class(code behind) need to execute. hence your markup page process request before the their cod behind (actully this code behind  reside(after compiling and publishing)  in  .dll file  and this dll file reside in bin ) so I called  as Active Markup page framework.

ASP.NET MVC

when user request  http://somedomail.com/home/about then as per  configuration of routing table  Server search a class named HomeControler(derive from controller class) of  dll reside in bin. and  inside that it will serach public function name about  and handover  this request to this function. now  this  function will process this request and then  call  approprivate view(markup) file and finally generate response. so markup page come last so I called as Passive Markup page framework.




compile by Divyang Panchasara Sr. Programmer Analyst Hitech OutSourcing