Monday, January 21, 2013

[Sample Of Jan 17th] Image Verification Code for Logging in ASP.NET

[Sample Of Jan 17th] Image Verification Code for Logging in ASP.NET:

Homepage image
RSS Feed
Sample Download:
CS Version: http://code.msdn.microsoft.com/CSASPNETVerificationImage-81902fa4 
VB Version: http://code.msdn.microsoft.com/VBASPNETVerificationImage-3873cacc
This sample will demo you how to create an image verification code in ASP.NET. Sometimes we may need the verification code in order to prevent malicious actions. Such as: auto registration by "Automatic-Teller Registration Machine" or the malicious password cracking. We provide a program to acquire a specified number of characters or symbols, and add some interferences with the line, and then output a picture and save the value in session. The user input content according to the display contents of the picture, and then to compare the input with the value in SESSION.  According to the results of the comparison, we will determine the follow-up operations.


image
You can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.

[Sample Of Jan 18th]Set value to "IN Parameter" of SqlDataSource in ASP.NET

[Sample Of Jan 18th]Set value to "IN Parameter" of SqlDataSource in ASP.NET:

Homepage image
RSS Feed
Sample Download :
CS Version: http://code.msdn.microsoft.com/CSASPNETInParameterOfSql-efbc8537
VB Version: http://code.msdn.microsoft.com/VBASPNETInParameterOfSql-e185c4ca
This sample code will demonstrate how to set value to “IN Parameter” of SqlDataSource.
imageYou can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.

[Sample Of Jan 19th] Stop postback in javascript

[Sample Of Jan 19th] Stop postback in javascript:

Homepage image
RSS Feed
Sample Download: http://code.msdn.microsoft.com/CSASPNETStopPostbackInJS-b817f7ec
The project illustrates how to stop postbacks event in JavaScript. There are many threads mention about this kind of questions, user want to know how to stop auto-postbacks event by using ASP.NET server control, such as Button.That's the reason why we need this sample, here we give a CheckBox control in page, user can decide to execute postbacks event or not by a convenient way.
imageYou can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.

[Sample Of Jan 20th] Drag and drop ListView item using jQuery

[Sample Of Jan 20th] Drag and drop ListView item using jQuery:

Homepage image
RSS Feed
Sample Download :
CS Version: http://code.msdn.microsoft.com/CSASPNETDragItemInListView-4dd39428
VB Version: http://code.msdn.microsoft.com/VBASPNETDragItemInListView-07a48770

The project illustrates how to drag and drop items in ListView using jQuery.

image
You can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.

jQuery UI 1.10 Release Candidate (RC1)

jQuery UI 1.10 Release Candidate (RC1):
The first release candidate for jQuery UI 1.10 is out. We landed more bug fixes since our 1.10 beta release, but nothing major. So the big changes to come in 1.10 are still the same:
  • Dialog API redesign and a ton of accessibility updates: This was our main goal for this release. Dialog is now easier to use (fewer (useless) options), avoids a ton of issues thanks for a new approach to stacking and a lot more accessible. When you press a button to open a dialog, then close that dialog, focus will move back to that opening button. Full keyboard control is therefore much easier. Focus handling inside the dialog also got better. Together this makes dialog much more usable in combination with screenreaders. And you get all that while the API stayed pretty much the same.
  • Progressbar API redesign: The one change here is to add support for indeterminate progress bars.
  • We’ve removed the backward compability layers in Accordion, Autocomplete, Effects, Position, Tabs and Widget, reducing the filesize of these components, quite significantly for Tabs. If you’ve upgraded from 1.8 to 1.9 and haven’t updated your usage yet, check out the 1.9 upgrade guide for necessary changes.
For a full list of changes, see the list of 1.10 fixed tickets. You can read more about the API redesigns in a previous blog post. We’re working on a full changelog and upgrade guide for the final release.
jQuery core 1.9.0rc1 was also just released, so grab a copy and double up on your testing!
As mentioned in the Beta release post: One new widget almost made it into this release: Selectmenu. We’re still working on the accessibility side of that and you can expect it in 1.11, which will come as quickly as 1.10.

Download

File Downloads

Git (contains source files, with @VERSION not yet replaced with 1.10.0-rc.1, base theme only)

Comments

Note: please do NOT use the comments section of this blog post for reporting bugs. Bug reports should be filed in the jQuery UI Bug Tracker and support questions should be posted on the jQuery Forum.
If you have feedback on us doing our first release candidate for jQuery UI 1.10, feel free to leave a comment below. Thank you.

