Native American Flute - Connections

by Semicton 19. June 2010 22:46

My Third Song I call Connections. It is a flute player singing to the Great Spirit and creating a connection. This is a flute in the key of F#

Listen

Tags:

Native American Flute

Native American Flute - Red and White

by Semicton 19. June 2010 22:45

My First Song I call Red and White. It is a flute player trying to understand a connection with his ancestors. This is a small flute in the key of A#

Listen

Tags:

Native American Flute

Native American Flute

by Semicton 17. June 2010 05:18

I'll keep a page here to post .mp3 downloads of my flute playing.  This is my 8th week of playing the Native American flute but it does seem to be a rather natural thing for me to do.  It occupies my time and it makes me feel good.

First I have to post a song from my teacher.  He is a certified Native American Shaman Cherokee, Quapaw branch.

Listen

Tags:

Native American Flute

JQuery Intellisense and MS CDN

by Semicton 7. June 2010 15:45

Visual Studio 2010 support for JQuery  extends to providing  intellisense  when working with this library.  Visual Studio 2010 is able to use the comments contained on a special version of the JQuery library in order to populate the intellisense window as for the standard .NET classes. To use this feature, all you need to do is to replace the .min suffix with the –vsdoc suffix on the ScriptReference declaration of the ScriptManager:

<asp:ScriptManager ID="scriptManager" runat="server"

                EnableCdn="True" AjaxFrameworkMode="Disabled" >

   <Scripts>

    <asp:ScriptReference

       Paththth="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.1-vsdoc.js" />

   </Scripts>

</asp:ScriptManager>

 

Remember to revert the –vsdoc with the .min suffix when your site will be released. This will increase the site speed by reducing the quantity of JavaScript code that the client had to download. If the .min version is a JavaScript file that occupies 69 KB on disk, the –vsdoc version has length given by 229 KB.

Tags:

JQuery

Easily Hide the Sharepoint Ribbon

by Semicton 10. May 2010 22:30

Easily hide the Sharepoint Ribbon control from anyonymous users.

<SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server">
<!--- Sharepoint Ribbon code here ----!>
</SharePoint:SPSecurityTrimmedControl>

Tags:

SharePoint

CAML Joins and Sharepoint API Joins

by Semicton 2. April 2010 15:32

<Joins>
    <Join Type='LEFT ListAlias='Customers'>
        <Eq>
            <FieldRef Name='Field1' RefType='Id' />
            <FieldRef Name='ID' List='Customers' />
        </Eq> 
    </Join> 

    <Join Type='LEFT' ListAlias='Invoices'>
        <Eq>
            <FieldRef List='Customers' Name='CustomerID' RefType='Id' />
            <FieldRef List='Invoices' Name=’Customer_ID’ />
   
        </Eq>
    </Join>
</Joins>


Example:
SPQuery query = new SPQuery();
query.Query = "[YOUR CAML QUERY HERE]";
query.Joins = "[YOUR JOIN CAML HERE (See above for example)]";
query.ViewFields = "[SAME AS BEFORE]";

SPListItemCollection items = myList.GetItems(query);
foreach(SPListItem item in items)

Tags:

Create a ForEach extension method for LINQ

by Semicton 23. March 2010 19:38

  public static void ForEach<T>(this IEnumerable<T> source, Action<T> func)
 {
    foreach (var item in source)
      func(item);
 }

Purpose: Enumerate over a collection of data in a more compositional manner.

Program Example:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            List<Computer> Computers = new List<Computer>();
            Computers.Add(new Computer { name = "PC1", ID = 1 });
            Computers.Add(new Computer { name = "PC2", ID = 2 });
            Computers.Add(new Computer { name = "PC3", ID = 3 });
            var q = (from c in Computers orderby c.name select c);
                q.ForEach(cc => Console.WriteLine(cc.name));
                q.ForEach(cc => cc.name = cc.name.ToLower());
                q.ForEach(cc => Console.WriteLine(cc.name));

        }
    }

    public class Computer
    {
        public string name { get; set; }
        public int ID { get; set; }
        public Computer()
        {
        }
    }

    public static class HelperClass
    {
        public static void ForEach<T>(this IEnumerable<T> source, Action<T> func)
        {
            foreach (var item in source)
                func(item);
        }

    }
}

Tags:

.NET Framework | LINQ

Simple Javascript to Hide a HTML element

by Semicton 23. March 2010 16:17

