How to get all users and computers in a domain via C#

I was playing around with Active Directory and C# today. I don't pretend to understand anything yet, but you don't need to know anything about Active Directory or LDAP to do stuff against it with C#.

To start with, the classes we're interested in are found in the following namespaces:

System.DirectoryServices;
System.DirectoryServices.ActiveDirectory;

Continue reading "How to get all users and computers in a domain via C#"

How to send e-mail as someone else from Gmail

Suppose you set up your email account (person@domain.com) so that all its e-mails get forwarded to your Gmail account. It's really easy to get Gmail to send a reply to any e-mail you received to this account as that account.

That is: the "From" field for any reply will be "person@domain.com" instead of "person@gmail.com."

Continue reading "How to send e-mail as someone else from Gmail"

TextInfo: ToTitleCase, ToLower, ToUpper

ToTitleCase(), ToLower(), ToUpper() results

I was poking around the .NET framework yesterday and came across these three methods in the TextInfo class:

string text = "this is a test string";

System.Globalization.TextInfo info = new System.Globalization.CultureInfo("en-US", false).TextInfo;

// First letter of every word is capitalized. System.Console.WriteLine(info.ToTitleCase(text));

// Lowercase all letters // System.Console.WriteLine(info.ToLower(text));

// Uppercase all letters // System.Console.WriteLine(info.ToUpper(text));

info = new System.Globalization.CultureInfo("de-DE", false).TextInfo;

System.Console.ReadLine();

Nice. :-)

Natheless ExpressionEngine Theme

Download Natheless here

Released under Creative Commons as usual.

Enjoy!

TFS: Set Working Folder

A quick tip on TFS: how to set the working folder (in which all files and folders are dropped when you do a "get latest").

For some mysterious reason, this option isn't available via the context menu but anyway: the workspaces dialog box (File » Source Control » Workspaces) lets you add or modify working folders.

Joy.

Review: Scrivener from Literature and Latte

Scrivener is a project management tool for writers. It won't try to tell you how to write - it just makes all the tools you have scattered around your desk available in one application.

I’ve been using Scrivener since beta versions and I love it! It’s a fantastic application tailored for writers everywhere and it’s well worth the $35. It’s loaded with a lot of great features, so let’s get started:

Continue reading "Review: Scrivener from Literature and Latte"

Select a query result into a variable

Today marks the end of my not-so brief sabbatical from my blog; thanks to everyone who stuck along. I can promise some free templates not to mention some nice EE themes within the coming weeks.

Anyway, yesterday I was working on a stored procedure that required me to select a field from the table into a variable. I figured it had something to do with the SET keyword, but it took me a while to figure out the exact syntax:

DECLARE @VariableName INT

SET @VariableName = (SELECT COUNT(*) FROM Customers WHERE State = 'MN')

More on easy weblog titles and a bit about images in EE

  1. A super-easy way to get the weblog's (section's) title in EE.

2. Make EE automatically fill in the image's width and height when you upload it to your server via the control panel.

Continue reading "More on easy weblog titles and a bit about images in EE"

5 of 19 pages « First  <  3 4 5 6 7 >  Last »

On the Side