Microsoft TechTalk on Kinect Programming

Dear Recipient,

 

It is with great pleasure that I would like to invite you to the Microsoft TechTalk on KINECT Programming. Following are the details of the event.

 

About TechTalk

Microsoft TechTalk is another unique initiative of Microsoft Innovation Center – Pakistan with the objective to highlight the creativity and talent of students and professionals in the local software economy. These sessions are not only focused towards the technology discussions but also showcase the achievements (demonstration) of talented students and professionals.

 

Date, Time, Location & Registration

 

Date:  Friday 8 June 2012

Time:  4:00pm – 6:00pm

Location:  Microsoft | Innovation Center – Pakistan

Fast National University of Computer and

Emerging Sciences (City Campus)

22 G, Block 6, P.E.C.H.S., Karachi.

 

For Registration kindly email at: anas_kidwai@hotmail.com with your Name, University, Email Address and Mobile Number by Thursday 7th June 2012.

 

Note: The registration of this level 200 session is based upon first come first basis and will be confirmed by the MIC-Team.

Speakers Profile

Muhammad Umer, is the runner-up of Imagine Cup 2012 Pakistan Final. He is an intelligent student from Sir Syed University of Engineering and Technology (SSUET) and Microsoft Community Speaker. His skillset include Windows Phone Development, Game Development and Kinect Programing.

 

Session Outline

·         Introduction to Microsoft Kinect.

·         Kinect Hardware Foundation.

·         Evolution of UI’s.

·         Programming with Microsoft Kinect.

o   Kinect Architecture.

o   RGB Camera.

o   Skeletal Tracking.

o   Joint’s.

o   Depth Data using IR Camera.

Showcasing

·         Introduction to “Kenection”.

·         The Imagine Cup Experience.

·         Demo of Kenection.

 

I look forward towards your kind participation in this event.

 

 

Regards

 

Haseeb Shaukat

MIC Business Manager | Microsoft Pakistan

Advertisements

My Events Planner – Windows Phone 7

 

My another app “My Events planner” is now at marketplace for download.

My Events planner is an event planning application for windows phone 7, now you can create, plan and manage your events with your team’s member’s right from your windows phone device. My events planner stores your event details into a private cloud hosted by developer. Interested users may host their own private cloud for their organizations by contacting the developer. My events planner synchronizes all your team members of the event by providing critical updates, to-do’s, happenings etc to all your members. Application Features • Private Credentials. • Manage Multiple Events. • Manage multiple team groups. • Event day calendar. • Event specific To-do. • Event specific time to time Happenings. • Assigning specific task to team member. • Call team member directly from event page. • Critical notifications to team members (Task assigned, Group Added, Event Created etc). • Ability to connect to custom private my events planner server.

[DOWNLOAD FROM MARKETPLACE]

Windows Phone 7 Seminar – Muhammad Ali Jinnah University

I was really busy since last 2 weeks, so now uploading the pics of Windows phone 7 seminar that took place 2 weeks ago.

[Although the Lighting condition was poor 🙂 ]

 

 

 

 

 

 

 

 

 

 

 

Game Development Seminar – 2

Here is the source code of the DEMO i’ve developed at today’s game development interlocutory seminar.
Hope you’ll find it useful.
Do write your comments & suggestions.

[DOWNLOAD HERE]

Game Development Seminar – Source Code

I am attaching the source code of the INCOMPLETE game i developed at the MIC seminar for your reference.

feeling sad because of shortage of time, otherwise i had several others things & demo’s planned for the day.
But yeah, better luck next time..

[DOWNLOAD HERE]

Funkey Munkey Lite – Windows Phone 7

Waiting for another game?
its finally here, well it is also a lite version, i was playing with codes and accidently this game is developed.
Hope u remember the Nintendo and SEGA monkey game, well its the same one, but ported to WP7,
The development time was 8 Hours at MIC.
looking forward to release its pro version very soon.

