Friday, March 29, 2013

ifttt

Yahoo Pipes, ifttt.com (If This Then That)

Friday, March 22, 2013

SignalR & Shopping Cart

Markdown - tool for webwriters

Markdown is a text-to-HTML conversion tool (for web writers).

http://en.wikipedia.org/wiki/Markdown

Dino Esposito on "conventions"

Dino Esposito on "conventions"

"Conventions when not well explained, understood, and known, are quite dangerous. They do not favor readable code and even may create more issues than they would solve in development scenarios where awareness of conventions is not high. Too many, and too deep conventions, look undistinguishable from magic. Personally, I find acceptable the level of conventions you find in ASP.NET MVC; much less the extreme level of conventions you find in Web API."
This is from his article comparing Web API vs ASP.Net MVC Controllers vs WCF - https://www.simple-talk.com/dotnet/.net-framework/building-a-public-http-api-for-data/

Saturday, March 16, 2013

Javascript code - Bookmarklet that loads jQuery and then executes some jQuery commands

RunSomejQueryCommands() - Put whatever jQuery statements that need to be run after jQuery finishes loading
Note: the code loads jQuery into the page only if it is Not already there
Below example - in google.com page, clicking on the bookmarklet will load jQuery and put the text "jQuery loaded...Inserted via jQuery" into the Search box
javascript:if (typeof jQuery == 'undefined') { var s=document.createElement('script');s.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');document.getElementsByTagName('body')[0].appendChild(s);} var WaitTilljQueryLoads = function() { if (typeof jQuery != 'undefined') { clearInterval(timer);RunSomejQueryCommands(); }}; var timer = setInterval(WaitTilljQueryLoads);void(s);var RunSomejQueryCommands = function() {$('[name=q]').val('jQuery loaded...Inserted via jQuery');};

Saturday, March 9, 2013

Zen Coding (Plugins)

Plugins are available for Visual Studio, Notepad++ etc..

To use with Sublime Text - https://github.com/sergeche/emmet-sublime
(Github link has instructions on how to install and use it)


From http://en.wikipedia.org/wiki/Zen_Coding:

Zen Coding uses a specific syntax in order to expand small snippets of code, similar to CSS selectors, into full-fledged HTML code.[2] For example, the sequence
div#page>div.logo+ul#navigation>li*5>a
expands into
<div id="page">
        <div class="logo"></div>
        <ul id="navigation">
                <li><a href=""></a></li>
                <li><a href=""></a></li>
                <li><a href=""></a></li>
                <li><a href=""></a></li>
                <li><a href=""></a></li>
        </ul>
</div>
Intro by author - http://coding.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-write-html-code/

EDIT (Mar 31 2013) -
Zen Coding is now Emmet - emmet.io
Documentation links -
http://docs.emmet.io/
Abbreviations Syntax - http://docs.emmet.io/abbreviations/syntax/
Actions - http://docs.emmet.io/actions/
Cheat Sheet - http://docs.emmet.io/cheat-sheet/

Wednesday, February 20, 2013

Mobile - HYBRID App-Building Tools (as of Dec 2012)

From the document - "Going Hybrid - How hybrid apps are accelerating HTML5 adoption" by BusinessInsider.com
  • PhoneGap
  • PhoneGap Build (Adobe)
  • Titanium (Appcelerator)
  • Kendo UI (Telerik)
  • Sencha

Tuesday, February 5, 2013

Real-Time Collaborative Editors


http://collabedit.com/97msj
http://piratepad.net/Arw934fJ2O
http://piratepad.net/ep/pad/view/Arw934fJ2O/latest

http://highscalability.com/

Tuesday, January 29, 2013

Javascript tool (drawing images and saving captions using Raphaeljs)


Admin mode: (can View/Add/Remove/Edit)
CODE: http://jsfiddle.net/theacadian/s4Xjg/56/
DEMO: http://jsfiddle.net/theacadian/s4Xjg/56/show

User mode: (can only View)
CODE: http://jsfiddle.net/theacadian/s4Xjg/54/
DEMO: http://jsfiddle.net/theacadian/s4Xjg/54/show

Libraries used - jQuery UI, Raphaeljs, jQuery
Made use of the "lasso" extension found in - http://stackoverflow.com/questions/4649293/lasso-tool-in-javascript


Saturday, January 19, 2013

Javascript - Lasso functionality 1 (jQuery extension, Canvas element)

Combined the below examples to draw & paint an area (polygon) selected by the user (Used HTML5 Canvas element to draw & paint the polygon; Have to try Raphaeljs to do the same thing)
http://stackoverflow.com/questions/4649293/lasso-tool-in-javascript
http://stackoverflow.com/questions/4839993/how-to-draw-polygons-on-an-html5-canvas


Tuesday, November 20, 2012

Javascript to detect Arabic characters

http://stackoverflow.com/questions/4446244/how-to-check-if-any-arabic-character-exists-in-the-string-javascript
(Other related links are in Diigo)

function hasArabic(character)
{
var arabic = /[\u0600-\u06FF]/; // http://stackoverflow.com/questions/4446244/how-to-check-if-any-arabic-character-exists-in-the-string-javascript
return (arabic.test(character));
}

function hasEnglish(s)
{
var english = /[a-zA-Z]/;
return english.test(s);
}

function hasNumbers(s)
{
var numbers = /[0-9]/;
return numbers.test(s);
}

Sunday, November 4, 2012

Important difference between 'function statements' and 'function expressions' in Javascript

EXAMPLE 1 - select the "RESULT" tab to execute the code
When the below code runs, "Yes" is printed, but not "No".
The reason is - before the code runs, "function statements" are interpreted and added to the execution stack/context, but the same is not done for "function expressions"
(Book - JavaScript Succinctly, Pg 102)

Therefore, the order in which functions are invoked & defined, becomes important when using "function expressions"
(Have to read more about this)


EXAMPLE  2 - using jQuery - $(document).ready()
Click on "RESULT" to see the result

Saturday, November 3, 2012

To enable .Net 3.5, 3.0,2.5 in Windows 8

http://helpdeskgeek.com/windows-8/install-net-framework-3-5-3-0-2-0-on-windows-8/

Excerpt:

"With Windows 8, .NET Framework 4.5 comes installed by default. Since .NET 4.5 is an in-place upgrade of 4.0, you can automatically run any applications that are geared towards .NET Framework 4.5 or 4.0. That’s fine, but what if you need to run programs that require older versions of .NET Framework? What’s the lowest version you can run?

In Windows 8, .NET 3.5, 3.0 and 2.5 come with the OS, you just have to enable it. This is really nice because you don’t have to go and download .NET 3.5 from the Microsoft website. In this post, I’ll show you how to enable the older versions of the .NET Framework in Windows 8......."

Facebook - developer links

Sunday, October 28, 2012

Saturday, October 27, 2012

Windows 8 App Framework diagram

This image is from Pluralsight's course - Introduction to Building Windows 8 Applications

Thursday, October 25, 2012

Native apps, Mobile Web apps, Hybrid apps


  • From http://icenium.com/community/blog/icenium-team-blog/2012/06/14/what-is-a-hybrid-mobile-app-
  • Native apps are built for a specific platform with the platform SDK, tools and languages, typically provided by the platform vendor (e.g. xCode/Objective-C for iOS, Eclipse/Java for Android, Visual Studio/C# for Windows Phone).
  • Mobile Web apps are server-side apps, built with any server-side technology (PHP, Node.js, ASP.NET) that render HTML that has been styled so that it renders well on a device form factor.
  • Hybrid apps, like native apps, run on the device, and are written with web technologies (HTML5, CSS and JavaScript). Hybrid apps run inside a native container, and leverage the device’s browser engine (but not the browser) to render the HTML and process the JavaScript locally. A web-to-native abstraction layer enables access to device capabilities that are not accessible in Mobile Web applications, such as the accelerometer, camera and local storage.

Sunday, September 30, 2012

Standup meetings, Asking, Mistakes - different opionion from Mike Hill

By "lose the 3 questions" - he is asking us to do away with the 3 questions - 'what did i do yesterday, what i am planning to do today, any blocking issues'

By "do not solve anything" - he says "we do not solve problems in standups, we raise them"

And he also mentions that the last 2 points - - "make asking a safe thing to do" , "make mistaking a safe thing to do",
which he calls "values", are "really critical". He says "we dont want our team not to make mistakes... we want to our team to make mistakes and repair them, in good cheer..." and adds "we want things to be pretty safe inside the team"

Full link to his talk - http://www.infoq.com/presentations/Individual-Coach

Tuesday, September 18, 2012

Referencing github from jsfiddle

From http://stackoverflow.com/questions/9841026/reference-github-file-in-jsfiddle :


-- And yes, it is, just get the raw copy. Take the URL (https://github.com/minitech/Sprint2/blob/master/sprint.js), addraw. before github, and remove the blob/ part:
https://raw.github.com/minitech/Sprint2/master/sprint.js
-- You can also just replace /blob/ with /raw/ and Github will 301 you to the correct url.

Sunday, September 9, 2012

Dialectic vs Debate

From http://en.wikipedia.org/wiki/Dialectic:
Dialectic (also dialectics and the dialectical method) is a method of argument for resolving disagreement that has been central to Indian and European philosophy since antiquity. The word dialectic originated in ancient Greece, and was made popular by Plato in the Socratic dialogues. The dialectical method is dialogue between two or more people holding different points of view about a subject, who wish to establish the truth of the matter by dialogue, with reasoned arguments.[1] Dialectics is different from debate, wherein the debaters are committed to their points of view, and mean to win the debate, either by persuading the opponent, proving their argument correct, or proving the opponent's argument incorrect – thus, either a judge or a jury must decide who wins the debate. Dialectics is also different from rhetoric, wherein the speaker uses logos, pathos, or ethos to persuade listeners to take their side of the argument.

Friday, September 7, 2012

Recursive lambda expression

void Main()
{
///////////////////////////////////////////////
// BOOK - C# Unleashed 4.0
// Chapter, Page - Chap 18 Events, Pg 859-861

/*
///////////////////////////////////////////////
// PROBLEM - recursive lambda expression
//
Func fac2 = n => n == 0 ? 1 : n * fac2(n - 1); // will not work
fac2(5).Dump();
*/

///////////////////////////////////////////////
// SOLUTION - initialize the lambda expression variable to null before assigning it the actual lambda expression
//
Func fac = null;
fac = n => n == 0 ? 1 : n * fac(n - 1); // will work
Console.WriteLine(fac(5));
}





Action finishedHandler = () => {
Console.Beep();
// Finished has been called: we can unhook both Tick and Finished now.
countDown.Tick -= tickHandler;
countDown.Finished -= finishedHandler;
};

Action finishedHandler; // this variable is unassigned!
Action __temp = () => {
Console.Beep();
// Finished has been called: we can unhook both Tick and Finished now.
countDown.Tick -= tickHandler;
countDown.Finished -= finishedHandler;
};

Monday, September 3, 2012

LINQPad - Adding references

To get access to HttpUtility -
From http://stackoverflow.com/questions/5015363/linqpad-4-doesnt-know-about-httputililty-how-to-resolve

1. You need to a reference System.Web.dll. Press F4 (References) and add a reference to that DLL.
2. Or, if you have an autocompletion license, just type your original query: HttpUtility.UrlPathEncode("Make sure"); and open the smart-tag that automatically appears. It will present a menu option to add the reference to System.Web.dll and import the System.Web namespace in a one-fell-click!

Friday, July 20, 2012

Taskkill

Taskkill /F /IM notepad.exe
/F => Forcefully terminate
/IM => image name of process e.g. notepad.exe, note*.exe (i.e. Wildcard '*' is supported)

Taskkill /?

Thursday, July 5, 2012

Fixed table header -using HTML and CSS only

From - http://www.scientificpsychic.com/blogentries/html-and-css-scrolling-table-with-fixed-heading.html

Excerpt from above (with some added formatting) -
It is possible to have a table with a scrolling body and fixed header with only HTML and CSS.

The solution is to use 3 tables.
    • An outer table consists of 2 rows
    • The top row contains a table for the heading and the bottom row contains a <div> containing the table for the scrollable body. 
    • The outer table and the <div> container have to be 25 pixels wider than the tables for the heading and the body to allow room for the vertical scroll bar. The column widths of the tables are defined through CSS.
Click on HTML tab and Result tab

Monday, May 28, 2012

javascript console - To get value of an element from an iframe

var d = ($$('iframe')[0]).contentDocument; d.getElementsByName('ID')[0]

Saturday, May 26, 2012

Title: Become a Javascript Console Power-User



To be able to access, from Console, elements in an iframe:
1. get id of iframe -  

2. use the cd() command -

Wednesday, May 16, 2012

DateTime.Now.CompareTo() method

var dt1 = DateTime.Now; while (DateTime.Now.CompareTo(dt1.AddSeconds(10)) <= 0) { }

Tuesday, May 15, 2012

Store Form Values bookmarklet

Drag & Drop the following bookmarklets to 'store' and 'load' a form's values.
Form Values - Store
Form Values - Load

Monday, March 19, 2012

Search stored procedure's text

http://blog.sqlauthority.com/2007/09/03/sql-server-2005-search-stored-procedure-code-search-stored-procedure-text/

USE AdventureWorks
GO

--Searching for Empoloyee table
SELECT Name FROM sys.procedures WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%Employee%'
GO
--Searching for Empoloyee table and RateChangeDate column together
SELECT Name FROM sys.procedures WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%Employee%'AND   OBJECT_DEFINITION(OBJECT_ID) LIKE '%RateChangeDate%'
GO 

Wednesday, February 29, 2012

Display all "display:none" elements

$("*").filter(function() { return $(this).css("display") == "none" }).css("display","")

Sunday, February 19, 2012

HTTP Caching 101, Sebastien Lambla

HTTP Caching 101, Sebastien Lambla (@serialseb) of CodeBetter.com


http://vimeo.com/36409207


Sunday, February 12, 2012

More examples using Correlated Subquery

More examples using Correlated Subquery-

In my opinion, although Method 1 has the extra select statement at the top, it conveys the logic of the query better than Method 2.

In Method 2, we basically have pushed the 'join' statement inside the outer query.


Method 1:



SELECT 
A.*, Challenge.* 
FROM 
(SELECT CE1.Challenge_ID,Question1,Question2,Question3,Question4,Question5,Question6
FROM Challenge_Enter as CE1
WHERE CE1.ID = 
(SELECT max(CE2.ID) 
From Challenge_Enter as CE2
WHERE CE2.CustomerID = 1123607 AND CE2.Challenge_ID = CE1.Challenge_ID AND Challenge_ID > 0)
) A
INNER JOIN 
Challenge 
on A.Challenge_ID = Challenge.ID



Method 2:



SELECT Challenge.*,CE1.Challenge_ID,Question1,Question2,Question3,Question4,Question5, Question6
FROM Challenge_Enter as CE1
INNER JOIN Challenge on CE1.Challenge_ID = Challenge.ID 
WHERE CE1.ID = 
(SELECT max(CE2.ID) 
From Challenge_Enter as CE2
WHERE CE2.CustomerID = 1123607 AND CE2.Challenge_ID = CE1.Challenge_ID AND Challenge_ID > 0)

Correlated Subquery, Common Table Expression example


Here are 3 different ways to write the same query.



The difference between using Self-Join method, CTE method, and Correlated Subquery method --> in Correlated Subquery method, I could use the ID column (which is the primary key column); but we cannot use ID in Group By (since it will be unique for each row), so we cannot use it in the Self-Join & CTE methods 
Hence, while writing Correlated Subqueries, we 'probably' have to focus on this --> returning the Primary Key of the outer query's table from the subquery
(This has to be verified by looking at examples)

From the table Challenge_Enter,
find out all the details of the latest Challenge to which the Customer 1123607 has entered into.

Self-Join
---------
SELECT
xx.*, Question1, Question2, Question3, Question4, Question5, Question6
FROM
Challenge_Enter yy
INNER JOIN
(SELECT
CustomerID, Challenge_Id, max(EnterDate) AS EnterDate
FROM
Challenge_Enter
WHERE
customerid = 1123607 AND Challenge_ID > 0
GROUP BY
Challenge_Id, CustomerID
) xx
ON yy.Challenge_ID = xx.Challenge_ID
WHERE
yy.EnterDate = xx.EnterDate

Common Table Expression
-----------------------
WITH
max_entries (Challenge_ID, maxEnterDate) As
(
SELECT
Challenge_id, max(EnterDate) maxEnterDate
from
Challenge_Enter
where CustomerID = 1123607 AND Challenge_ID > 0
group BY
Challenge_ID
)
SELECT
*
FROM
max_entries
INNER JOIN
Challenge_Enter
ON
max_entries.Challenge_ID = Challenge_Enter.Challenge_ID AND
max_entries.maxEnterDate = Challenge_Enter.EnterDate


Correlated Subquery
-------------------
SELECT
Challenge_ID,Question1,Question2,Question3,Question4,Question5,Question6
FROM
Challenge_Enter as CE1
WHERE
ID = (SELECT max(CE2.ID) From Challenge_Enter as CE2 WHERE CE2.CustomerID = 1123607 AND CE2.Challenge_ID = CE1.Challenge_ID AND Challenge_ID > 0 )

Friday, November 18, 2011

TableSorter, Flexigrid examples

TableSorter

This does everything on the Client (i.e. data is downloaded and then Paging, Sorting, Filtering (Search) is done on the data).

(I modified the jquery.tablesorter.filter.js file because there was a bug - search was being conducted on a row after combining all its column values without a space in between; this results in extra rows being displayed in the Search)
TableSorter with Paging & Search

Flexigrid

This does everything on the Server (i.e. paging, sorting, searching)
Unzip the file, open as Website in Visual Studio, right-click on "HTMLPage_UsingJquery1.7.htm" or "HTMLPage.htm" , and select View in Browser

Flexigrid.zip

BUGS -
1) If on Page 2,3,.. (>1), and then Search string is modified, page number does not go to 1 automatically. This is a problem if Search results do not exceed 1 page. (I could not rectify this by passing 'page':1 to flexOptions like I did for Search parameters.)

2) Displaying 10 of 23 results - this message at the bottom-right does not update properly with Search & Paging updates

Monday, November 7, 2011

Sunday, October 16, 2011

External Tables example

Using FIXED -

Using DELIMITED BY NEWLINE -

SQL Data Loader example




A simpler example - data contained within the .ctl file (for testing purposes)

Tuesday, September 20, 2011

Trello.com - technologies used


  • Nodejs for Webserver 
  • Express for MVC
  • JQuery
  • Backbone
  • SocketIO
  • JQueryUI
 It's all written in Coffee Script as well. Mongo stores our permanent data, and we're using Redis as a transient data store.


From http://stackoverflow.com/questions/5053167/backbone-js-versus-express-versus-ext-js-and-jspp - 



backbone.js is a client-side MVC framework.
JSPP is a means you can write inline server-side code (like PHP or ASP) for nodejs
Express is a node.js specific server-side framework for web development.
Ext JS is a framework for making web applications and widgets.
There all very different. There isn't any point in a direct comparison without you telling us what you want to use them for.
To vaguely answer your question. IMHO I would say using backbone.js on the client and on nodejs is great for MVC centric design.
Express is a great layer of abstraction on nodejs because it beats writing the code yourself. Use it to serve content to your clients.
Ext JS is not free.
JSPP looks like ASP/PHP!

Wednesday, September 14, 2011

Finding out which apps are using which ports on your machine

http://blogs.msdn.com/b/bgroth/archive/2004/11/11/256190.aspx

Above link suggests using "netstat" along with "tasklist"

Another way is to use "netstat" along with Task Manager

Step 1: Open Task Manager  -- select "View" -- select "Select Columns" -- check PID
Find out PID of the process whose port info you are after.

Step 2: (From above link)
C:\>NetStat -o

PID will displayed in the last column. Use PID from Step 1

Example: To find the port that "sqlservr.exe" is using, we first find out the PID from Task Manager ,which is 1660
If we now type "netstat -o" in a command prompt window, we will be able to see which port is being used by that PID ie 1660



Thursday, September 8, 2011

WCF Callbacks related - Steps to do on client-side when using wsDualHttpBinding


Client = WPF app (chat application)
WCF Service = uses wsDualHttpBinding (to make callbacks to the clients)
OS= Windows XP
(The whole project is an implementation of  - http://www.eggheadcafe.com/tutorials/aspnet/b5ada8df-58c5-492f-b368-457b3a4f137c/notify-client-applications-using-wcf-callbacks.aspx )

After initially developing the client (a WPF app) and the WCF Service on the same machine, we moved the WCF Service to a test server.

I received the error message - The caller was not authenticated by the service..

Upon googling, it turned out that this is the common error message that is received when developers typically move their WCF Service to another machine.

1. In client's app.config file :

<security mode="None">
                        <message clientCredentialType="None" negotiateServiceCredential="false" />
                    </security>


2. Specified "clientBaseAddress" attribute for "binding" element in client's app.config:

clientBaseAddress="http://system2:8001/TempUri/"

(I used machine-name or IP address instead of "localhost" in clientBaseAddress)

3. Add 8001 port to Firewall's Exception list

Did the following to make the WPF app, running as a non-admin , to receive the callback properly from the WCF service. This will take care of the following error -
HTTP could not register URL http://*:8001/TempUri/. Your process does not have access rights to this namespace


4. Download HttpNamespaceManager tool from http://blogs.msdn.com/b/paulwh/archive/2007/05/04/addressaccessdeniedexception-http-could-not-register-url-http-8080.aspx
HttpNamespaceManager.zip

5. Add SDDL using HttpNamespaceManager tool - Add Users group AND give rights to Users group

6. (OPTIONAL step) Specifying clientBaseAddress via code instead of from app.config - If we do this, we do not have to change app.config when we install the app on the user's machine

// modify ClientBaseAddress to have this machine's IP address in the Url
// The ClientBaseAddress is needed for the Service to contact the client

WSDualHttpBinding w = (WSDualHttpBinding)this.chatServiceClient.Endpoint.Binding;

w.ClientBaseAddress = new Uri("http://" + getIPAddress() + ":8001/TempUri");      

chatServiceClient.Endpoint.Binding = w;

........
........
........

private string getIPAddress()
{
string myClientMachineName = System.Net.Dns.GetHostName();
        IPHostEntry myClientMachineAddressList = System.Net.Dns.GetHostEntry(myClientMachineName);
        return myClientMachineAddressList.AddressList[0].ToString();
}

WCF CallBacks related - Assign ClientBaseAddress in code

Update ClientBaseAddress via code

Monday, September 5, 2011

WCF Callbacks

The below is a good example of using WCF Callbacks -
http://www.eggheadcafe.com/tutorials/aspnet/b5ada8df-58c5-492f-b368-457b3a4f137c/notify-client-applications-using-wcf-callbacks.aspx

But I have stripped down the code for the 'client' to the below, to understand the main steps more easily.
By 'stripping down', I mean, I removed error checking code and made the MainWindow class implement the callback function

Friday, July 1, 2011

Small Basic - for beginners and kids

http://msdn.microsoft.com/en-us/ff384126.aspx
http://smallbasic.com/
Microsoft Small Basic puts the fun back into computer programming. With a friendly development environment that is very easy to master, it eases both kids and adults into the world of programming.

101 Examples in Linq - MSDN

C# - http://msdn.microsoft.com/en-us/vcsharp/aa336746

VB - http://msdn.microsoft.com/en-us/vbasic/bb688088.aspx

Thursday, June 16, 2011

Adding Text to Days in DatePicker jqueryui




Steps Required Steps:
(1) All days displayed are actually <a> tags. So, replace html of the required <a> tag with required html
Repeat 1 for as many days as required.
(2) At this point , since the html for some <a> tags has been modified, the height and width of the cells containing these modified <a> tags might be different than others in the same row. So, for each row, find out maximum height among <a> tags, and make it the height for all <a> tags in that row.

Optional steps:
(3)
Left-align text that has been added
(4) Center all <a> tags using text-align:center



Example - jquery code for the above steps To add text to June 26, 2011 in DatePicker in jqueryui -

$('table a:eq(25)').html('<table><tr><td valign="top">26</td></tr><tr><td><span style="font-size:10px"><b>Sai-On Vacation</span></td></tr></table>');

$('table a:eq(25)').find('span').css('text-align', 'left');

$('a').css('text-align', 'center');

$('table a:eq(25)').parent().parent().find('a').height($('table a:eq(25)').height());




Function to make heights of cells same in each row The below function could be used for Step 2 in "Required Steps" above (i.e. to make the heights of all <a> tags same in a row) -


function findAnchorWithMaxHtInEachRowAndAssignItsHtToAllAnchors() {
  for (i = 0; i < 5; i++) { // There are only 5 rows in each calendar
    max_ht = 0;
    $('table.ui-datepicker-calendar > tbody > tr:eq(' + i.toString() + ') >td > a').each(function () { // find max ht in each row
      if ($(this).height() > max_ht)
          max_ht = $(this).height();
    });
    $('table.ui-datepicker-calendar > tbody > tr:eq(' + i.toString() + ') >td > a').each(function () { // assign this max ht to all <a> tags in that row
      $(this).height(max_ht);
    });
  }
}




When showing multiple calendar controls on the page When showing multiple months, like for eg. in 2rows,3cols (i.e. 6 months), we have to prefix the following to reach the correct month's calendar instance - <span style="font-weight:bold;">$('span.ui-datepicker-month:eq(2)').parent().parent().parent().find(</span>      as in
$('span.ui-datepicker-month:eq(2)').parent().parent().parent().find('table a:eq(16)').html('17 <br> <span style="font-size:5px"><b>Sai-Approved-By Anil</b><br><i>Sai-Not Approved-By Anil</i></span>' )



Followers

Blog Archive