jQuery UI 1.10.0

jQuery UI 1.10.0:
Continuing with the jQuery anniversary announcements, we’re happy to announce the first stable release of jQuery UI 1.10. While, 1.10 doesn’t add any new widgets, it does continue the API redesigns and fixes dozens of bugs.

API Redesign: Dialog

The dialog widget has undergone an API redesign, making it more consistent with other widgets and providing better stacking and modal support. Make sure to read the upgrade guide so you can migrate away from the deprecated APIs.

API Redesign: Progressbar

The progressbar widget has undergone an API redesign, though there are no breaking changes. The only significant change was the addition of support for indeterminate progressbars. Check out the upgrade guide for more information.

Improved Accessibility

We put a lot of effort into making dialog and progrssbar as accessibile as possible. Unfortunately ARIA still needs some work before it can be used without hacks, but we’re working closely with standards bodies, browser vendors, and the accessibility community to improve web accessibility beyond jQuery.

Deprecated APIs

As mentioned above, dialog went through an API redesigns which resulted in some existing APIs being deprecated. These APIs will be removed in 1.11.0. The 1.10.0 release includes a flag to disable all deprecated APIs, allowing you to determine if your code is ready for 1.11.0 even before it is released. There are full details on how to use the flag in the upgrade guide.

Removed 1.8 Back Compat

Several APIs were deprecated in 1.9.0 and have now been removed. If you haven’t already prepared for this change, make sure to read the upgrade guide so you can migrate away from the now obsolete APIs.

Supported jQuery Versions and Browsers

jQuery UI 1.10.0 supports jQuery 1.6 and newer. That’s 13 versions! Multiply that by the number of supported browsers and you’ve got quite a support matrix. Speaking of supported browsers, jQuery UI no longer provides support for IE6.

Download

File Downloads

Git (contains source files, with @VERSION not yet replaced with 1.10.0, base theme only)

Google Ajax Libraries API (CDN)

Microsoft Ajax CDN (CDN)

Custom Download Builder

Changelog

See the 1.0 Upgrade Guide for a list of changes that may affect you when upgrading from 1.9.x. For full details on what’s included in this release see the 1.10.0 Changelog. You can read more about the API redesigns in a previous blog post.

Thanks

Thanks to all who helped with this release, specifically: adovenmuehle, adurante, ahuseynov, ajcrews, alistaircobalt, AlmogBaku, Anika Henke, atrigent, aubrey, Avinash R, bavanyo, bchiasson, bdh92123, Bethrezen, bgould, bigorangemachine, Bjørn Johansen, bolerao, borgenk, braddunbar, brian123zx, captdragon, casey, catapricop, chadn, chintsu, chuvikovsky, clifforama, CloudStrife, conradirwin, Corey Frang, Cory Gackenheimer, cowtownfarmboy, dalekocian, danbhfive, davenaeder, David Petersen, David Souther, David.Sullivan, davidmurdoch, dcarrith, developer123, dittodhole, DJtomy, Dominic Barnes, dracos, drakes, drew.waddell, drewkimrey, dutts, eason, ednark, eirc, elisy, emeerson, epascarello, eriz, Ethan Romba, ezufelt, Fabrício Matté, fedot, feugy, fgutmann, fofanafi, fontzter, fracmak, GoZ, gusaroni, homelands, htrex, ilanco, j2jensen, jajo, jamesbathgate, Jay Merrifield, jemunk, jjoemb, jpka, jprell, Juan Pablo Kaniefsky, julienw, jupeter, Jörn Zaefferer, kalou, kenaniah, kenjiyamamoto, KopiasCsaba, Kris Borchers, Krisp PL, kristopolous, kwhat, kyle.davis, larowlan, lisaj, Liv32Inspir3, Lucky, lukepage, lukoff, M.Gaetan89, maciejmrozinski, madogai, maets, mankyd, marcelklomp, MarcoSarti, mariuspuiu, Marshals, Mathias Stenbom, MatteS75, Matthieu Penant, may, mblaney, meotimdihia, MetalArend, Mike Sherov, mikepelley, Mikko Rantanen, misterdai, mjpowersjr, mmartin, MrBigDog2U, mrfr0g, Nate Eagle, nicholashall, Nodens, NovaYear, ollie2893, ours, paul, Pavel Selitskas, Pawel Maruszczyk, PhoenixFnX, pifantastic, PlanetPratt, prinzdezibel, probins, Rafael Xavier de Souza, raphinesse, rdworth, richwag, robmonie, Roman Salnikov, RwwL, salnikov, Samuel Bovée, samycookie, saulotoledo, sc0rchin, Scott González, scoulibaly, Sergey Kartashov, shadowman131, silesianlordt, Simon1979, sjonne, slolife, Spider, sslavic, ssoorriiin, swalke16, symve, techtangents, TheDoci, ThiefMaster, tibi7000, Timo Tijhof, TJ VanToll, tomcastleman, tomjung, uibugger123, Ult Combo, ushi, Viktor Kojouharov, vol7ron, watanabe, wfsiew, wichert, Xar, Xavi, zbapoc, zniki.ru, zoggy.