Funkey Munkey is a game about a tribe of monkeys who are hungry for some long time, and now they are ready to collect anything that would look like eatable material.

You job is to control your monkey and let him collect as much banana’s and coconuts’ as he can, before his tribe dies of hunger.

Beware of bombs that are falling from the sky, they will make your food poisonous and your monkey can die sooner.

This is the “LITE” version of this game, its full version contains multiple level with multiplayer support, so that you and your friends can play together to collect food for their monkey tribes through one resource center.

Game Features
• Two Different Levels.
• Multiple Collectable items.
[Download From Marketplace]

 

 

 

 

 

My Baby Toys – Windows Phone 7

Here is another WP7 application,
well the whole idea was to transform our WP7 phone into a baby toy, so whenever our young ones hold the phone, they actually enjoy using it.
It contains rattle, talking doll. etc etc

 

 

 

 

 

Shoot-O-Mania – Windows Phone 7

Hey all,

Checkout my new WP7 Shooter game “Shoot O Mania”.
Its development time was 2 days, and you can call it as a LITE version.
but intresting to play though.
The best things is, its multitouch based.

 

 

 

 

 

 

Configure C# on PC2 enviroment

Configuring C# in Pc^2 enviroment

This tutorial will guide you to add C# in Pc^2 environment for programming competitions.
First, you have to add csc.exe in the environment variable. but before that we have to find exact location of this file.
browse to C:\Windows\Microsoft .net\<Your Version>\csc.exe .
now to add this into environment variable, do that follow these steps:

  1. Right click on My Computer & click Properties.
  2. For Windows Vista/7. Click Advance System Settings
  3. Click Environment Variables
  4. Scroll down on the second tab and double click on PATH
  5. add the above path in the end of the link with ‘;'(semi-colon) prefix

    For example, in my pc it looks like
    C:\oracle\product\10.2.0\db_1\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Matlab7\bin\win32;C:\jdk\bin;C:\Windows\Microsoft.NET\Framework\v4.0.30319

  6. Click ok.
Now we have csc.exe in our environment variables, we can continue to add the C# compiler into PC^2.
to do that, follow these steps
  1. Open PC^2 admin panel
  2. Click on Languages and click ADD
  3. Type the name C#
  4. in the compiler line add csc {:mainfile}
  5. leave other fields as it is.
You can compare your Edit Language dialog with the one shown below to see if everything you typed is correct.
Now add the Problem and whenever a c# solution is submitted, it is compiled and PC^2 will show you the output, and of course you can configure your settings as needed.

ASP.NET Questions

Que:- What is the sequence in which ASP.NET events are processed ?
Ans:- Following is the sequence in which the events occur :-
* Page_Init.
* Page_Load.
* Control events.
* Page_Unload event.
Page_init event only occurs when first time the page is started, but Page_Load occurs in subsequent request of the page.

Que:- In which event are the controls fully loaded ?
Ans:- Page_load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init events but you will see that viewstate is not fully loaded during this event.

Que:- How can we identify that the Page is PostBack ?
Ans:- Page object has a “IsPostBack” property which can be checked to know that is the page posted back.
Que:-What is event bubbling ?
Ans:- Server controls like Datagrid, DataList, Repeater can have other child controls inside them. Example DataGrid can have combo box inside datagrid. These child control do not raise there events by themselves, rather they pass the event to the container parent (which can be a datagrid, datalist, repeater), which passed to the page as “ItemCommand” event. As the child control send there events to parent this is termed as event bubbling.

Que:- If we want to make sure that no one has tampered with ViewState, how do we ensure it?
Ans:- Using the @Page directive EnableViewStateMac to True.

Que:- What is AppSetting Section in “Web.Config” file?
Ans:- Web.config file defines configuration for a webproject. Using “AppSetting” section we can define user defined values. Example below defined is ConnectionString” section which will be used through out the project for database connection.

Que:- Where is ViewState information stored ?
Ans:- In HTML Hidden Fields.

