Google Chrome
Posted in: UncategorizedTrying out Google Chrome… looks good so far. My bank website loaded up nice and fast, but it looks like my audio stream is still loading…
Trying out Google Chrome… looks good so far. My bank website loaded up nice and fast, but it looks like my audio stream is still loading…
Ok, I came across this a while ago, and promptly forgot about it. MSDN Virtual Labs (and its companion TechNet Virtual Labs) are awesome resources to get hands-on experience with technologies from Microsoft. They have a whole slew of stuff on developing inside of WSS, and it’s just a great resource.
I’m using Word 2007 to create this post. I was actually starting to create a new document and I figured I would try creating a new blog post to see how it works.
I was first presented with this dialog to register my blog:
I selected Wordpress from the list and saw this dialog:
I put in my blog (http://nathandewitt.net/blog/xmlrpc.php) and entered my account information. I clicked OK and presto changeo I was done.
Next I entered my title:
Then I clicked on the Insert Category. It reconnected to my blog to download my Categories, and then I selected Meta from the dropdown list.
I’m going to play around with some of the Word 2007 features to see how it handles them:
An Equation:
Word Art:
Some Code:
private
SPListItemCollection nominated(SPList calendarList)
{
SPQuery query = new
SPQuery();
query.ViewAttributes = "Scope=\"Recursive\"";
query.Query = "<Where>" +
"<Eq>" +
"<FieldRef Name=\"" + nominateField + "\" />" +
"<Value Type=\"bit\">1</Value>" +
"</Eq>" +
"</Where>";
return calendarList.GetItems(query);
}
Finally, I typed everything up and clicked Publish. It seems pretty straight-forward.
Pros:
Cons:
Conclusion:
This was easy to get going, but I’m not pleased with the embedding of other items (pictures, equations, code). This is a great solution for just writing a typical blog entry without a lot of pictures or style changes. Maybe I’ll use this more for blogging longer essays. I think I’ll stick with handcoding the HTML for now.
There are many ways to run custom code in SharePoint 2007. Arguably one of the simplest is to create a Custom Application Page, sticking all the source code into a script tag at the top of the page. You don’t have to muck around with compiling dlls or modifying the web.config file.
<%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C" %> <%@ Page language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>
Watch out! SharePoint Designer likes to remove the ~/ from your MasterPageFile declaration. I have no idea why it does this. I sat there entering it, hitting save, and watching it disappear like 4 times before I opened up Notepad and put it in. Weird.
<%@ Import Namespace="System" %> <%@ Import Namespace="System.Web" %> <%@ Import Namespace="System.Web.UI" %>
<script runat="server"></script>
<asp:Content ID="Main" contentplaceholderid="PlaceHolderMain" runat="server"> <!-- all your aspx content goes here --> </asp:Content> <asp:Content ID="PageTitle" runat="server" contentplaceholderid="PlaceHolderPageTitle"> Title in browser title area </asp:Content> <asp:Content ID="PageTitleInTitleArea" runat="server" contentplaceholderid="PlaceHolderPageTitleInTitleArea"> Title in SharePoint chrome </asp:Content>
Have fun!
I’m using syntaxhighlighter plugin to manage my source code listings. Just activated it, and now I’m testing it out.
Here’s some SQL:
SELECT i.first_nm, i.last_nm, iui.username, s.descr FROM tbl_individual i JOIN tbl_ind_userid iui ON i.pn_id = iui.pn_id JOIN tblkp_ind_status s ON i.status_cd = s.status_cd
Here’s some XML:
<system.web> <securityPolicy> <trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_mediumtrust.config" /> <trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_minimaltrust.config" /> </securityPolicy> <httpHandlers> <remove verb="GET,HEAD,POST" path="*" /> <add verb="GET,HEAD,POST" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> <add verb="OPTIONS,PROPFIND,PUT,LOCK,UNLOCK,MOVE,COPY,GETLIB,PROPPATCH,MKCOL,DELETE,(GETSOURCE),(HEADSOURCE),(POSTSOURCE)" path="*" type="Microsoft.SharePoint.ApplicationRuntime.SPHttpHandler, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <add verb="*" path="*/rss.xml" type="CKS.EBE.RssHandler, CKS.EBE, Version=0.1.0.0, Culture=neutral, PublicKeyToken=3e8b700c069fb747" /> </httpHandlers> </system.web>
And here’s some C#:
private string GetRandomPasswordUsingGUID(Int32 length)
{
string result = System.Guid.NewGuid().ToString();
result.Replace("-", String.Empty);
if ((length < 1) || (result.Length < length))
{
throw new Exception("Length must be between 1 and " + result.Length.ToString());
}
return result.Substring(0, length);
}
Ok, this post is for a friend of mine. By default, Office 2007 saves files in a new format, .docx. If you have clients that have not upgraded yet, there might be some confusion when they open your files. Ideally, you would have them get the Office Compatability Pack, but that’s not always feasible. You can save each file as a .doc file, but that can be onerous to remember every time.
Here’s how you set Office 2007 to save documents every time so that Office 2003 users can use your docs with no headaches.
If you send other files (Excel, PowerPoint) then you might want to do the same thing for them. But otherwise, that’s it. You’re done.
Hi. My name is Nathan DeWitt, and I’m a software developer. I’m just getting started with this site, and I think I’m going to keep it the default WordPress look for a while until I figure out the direction (design-wise) I want to go with.
I plan on using this space to write about some professional topics, which for me involve ASP.NET, MOSS/WSS, MS SQL Server and some of the other Microsoft development stack. There will also be some other stuff mixed in as I explore new areas. Pretty much stuff I come across that seems interesting should find its way here. If nothing else, this will be a place to remind myself what section of that web.config should be edited, or how to extend a system partition in WinXP.
I look forward to receiving any comments or emails.