Skip to main content

Posts

6 Points to Learn Programming for Beginner's

Learning programming isn't that hard neither that easy,But will be simplified once you are in a right direction and know how to.There are lot of things that you can do to making the learning easier.    Don't Move too Fast     Learning is not a race, so keep calm and get it right before moving on, rather then quickly jumping for next. Thinking you know it all but you rarely did will be hindrance as you miss out the things and not have good good grasp of the fundamentals. Take it as a continuous process and  don't stop try maintaining the pace till you have mastered the topic 2. Understand the Example Code  Reading codes doesn't help you to write a program.What matters is understanding the code, so try to understand the code and always keep in mind start from the simple code don't flow on the words and go for complex code. Once you understand simple codes you will eventually grow yourself to understand the complexity. 3. Execute The Code ...

Pivot in Oracle for Dynamic Columns

Pivot in SQL refers to the change of rows into columns based on specific constraints. An example of pivot could be the transpose of matrix. Example: a matrix containing day as 1st row and sales as 2nd row for  specific day sun    10 mon  20 tue    30 The transpose of the above matrix would be sun mon tue 10  20  30 This is an example scenario of pivot in sql. Now, Lets get on to the actual tables in database and see how we can use pivot . Starting with a fictional scenario, assume a table which contains two columns DAYS and SALES. CREATE TABLE TEST.DAILY_SALES (   DAYS   VARCHAR2(10),   SALES  NUMBER ) insert into DAILY_SALES('SUN',10); insert into DAILY_SALES('MON',20); insert into DAILY_SALES('TUE',15); insert into DAILY_SALES('WED',25); insert into DAILY_SALES('THU',10); insert into DAILY_SALES('FRI',30); insert into DAILY_SALES('SAT',5); Now when we execute the following select statement ...

Login Sequence Diagram

 Diagramatic representation of the  interaction between processes in their own order is a Sequence Diagram. A simple Sequence diagram for login is shown below: Short descriptions on notations used in the above diagram. Actor:   An actor is an entity that interacts with the system (can be human or any other process or entity that interacts with the system  ). Call Message :  Represents the forward communication between the entities . Return Message : Represents the message passed back to the caller.

Function in Razor view (@helper in razor)

We can create function in cshtml by using @helper syntax syntax: @helper <FunctionName>(paramtype param1) { //your custom logic } Here the function is same as the one we write in class file except  "@helper" . This function can be invoked from any where in the view simply like this @FunctionName(param1); @helper syntax enables in code reusability scenario : Following code implements recursive function using @helper in view @helper Recurson(IEnumerable<Menu> nodes, int? parentId) {     if (nodes.Any(n => n.ParentId == parentId))     {         <ul>             @foreach (var node in nodes.Where(n => n.ParentId == parentId))             {                 <li>                     @node.Name                 ...

work out with SignalR

In this post i will be talking how we can use signalR for real time web application with a demo chat application. If you are reading this post and don't know about installing the required files please have a look at my previous post. http://mesushil.blogspot.com/2013/04/introducing-signalr.html here i am modifying the default asp.net template about.aspx page for the demo. Firstly include the script in the .aspx page . the second js i have included here is the js downloaded by the nuget. the third file is generated at run time including the hubs declared in the server. check the browser to ensure these files are loaded in the browser. the image above is the part of hubs.js generated dynamically. now lets create hub in the server.for this lets include a class file to the solution. To create the hubs in server add the namespace as the first two lines above. hubName in line 9 is what we will be referring in client side js to communicate with the server. and t...

Introducing SignalR

Introduction: Asp.net signalR is an open source library for asp.net developers.it is used to implement real time functionality in web application. requirements: signalR is not included in visual studio so far(vs 10 and vs 12) by default.It can be implemented in .net framework 4.0 and higher. so you need vs 2010 or vs 2012 to start taking the advantage of signalR. I will guide you trough the installation of signalR for your project . Lets get ready with the visual studio 2010 or 2012. I am going to use visual studio 2012 here. Firstly open up a new project. now open a Package Manager Console. if you didn't find it click View and go over to other window you find it there or go to Tools>Library Package Manager Console >Package Manager Console  make a command in console :Install-Package Microsoft.AspNet.signalR  Scroll down the generated text in console few files are downloaded which contains the asp.net server side  signaR and client side signalR ...

getting the list of class from dll in asp.net c# using Reflection

Reflection provides object(of type Type) that describe assemblies modules and types. so we can use  reflection to get the info about the assemblies i.e we can access  all types of objects in the dll.here I am going to demonstrate the use of Type and LoadFile to to get the name of the classes in the dll. demo code : using System; using System.Collections; using System.Reflection; namespace Zeewon.Tests {     public class GetClassInDll     {         public GetClassInDll()         {         }         //string dllname is the path of the dll //as LoadFile takes the absolute path the absolute path should be provided as parameter         public ArrayList GetClassName(string dllName)         {         ...