Que:- How can we create custom controls in ASP.NET ?
Ans:- User controls are created using .ASCX in ASP.NET. After .ASCX file is created you need to two things in order that the ASCX can be used in project:

* Register the ASCX control in page using the <%@ Register directive>.
Example:-

<%@ Register tagprefix=”Accounting” Tagname=”footer” Src=”Footer.ascx” %>
* Now to use the above accounting footer in page you can use the below directive.

Que:- How many types of validation controls are provided by ASP.NET ?
Ans:- There are six main types of validation controls :-
1). RequiredFieldValidator :-

It checks whether the control have any value. It’s used when you want the control should not be empty.

2). RangeValidator :-

It checks if the value in validated control is in that specific range. Example
TxtCustomerCode should not be more than eight length.

3). CompareValidator:-

It checks that the value in controls should match the value in other control. Example
Textbox TxtPie should be equal to 3.14.

4). RegularExpressionValidator:-

When we want the control value should match with a specific regular expression.

5). CustomValidator:-

It is used to define UserDefined validation.

6). ValidationSummary:-

It displays summary of all current validation errors.

Que:- Can you explain what is “AutoPostBack” feature in ASP.NET ?
Ans:- If we want the control to automatically postback in case of any event, we will need to check this attribute as true. Example on a ComboBox change we need to send the event immediately to the server side then set the “AutoPostBack” attribute to true.

Que:- How can you enable automatic paging in DataGrid ?
Ans:- Following are the points to be done in order to enable paging in Datagrid :-
* Set the “AllowPaging” to true.
* In PageIndexChanged event set the current pageindex clicked.

Que:-What is the difference between “Web.config” and “Machine.Config” ?
Ans:- “Web.config” files apply settings to each web application, while Machine.config” file apply settings to all ASP.NET applications.

Que:- What is the difference between Server.Transfer and response.Redirect ?
Ans:- Following are the major differences between them:-
* Response.Redirect sends message to the browser saying it to move to some
different page, while server.transfer does not send any message to the browser
but rather redirects the user directly from the server itself. So in server.transfer
there is no round trip while response.redirect has a round trip and hence puts
a load on server.

* Using Server.Transfer you can not redirect to a different from the server itself.
Example if your server is http://www.yahoo.com you can use server.transfer to move
to http://www.microsoft.com but yes you can move to http://www.yahoo.com/travels, i.e.
within websites. This cross server redirect is possible only using
Response.redirect.

* With server.transfer you can preserve your information. It has a parameter
called as “preserveForm”. So the existing query string etc. will be able in the
calling page. In response.redirect you can maintain the state, but has
lot of drawbacks.

Que:- What is the difference between Authentication and authorization?
Ans:- This can be a tricky question. These two concepts seem altogether similar but there is wide range of difference. Authentication is verifying the identity of a user and authorization is process where we check does this identity have access rights to the system. In short we can say the following authentication is the process of obtaining some sort of credentials from the users and using those credentials to verify the user’s identity. Authorization is the process of allowing an authenticated user access to resources. Authentication always proceed to Authorization; even if your application lets anonymous users connect and use
the application, it still authenticates them as being anonymous.

Que:- What are the various ways of authentication techniques in ASP.NET?
Ans:- Selecting an authentication provider is as simple as making an entry in the web.config file for the application. You can use one of these entries to select the corresponding built in authentication provider:

* authentication mode=”windows”
* authentication mode=”passport”
* authentication mode=”forms”
* Custom authentication where you might install an ISAPI filter in IIS that
compares incoming requests to list of source IP addresses, and considers
requests to be authenticated if they come from an acceptable address. In that
case, you would set the authentication mode to none to prevent any of the
.net authentication providers from being triggered.

Que:- How does authorization work in ASP.NET?
Ans:- ASP.NET impersonation is controlled by entries in the applications web.config file. The default setting is “no impersonation”. You can explicitly specify that ASP.NET shouldn’t use impersonation by including the following code in the file