Comments

Note: please do NOT use the comments section of this blog post for reporting bugs. Bug reports should be filed in the jQuery UI Bug Tracker and support questions should be posted on the jQuery Forum.
If you have feedback on us doing our final release for jQuery UI 1.10.0, feel free to leave a comment below. Thank you.

Important SQL Server interview questions on data types: - How many bytes does “char” data type consume as compared to “nchar” data type?

Important SQL Server interview questions on data types: - How many bytes does “char” data type consume as compared to “nchar” data type?:

“char” data types consumes 1 byte while “nchar” consumes 2 bytes. The reason is because “char” stores only ASCII characters while “nchar” can store UNICODE contents as well.

In case you are new to ASCII and UNICODE. ASCII accommodates 256 characters i.e.english letters ,punctuations , numbers etc.But if we want to store a Chinese character  or some other language characters then  it was difficult to the same with ASCII  , that’s where UNICODE comes in to picture. An ASCII character needs only 1 byte   to represent a character while UNICODE needs to 2 bytes.

One of my SQL Server friends who had gone for a SQL interview was grilled , whether we can update SQL Server views , I have tried to answer this question here with a video


The above question I have extracted from near to heart book
SQL Server interview questions By Shivprasad koirala by BPB publication

Regards,
Click to view more from authors on SQL Server interview questions and answers



What is BI Semantic model (BISM) in SQL Server 2012?

What is BI Semantic model (BISM) in SQL Server 2012?:




Some days back I was installing SQL Server 2012 enterprise service pack 1. During installation when I was running through the setup, it gave me two options (multi-dimensional and tabular) of how I want to install SQL Server analysis service. Below is the image captured while doing installation



At the first glance these options are clearly meant to specify how we want the model design for our analysis service.

Now the first option i.e. “MultiDimensional” was pretty clear as I have been using them right from SQL Server 2005 till today i.e. (Star schema or Snow flake).

After some googling and hunting I came to know about the second option. Let me throw some light on the same and then we will conclude what is BISM.

Now overall we have two kinds of database systems , one is OLTP system where the database design thought process is in terms of tables and normalization rules ( 1st normal form , second normal form and third normal form  database design ) are followed.

The second kinds of systems are OLAP system’s where we mostly design is in terms of fact tables and dimension tables. Cube which is a multi-dimensional view of data is created properly if you design your database as OLAP system.

So in simple words we need to create a DB with OLAP design to ensure that proper cubes structure is created.



Now some times or I will say many times it’s really not feasible to create different structures and then create cubes from them. It would be great if SSAS gives us some options where we can do analysis straight from normalized simple tables.

For instance take simple end users who use “power pivot”. It’s very difficult for them to make understand OLAP models like dimension and fact tables. But yes they do understand tables with rows and columns.  If you see Microsoft excel the format is in terms of tables which have rows and columns and these end users are comfortable with a tabular structure.

 Below is a simple image of how simple end user visualize data in excel i.e. tabular – rows and columns.




That’s where exactly the second option i.e. the “Tabular” mode comes in to picture.

So if we put in simple words BISM (Business intelligence semantic model) is a model which tries to serve simple users / programmers who are comfortable with tabular structure and also maintains professional OLAP models for corporate.



So BISM is a unifying name for both Multi-dimension and tabular models.  So if you are personal BI person who loves ADHOC analysis, you can use power pivot or SSAS tabular IDE to do analysis. And if you are person who is working on a corporate project then Multi-dimension model is more scalable and worth looking in to.



Just a last quick note this is also a favorite SQL Server interview question which is making rounds now a days when SQL Server 2012 topic is discussed.

With all due respect to my publisher I have taken the above answer from my book SQL Server interview questions and answers.