<script>

    var browserType;

    if (document.layers) { browserType = "nn4" }
    if (document.all) { browserType = "ie" }
    if (window.navigator.userAgent.toLowerCase().match("gecko")) {
        browserType = "gecko"
    }

    function hide(thecontrolname) {
        if (browserType == "gecko")
            document.poppedLayer =
         eval('document.getElementById(thecontrolname)');
        else if (browserType == "ie")
            document.poppedLayer =
        eval('document.getElementById(thecontrolname)');
        else
            document.poppedLayer =
        eval('document.layers[thecontrolname]');
        document.poppedLayer.style.visibility = "hidden";
    }


    function show(thecontrolname) {
        if (browserType == "gecko")
            document.poppedLayer =
         eval('document.getElementById(thecontrolname)');
        else if (browserType == "ie")
            document.poppedLayer =
        eval('document.getElementById(thecontrolname)');
        else
            document.poppedLayer =
         eval('document.layers[thecontrolname]');
        document.poppedLayer.style.visibility = "visible";
    }


    function hide2(thecontrolname) {
        if (browserType == "gecko")
            document.poppedLayer =
         eval('document.getElementById(thecontrolname)');
        else if (browserType == "ie")
            document.poppedLayer =
        eval('document.getElementById(thecontrolname)');
        else
            document.poppedLayer =
        eval('document.layers[thecontrolname]');
        document.poppedLayer.style.display = "none";
    }

    function show2(thecontrolname) {
        if (browserType == "gecko")
            document.poppedLayer =
         eval('document.getElementById(thecontrolname)');
        else if (browserType == "ie")
            document.poppedLayer =
        eval('document.getElementById(thecontrolname)');
        else
            document.poppedLayer =
         eval('document.layers[thecontrolname]');
        document.poppedLayer.style.display = "inline";
    }
</script>

<form>
<input type=button onClick="hide('s4-leftpanel')" value="hide">
<input type=button onClick="show('s4-leftpanel')" value="show">


<input type=button onClick="hide2('s4-leftpanel')" value="hide2">
<input type=button onClick="show2('s4-leftpanel')" value="show2">

</form>

Tags:

Javascript

Windows API Code Pack for Microsoft® .NET Framework

by Semicton 9. March 2010 17:06

Wow. Never new this existed until today. The Windows API Code Pack provides a source code library that can be used to access some features of Windows 7 and Windows Vista from managed code. These Windows features are not available to developers today in the .NET Framework.

Here is a listing of the features included in the API code Pack:

  • Windows 7 Taskbar
    • Jump Lists, Icon Overlay, Progress Bar, Tabbed Thumbnails, and Thumbnail Toolbars
  • Windows Shell
    • Windows 7 Libraries
    • Windows Shell Search API support
    • Explorer Browser Control
    • A hierarchy of Shell Namespace entities
    • Windows Shell property system
    • Drag and Drop for Shell Objects
    • Windows Vista and WIdnows 7 Common File Dialogs, including custom controls
    • Know Folders and non-file system containers
  • DirectX
    • Direct3D 11.0, Direct3D 10.1/10.0, DXGI 1.0/1.1, Direct2D 1.0, DirectWrite, WIndows Imaging Component (WIC) APIs
  • Windows Vista and Widnows 7 Task Dialogs
  • Sensor Platform APIs
  • Extended Lingquistic Services APIs
  • Power Management APIs
  • Application Restart and RecoveryAPIs
  • Command Link control and System definded shell icons

The setup and install is a bit different.  The API comes as one large solution that needs to be compiled and then the .dll's pulled from the projects bin folder for use.

http://code.msdn.microsoft.com/WindowsAPICodePack

Tags:

Software and Tools

Display Public Key Token in Visual Studio

by Semicton 5. March 2010 16:41

Here is an easy way to display the public key token of a signed assembly from within Visual Studio.

In Visual Studio choose Tools from the tool bar then choose External Tools.  

A new dialog box will appear.  Click the Add button and fill the fields below:

Title: Get &PublicKeyToken
Command: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\sn.exe
Argumnets: -Tp $(TargetPath)

Place a check mark in the Use Output window option.

 

To Test:

Sign your assembly, then goto Tools and you will find your Get PublicKeyToken available in the list.  The public key tolken will now print to the Output window.

 

 

Printed Example:

Microsoft (R) .NET Framework Strong Name Utility Version 3.5.30729.1
Copyright (c) Microsoft Corporation. All rights reserved.

Public key is
0024000004800000940000000602000000240000525341310004000001000100ed4f1697d3045d
3b0384b1b2f3c334a2d7af32786dd2b15682a26238d72062db97853db569974f826c46c469d1a7
446ce305cb19cdfa31d110d09027630f3d497c8d987d3ec75923fd0dbafd5834d8b7544be9e52b
b9c7e23746bfe07cde2c8e07ab27e212eee74e405185fc67fedf6b430d955f70d6bd5d51e38fe1
9e5f7ace

Public key token is e8247507e0bdf57b

Tags:

.NET Framework

Powered by Semicton 1.5.0.7

Latest Downloads:

File Name Downloads
2009/12/scribd.zip 320
2009/12/BinaryClock.zip 267