Wednesday, April 9, 2008

Microsoft Office Sharepoint Server Resources


I was looking online for Sharepoint information and training material and here are some excellent resources I found:


Free Sharepoint 2007 Server Courses by Microsoft
http://office.microsoft.com/en-us/training/CR102146081033.aspx
Some of these course are very basic and are meant for general users not developers. For example, some of them teach the user how to upload or save a file directly from Word/Excel/Powerpoint to a Sharepoint server.



Sharepoint desktop training download.
http://www.microsoft.com/downloads/details.aspx?FamilyId=7BB3A2A3-6A9F-49F4-84E8-FF3FB71046DF&displaylang=en



Sharepoint standalone and server training download
http://office.microsoft.com/en-us/sharepointserver/HA102488011033.aspx



Sharepoing server home page
http://office.microsoft.com/en-us/sharepointserver/default.aspx



Sharepoint 2007 Server help page
http://office.microsoft.com/en-us/sharepointserver/FX101211721033.aspx



Sharepoint Server 2007 Virtual PC Harddrive Image
http://www.microsoft.com/downloads/details.aspx?FamilyID=67f93dcb-ada8-4db5-a47b-df17e14b2c74&DisplayLang=en
This image runs a Windows Server 2003 R2 Enterprise Edition machine. The virtual machine is for evaluation purposes and will expire after 30 days. You can login to the image using the following creditentials:
Username: Administrator
Password: pass@word1



Sharepoint Server 2007 Virtual PC Harddrive Image with Instructions and Walkthrough
https://connect.microsoft.com/Downloads/DownloadDetails.aspx?SiteID=428&DownloadID=7004
This image has been expired but can still be used for an hour each time the virtual machine is started.



Let me know if you find this of help.

Sunday, March 30, 2008

Checking OS and Browser with Javascript


I've ran into cases where different browsers and even the same browsers but on different OS's respond differently to CSS attributes. So in some cases it's best to check for the type of OS and browser and apply attributes accordingly. I recently had to deal with this issue for the Firefox browser on Mac.




It turns out that having an HTML element with a CSS opacity attribute interferes with Flash graphics on the web page if it lays over it. As far as I noticed this only happens currently when using Firefox on Mac. Since opacity wasn't a requirement and wasn't of importance I decided to take it out on that browser/OS combination. This is done by code like the following:





function checkOSBrowser() {
if(navigator.platform.indexOf("Mac") || navigator.userAgent.indexOf("Firefox"))
document.getElementById("myElem").style.opacity = "0.8";
}




To review, navigator.platform returns the current OS and navigator.userAgent returns the running browser name. It is generally better to use indexOf() or search() to look for the desired OS or browser than to use an exact match because if anything slightly changed with an exact match the match would fail. Take "Mac" for example. If you run navigator.platform on a Mac machine with Intel processors, the output would be "MacIntel" not "Mac." So if you don't care exactly what kind of Mac is running you should just use the indexOf() or search() functions provided by the Javascript String.

Thursday, February 21, 2008

Google JavaScript Trick

Here is a cool browser JavaScript trick. Go to www.google.com then in the address bar of the browser paste the following and press Enter:

"javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5 ); void(0);"

without the quotes. The Google logo should start dancing. You can still use the Google search while the logo is bouncing around the page though. Like it?

Friday, February 15, 2008

Javascript Naming for CSS Float Property

Typically, you can access a CSS property of an element in Javascript using something similar to:


elem.style.propertyName = "value";


Where the propertyName is the property name in CSS with no dashes and written in camel format. For example text-align becomes textAlign. However, for the CSS float property this is a problem because float a keyword in Javascript. Therefore instead you have to use cssFloat.

Monday, February 11, 2008

State Management with ASP .NET 2.0 - 2

In the previous post about state management I talked about the ViewState collection. Today I will write about the Application collection.

2. Application State Collection

The Application collection is an object collection that maps strings to objects. The unique aspect of the Application collection is that it is a global variable such that it is shared throughout the entire ASP .NET application. The Application collection has the same life span as the ASP .NET process and dies or is cleared when the process is killed or restarted.

The use of the Application collection is to store variables that need to be retained across different pages and shared amongst different users and sessions. An example of something that might be stored in the Application collection would be a counter of some sort that is shared amongst pages and sessions.

The Application collection is used like any collection in .NET. To store something (in code behind):

int n = 0;
Application["keyID"] = n;


To retrieve a variable from the collection:

int x = (int)Application["keyID"];