You can also see my blog which has some important for SQL Server interview questions on Colaesce. 

You can also see my video on Can views be updated (SQL Server interview questions) ?



C# and .NET interview question: - What are symmetric and asymmetric algorithms?

C# and .NET interview question: - What are symmetric and asymmetric algorithms?:

Simple but important .NET / c# interview question.

Symmetric and Asymmetric are encryption algorithms. In Symmetric we have one key which encrypts messages and the same key helps to decrypt the message. In Asymmetric there are two keys public key and private key. Public key helps to encrypt message and private keys helps to decrypt the message. Everyone has the public key but the private key is held only by the authorized authority


         

Taken from the best selling interview question book .NET interview question by Shivprasad koirala.























Class Diagram

Class Diagram:

C# and .NET interview question: -What is short circuiting in C#?

C# and .NET interview question: -What is short circuiting in C#?:



When developers get this .NET interview question many of them get stunned with the name.



Short circuiting occurs when you do logical operations like ‘AND’ and ‘OR’.
 “When we use short circuit operators only necessary evaluation is done rather than full evaluation.
Let me explain the above sentence with a proper example. Consider a simple “AND” condition code as shown below. Please note we have only one “&” operator in the below code.

if(Condition1 & Condition2)
{
}

In the above case “Condition2” will be evaluated even if “Condition1” is “false”. Now if you think logically it does not make sense to evaluate “Condition 2”, if “Condition 1” is false.It’s a AND condition right? , soif the first condition is false it means the complete ANDcondition is false and it makes no sense to evaluate “Condition2”.
There’s where we can use short circuit operator “&&”. For the below code “Condition 2” will be evaluated only when “Condition 1” is true.
if(Condition1 && Condition2)
{
}

The same applies for “OR” operation. For the below code (please note its only single pipe(“|”).)   “Condition2” will be evaluated even if “Condition1” is “true”. If you think logically we do not need to evaluate “Condition2” if “Condition1” is “true”.

if(Condition1 | Condition2)
{
}

So if we change the same to double pipe (“||”) i.e. implement short circuit operators as shown in the below code, “Condition2” will be evaluated only if “Condition1” is “false”.


if(Condition1 || Condition2)
{
}

Taken from the best selling interview question book .NETinterview question by Shivprasadkoirala 

Here’s an awesome video on concurrent generic collections in C#.

NET and Sql Server interview questions - By which query do we merge two different columns into single column?

NET and Sql Server interview questions - By which query do we merge two different columns into single column?:

Answer:
This is one of the most typical question asked by the interviewers.

Let’s us assume that we have the following two table of Product and Vendor with their respective fields like below.

ProductId ProductName Cost //Product table

VendorID VendorName ProductId //Vendor table

Now let’s begin with how you can design one to one relationship between these two tables.

One to One relationship:-
Below diagram show one to one relationship between Product and Vendor table.




In the above Product table “ProductId” is defined as a primary key and in the Vendor table “ProductId” is defined as foreign key with reference to the “ProductId” of the Product table.

In this way you can achieve one to one relationship.

One to Many relationship:-
Now we want to define one to many relationship on Vendor and Product table.
In this many records in one table correspond to the one record in another table.

Example: Every one vendor can have multiple products. So there exist one-to-many relationships between Vendor and Product table.

In order to define one to many relationship you have to add one column name as VendorId in Product table which is foreign key reference to VendorId of Vendor table.

Below diagram show one to many relationship on Product and Vendor table.



Many to Many relationship:-

In this, one record in one table corresponds to many rows in another table and also vice-versa.
For instance: In a company, one vendor can sale many products and also one product can be sold by many Vendors.
Given below diagram is a sample of many-to-many relationship. For defining many to many we have to add one more table VendorProduct which is linked to the primary key of Product and Vendor tables.




In the following video, view samples of various questions asked in C#, .NET and Sql Server interview.



Please click here to see more .NET/SQL Server interview questions

Regards,

Visit Authors blog for more .NET and ASP.NET interview questions

Top 20 SQL Server 2012 features

Top 20 SQL Server 2012 features:

Introduction to Function Point Analysis (FPA)

Introduction to Function Point Analysis (FPA):


See 500 videos on c# and Dotnet interview questions

Could not find a part of the path ... bin\roslyn\csc.exe

I am trying to run an ASP.NET MVC (model-view-controller) project retrieved from TFS (Team Foundation Server) source control. I have added a...