It means that ASP.NET will not perform any authentication and runs with its own
privileges. By default ASP.NET runs as an unprivileged account named ASPNET. You
can change this by making a setting in the processModel section of the machine.config
file. When you make this setting, it automatically applies to every site on the server. To user a high-privileged system account instead of a low-privileged set the userNameattribute of the processModel element to SYSTEM. Using this setting is a definite security risk, as it elevates the privileges of the ASP.NET process to a point where it can do bad things to the operating system.

Que:- What’s difference between Datagrid, Datalist and repeater ?
Ans:- A Datagrid, Datalist and Repeater are all ASP.NET data Web controls.
They have many things in common like DataSource Property, DataBind Method
ItemDataBound and ItemCreated.
When you assign the DataSource Property of a Datagrid to a DataSet then each DataRow
present in the DataRow Collection of DataTable is assigned to a corresponding
DataGridItem and this is same for the rest of the two controls also. But The HTML code generated for a Datagrid has an HTML TABLE element created for the particular DataRow and its a Table form representation with Columns and Rows.
For a Datalist its an Array of Rows and based on the Template Selected and the
RepeatColumn Property value We can specify how many DataSource records should
appear per HTML table row. In short in datagrid we have one record per row, but in
datalist we can have five or six rows per row.
For a Repeater Control, the Datarecords to be displayed depends upon the Templates
specified and the only HTML generated is the due to the Templates.
In addition to these, Datagrid has a in-built support for Sort, Filter and paging the Data,which is not possible when using a DataList and for a Repeater Control we would require to write an explicit code to do paging.

Que:- From performance point of view how do they rate ?
Ans:- Repeater is fastest followed by Datalist and finally datagrid.

Que:- What is the method to customize columns in DataGrid?
Ans:- Use the template column.

Que:- How can we format data inside DataGrid?
Ans:- Use the DataFormatString property.

Que:- How to decide on the design consideration to take a Datagrid, datalist or repeater ?
Ans:- Many make a blind choice of choosing datagrid directly, but that’s not the right way.
Datagrid provides ability to allow the end-user to sort, page, and edit its data. But it comes at a cost of speed. Second the display format is simple that is in row and columns.
Real life scenarios can be more demanding that With its templates, the DataList provides more control over the look and feel of the displayed data than the DataGrid. It offers better performance than datagrid Repeater control allows for complete and total control. With the Repeater, the only HTML emitted are the values of the databinding statements in the templates along with the HTML markup specified in the templates—no “extra” HTML is emitted, as with the DataGrid and DataList. By requiring the developer to specify the complete generated HTML markup, the Repeater often requires the longest development time. But repeater does not provide editing features like datagrid so everything has to be coded by programmer. However, the Repeater does boast the best performance of the three data Web controls.
Repeater is fastest followed by Datalist and finally datagrid.

Que:- Difference between ASP and ASP.NET?
Ans:- ASP.NET new feature supports are as follows :-

Better Language Support

