About Zu

Posts by Zu:

 
0

LDAP Search Filters

on March 27, 2012 in LDAP

To test Search Filter:

in Active Directory

View -> Filter Options -> Create Custom -> Advanced

To show members of a group:

(&(objectCategory=user)(MemberOf=CN=YourGroupName,OU=Groups,DC=full,DC=domain,DC=name,DC=gov))



 
0

Friendly Session Time out Message

on February 10, 2012 in ASP

<BODY  onload=’beginSessionTimer();’> <script type=”text/javascript”> <!– function redirect(url) { window.location = url; } function ShowTimeoutWarning () { window.alert( “You will be logged out due to inactivity in 5 minutes. If you are working on something, please save your work now to prevent data loss!” ); } function beginSessionTimer() { // 30000ms = 30s // 300000ms = [...]

 
0

Dynamic MS SQL 2005 Stored Procedure Parameters

on March 16, 2011 in .Net, SQL

I had a function in my .NET application, that needed to do a search with an unknown number of parameters. for example:  select * from tbl where x=1 or x=2 or x=3 or x=4 Solution: Pass in a comma seperated list, use a table function to split that out into a table and then use [...]

 
0

.NET DateTime Picker

on December 29, 2010 in .Net

im my endless search for an DateTime Picker i have finally found one that’s awesome: http://www.basicdatepicker.com/download/downloadproduct.aspx

 
0

SQL JOINs

on November 29, 2010 in SQL

Assuming you’re joining on columns with no duplicates, which is by far the most common case: An inner join of A and B gives the result of A intersect B, i.e. the inner part of a venn diagram intersection. An outer join of A and B gives the results of A union B, i.e. the [...]

 
0

Migrate user Transactions

on November 10, 2010 in .Net, Ektron

make sure people don’t get charged by changing testmode=true in the web.config. I am using authorize.net test CC information for this. Dim catalogApi As New CatalogEntryApi()         Dim evtAPI As New Ektron.Cms.Framework.Calendar.WebEvent()         Dim bapi As New BasketApi         Dim oAPI As New OrderApi     [...]

 
0

Text was truncated or one or more characters had no match in the target code page.

on October 1, 2010 in SQL

I’ve run into this problem many many times already. here is a workaround? 1. save the excel as either tab delimited or pipe delimited. (the problem here is that it ads quotes to the import, but thats easily fixable later….) update table set fieldName= replace(fieldName, ‘"’, ”) where fieldName2= 188 2. select Flat file as [...]

 
0

Insert into Smart Form

on September 23, 2010 in Ektron

Dim capi2 AS New API.Content.Content         Dim XMLID AS Integer = 278         Dim folderID AS Integer = 71697         capi2.AddContent(txtJobTitle.Text, "hello", "<root><JobTitle>" & txtJobTitle.Text & "</JobTitle></root>", "hello", "1033", "", folderID, "", "", "", XMLID, -1, False)

 
0

Display Library Assets (Files)

on September 17, 2010 in Ektron

Dim libraryApi As New API.Library() ‘API.Library libraryApi = new API.Library(); Dim data() As LibraryData Dim totalPages As Integer Try data = libraryApi.GetAllChildLibItems("quicklinks", [id], "", 0, 0, totalPages) If ((data IsNot Nothing)) AndAlso (data.Length &gt; 0) Then ‘Dim item As LibraryData = Nothing Dim str As String = "" For Each item As LibraryData In data [...]

 
1

Upload library assets

on September 17, 2010 in Ektron

‘ Dim myFile2 = FileName.Text.ToLower Dim myFile As HttpPostedFile = DMSfile.PostedFile ‘add myDMSAssets as folder in site root directory DMSfile.PostedFile.SaveAs(Server.MapPath("~/path/") &amp; myFile.FileName) Dim fs As New System.IO.FileStream(Server.MapPath("~/path/" &amp; myFile.FileName), IO.FileMode.Open) Dim UpdateFile As New Ektron.Cms.AssetUpdateData UpdateFile.FileName = myFile.FileName UpdateFile.LanguageId = 1033 ‘add a folder in the WorkArea for DMS documents UpdateFile.FolderId = UpdateFile.Title = myFile.FileName [...]

Copyright © 2007-2012 Cheat Sheet All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.