Archive for the ‘English’ Category
C#: System.DayOfWeek output localized Weekday name
I have a plain DayOfWeek value and want to output the corresponding localized weekday name. Since it is an enum, there is no localization, says Microsoft. This is by design and will not be implemented in any way. I shall use DateTime’s .ToString(“dddd”). Alright, but I have no DateTime object from which I get the DayOfWeek. No problem. Here’s a workaround:
private string GetLocalizedWeekdayName(DayOfWeek d)
{
DateTime dt = DateTime.Today;
while (dt.DayOfWeek != d)
{
dt = dt.AddDays(1);
}
return dt.ToString("dddd");
}
In the comments Chris suggested a more straightforward approach. Though I never tried it I believe that it will do exactly the same:
private static string GetLocalizedWeekdayName(DayOfWeek weekday)
{
return CultureInfo.CurrentCulture.DateTimeFormat.DayNames[(int)weekday];
}
OTRS on CentOS 5
Today I started installing OTRS on CentOS. First barrier: Installing all the needed Perl modules. Luckily, there is a script calles bin/otrs.checkModules
After trying around a bit, I found out, that the following command installs at least the required stuff:
yum install perl-Compress-Zlib perl-HTML-Parser perl-HTML-Tagset perl-URI perl-libwww-perl perl-Net-DNS
The GD module can be downloaded/installed from Dag’s repository:
http://dag.wieers.com/rpm/packages/perl-GD/
[Update 2008-07-16] Today, I continued installing and it showed that installing works without a problem if you just follow the documentation, in my case especially in README.webserver.
OTRS works!
IE7 does not display Google Maps under W2K3
After I installed Internet Explorer 7 on a Windows Server 2003 machine, Google Maps did not work anymore. The page loaded partly but there maps did not load. After playing around with security zones which did not help anything I discovered that there are special security settings for Internet Explorer which can be disabled easily – if neccessary (believe me, I had a reason):
- Go to Control Panel
- Add or Remove Programs
- Add/Remove Windows Components
- Disable the entry Internet Explorer Enhanced Security Configuration
After that (re)start IE7 and Google Maps should load.
Clavister: How to add an additional IP address to an interface?
What if you need an additional IP address on one of the security gateway’s interfaces?
After searching the cfw-users mailing list’s archive I found a solution:
Under Interfaces -> ARP I had to add an entry have the security gateway publish its arp address for the IP address on the desired interface:
Mode: Publish
Interface: Interface with the IP Address
IP Address: The IP Address to be published
MAC Address: 00:00:00:00:00:00
Source:
http://archive.netbsd.se/?ml=cfw-users&a=2006-12&m=2703752