* New ADO.NET Concepts have been implemented.
ASP.NET supports full language (C#, VB.NET, C++) and not simple scripting
like VBSCRIPT..

Better controls than ASP

* ASP.NET covers large set’s of HTML controls..
* Better Display grid like Datagrid, Repeater and datalist.Many of the display
grids have paging support.

Controls have events support

* All ASP.NET controls support events.
* Load, Click and Change events handled by code makes coding much simpler and much better organized.

Compiled Code

The first request for an ASP.NET page on the server will compile the ASP.NET code and
keep a cached copy in memory. The result of this is greatly increased performance.
Better Authentication Support
ASP.NET supports forms-based user authentication, including cookie management and
automatic redirecting of unauthorized logins. (You can still do your custom login page and custom user checking).

User Accounts and Roles

ASP.NET allows for user accounts and roles, to give each user (with a given role) access to different server code and executables.

High Scalability

* Much has been done with ASP.NET to provide greater scalability.
* Server to server communication has been greatly enhanced, making it possible
to scale an application over several servers. One example of this is the ability
to run XML parsers, XSL transformations and even resource hungry session objects on other servers.

Easy Configuration

Configuration of ASP.NET is done with plain text files.
* Configuration files can be uploaded or changed while the application is running.
No need to restart the server. No more metabase or registry puzzle.

Easy Deployment

No more server restart to deploy or replace compiled code. ASP.NET simply redirects all new requests to the new code.

Que:- What are major events in GLOBAL.ASAX file ?
Ans:- The Global.asax file, which is derived from the HttpApplication class, maintains a pool
of HttpApplication objects, and assigns them to applications as needed. The Global.asax
file contains the following events:

Application_Init: Fired when an application initializes or is first called. It is invoked for
all HttpApplication object instances.

Application_Disposed: Fired just before an application is destroyed. This is the ideal
location for cleaning up previously used resources.

Application_Error: Fired when an unhandled exception is encountered within the
application.

Application_Start: Fired when the first instance of the HttpApplication class is created.
It allows you to create objects that are accessible by all HttpApplication instances.
Application_End: Fired when the last instance of an HttpApplication class is destroyed.
It is fired only once during an application’s lifetime.

Application_BeginRequest: Fired when an application request is received. It is the first
event fired for a request, which is often a page request (URL) that a user enters.

Application_EndRequest: The last event fired for an application request.

Application_PreRequestHandlerExecute: Fired before the ASP.NET page framework
begins executing an event handler like a page or Web service.

Application_PostRequestHandlerExecute: Fired when the ASP.NET page framework has finished executing an event handler

Applcation_PreSendRequestHeaders: Fired before the ASP.NET page framework sends
HTTP headers to a requesting client (browser).

Application_UpdateRequestCache: Fired when the ASP.NET page framework completes
handler execution to allow caching modules to store responses to be used to handle
subsequent requests.

Application_AuthenticateRequest: Fired when the security module has established the
current user’s identity as valid. At this point, the user’s credentials have been validated.
Application_AuthorizeRequest: Fired when the security module has verified that a user
can access resources.

Session_Start: Fired when a new user visits the application Web site.

Session_End: Fired when a user’s session times out, ends, or they leave the application
Web site.

Que:- What order they are triggered ?
Ans:- They’re triggered in the following order:

* Application_BeginRequest
* Application_AuthenticateRequest
* Application_AuthorizeRequest
* Application_ResolveRequestCache
* Application_AcquireRequestState
* Application_PreRequestHandlerExecute
* Application_PreSendRequestHeaders
* Application_PreSendRequestContent
<>
* Application_PostRequestHandlerExecute
* Application_ReleaseRequestState
* Application_UpdateRequestCache
* Application_EndRequest.

Que:- How can we force all the validation control to run ?
Ans:- Page.Validate

Que:- How can we check if all the validation control are valid and proper ?
Ans:- Using the Page.IsValid() property you can check whether all the validation are done.

Que:- Which JavaScript file is referenced for validating the validators at the client side ?
Ans:- WebUIValidation.js javascript file installed at “aspnet_client” root IIS directory is used
to validate the validation controls at the client side

Que:- What is Tracing in ASP.NET ?
Ans:- Tracing allows us to view how the code was executed in detail.

Que:- How do we enable tracing ?
Ans:- <%@ Page Trace="true" %>

Que:- How can we kill a user session ?
Ans:- Session.abandon

Que:- How do I send email message from ASP.NET ?
ANs:- ASP.NET provides two namespaces System.WEB.mailmessage classand
System.Web.Mail.Smtpmail class. Just a small homework create a Asp.NET project and
send a email at "Email Adress". Do not Spam.

Que:- Explain the differences between Server-side and Client-side code?
Ans:- Server side code is executed at the server side on IIS in ASP.NET framework, while
client side code is executed on the browser.