Posts

Lite PromiseJS(Light weight JavaScript promise library)

lite-promise https://github.com/vijaytanwar/lite-promise Lightest implementation of promise library in JavaScript, Minified version is only 1.5 KB still supporting quote unique features. It execute all promises as fast as possible, and it directly call success or error function when all the promise resolves or rejects without using timers, which make this library superfast. Features Supported by this library when: run more then once function params: holds parameters for functions inside "when" function call. success: called when all promises are resolved error: called when any of the promise rejects cancel: abort the function call and dont call the success or error functions progress: called multiple times when promises are resolved. dynamicPromise: will wrap exiting normal javascript function in promise enabled function and return value from your function will be passed in success call and exception will treated as promise rejected. Create defered functi

Insert, Delete Rows, columns in HTML table Using Javascript

How to insert delete rows and cells dynamically in table using JavaScript Lets create a table object var table=document.CreateElement('table'); Or if you want to modify existing table then use below line. var table=document.getElementById('empTable'); you can set the attributes of table object using following code //Syntax object.setAttribute(attributeName, attributeValue); table.setAttribute("cellpadding","0"); table.setAttribute("cellspacing","0"); Now i want to add new row at the end, table, For this you need to get the Count of rows in table and Add the row at last index. var rows=table.getElementsByTagName('tr'); this will return the rows as array of object. Now insert new row at last index of table var lastIndex=rows.length; var newRow=table.insertRow(lastIndex); Now add the column to the newRow object. var cell=newRow.incertCell(0); Lets say i want to set inner HTML of this cell

Open source Social Networking site in Asp.net and Microsoft Ajax

Image
Open source Social Networking site in Asp.net and Microsoft Ajax If you want to develop Facebook like chat application in asp.net then don't go anywhere ChatME is open source best application to start with. Contain lots of functionality like message posting, chat box implementation, automatically loading pages using Ajax, Gallery management, Gallery sharing,  window.location.hash implementation to modify the URL of page without loading the page. There are so many other other advanced technique. Best part is that it is developed by only single developer within 1.5 month only. https://chatme.codeplex.com/ Contact me if you any some issue in setting this project in Visual Studio or setting database. tamarvijay@gmail.com

Step through the class while debugging in c#

You can use [DebuggerStepThroughAttribute] attribute before class declaration and this attribute instruct the debugger not to debug the code in this class. This is the best thing to hide your code while debugging. For more reference http://msdn.microsoft.com/en-us/library/system.diagnostics.debuggerstepthroughattribute.aspx

Best site to download ebooks of c# ,asp.net and sql server

this one is the best line to download c#,asp.net and Sql sever ebooks http://www.free-ebooks-download.org/free-ebook/

Create Thumbnail for large image in C# in 1 line of code

//import these file in you application using System.Drawing; new Bitmap("image to generate thumb").GetThumbnailImage(100, 100, null, IntPtr.Zero).Save("where to save image"); "image to generate thumb" is your Image path for which you want to generate thumbnail "where to save image" is the location with name of thumbnail

Get the cursor postion in Browser

<script language="javascript"> document.onmousemove=currMousePositionOnScreen; function currMousePositionOnScreen(event) { e = event || window.event; var x=e.pageX; var y=e.pageY; } </script>