Vulnerability in Microsoft DirectShow Could Allow Remote Code Execution Microsoft is investigating new public reports of a new vulnerability in Microsoft DirectX. From Microsoft Security Advisory (971778) Microsoft is investigating new public reports of a new vulnerability in Microsoft DirectX. The vulnerability could allow remote code execution if user opened a specially crafted QuickTime media file. Microsoft is aware of limited, active attacks that use this exploit code. While our investigation is ongoing, our investigation so far has shown that Windows 2000 Service Pack 4, Windows XP, and Windows Server 2003 are vulnerable; all versions of Windows Vista and Windows Server 2008 are not vulnerable
This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.
Like the title says An nUnit testfixture file template for resharper that also conforms to stylecop laws. Here it is. // -------------------------------------------------------------------------------------------------------------------- // <copyright file="$FileName$" company="$Company$"> // $Author$ // </copyright> // <summary> // Tests the $FIXTURE$ type. // </summary> // -------------------------------------------------------------------------------------------------------------------- namespace $NAMESPACE$ { using NUnit.Framework; /// <summary> /// Test for $FIXTURE$ /// </summary> [TestFixture] public class Test$FIXTURE$ { /// <summary> /// Test $TestName$ /// </summary> [Test] public void $TestName$() { } } }``` That’s the way I like them and no more stylecop warnings. Since Stylecop doesn’t exist in VB.Net I don’t have the equivalent. This is the xml. Just copy paste this in a file and then import it in resharper file templates. ```xml <TemplatesExport family="File Templates"> <Template uid="3a8692a1-37f3-4d44-9310-639548a1d876" shortcut="" description="NUnit Test Fixture" text="// --------------------------------------------------------------------------------------------------------------------
// <copyright file="$FileName$" company="$Company$">
// $Author$
// </copyright>
// <summary>
// Tests the $FIXTURE$ type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace $NAMESPACE$
{
 using NUnit.Framework;

 /// <summary>
 /// Test for $FIXTURE$
 /// </summary>
 [TestFixture]
 public class Test$FIXTURE$
 {
 /// <summary>
 /// Test $TestName$
 /// </summary>
 [Test]
 public void $TestName$()
 {
 }
 }
}" reformat="True" shortenQualifiedReferences="True"> <Context> <ProjectLanguageContext language="CSharp" /> </Context> <Categories /> <Variables> <Variable name="NAMESPACE" expression="fileDefaultNamespace()" initialRange="-1" /> <Variable name="FileName" expression="getFileName()" initialRange="0" /> <Variable name="Company" expression="constant("NICC")" initialRange="0" /> <Variable name="FIXTURE" expression="getFileNameWithoutExtension()" initialRange="-1" /> <Variable name="Author" expression="getFullUserName()" initialRange="0" /> <Variable name="TestName" expression="" initialRange="0" /> </Variables> <CustomProperties> <Property key="FileName" value="Test" /> <Property key="Extension" value="cs" /> <Property key="ValidateFileName" value="False" /> </CustomProperties> </Template> </TemplatesExport>```
There are a few things a good DBA really can’t live without in his or her arsenal of tools to better manage a wide array of instances. This includes OLAP and OLTP strategies. One of those tools is a good compression tool. I’ve never been one to promote software and kind of hate it when others try to jam it down my throat. I have what I need to make the decision on my own and know how to use Google and read reviews along with statistics provided. That being said I’m going to go off that typically demeanor and talk a bit about Quests LiteSpeed product and how I think it can benefit most DBAs. LiteSpeed is only one of many products out there first off. I tested four different products when I was given the budget and task to implement compression in the company I currently am employed with. I implore you to do the same and don’t just take any DBAs word no matter what the amount of experience they have is or given reputations. You gain experience from taking in others knowledge and putting it to test on your own and making your own “final” decisions. Every installation is different and the calculations you have to take into account for choosing the product that fits you is always going to vary.
I was in need of some reflection to determine the underlying type when I used Nullable. For instance Nullable(Of Date). First of course I did a Google. And I found [Get underlying type from a nullable type][1] by [Rydal Williams][2]. And there I found the C# version of how to do this. So I translated that and I found something new. Watch carefully. For Each _PropertyInfo In _model.GetType.GetProperties(Reflection.BindingFlags.Public or Reflection.BindingFlags.Instance) If _PropertyInfo.PropertyType.IsGenericType AndAlso _PropertyInfo.PropertyType.GetGenericTypeDefinition().Equals(gettype(Nullable(of ))) Then System.Console.WriteLine(Nullable.GetUnderlyingType(_propertyInfo.PropertyType).FullName) Else System.Console.WriteLine(_PropertyInfo.PropertyType.FullName) End If Next``` Can you see it. <code class="codespan">GetType(Nullable(Of ))</code> no type after the Of, I neve thought you could do that. You could of course do the same for fields. ```vbnet For Each _FieldInfo In _model.GetType.GetFields(Reflection.BindingFlags.Public or Reflection.BindingFlags.Instance or Reflection.BindingFlags.NonPublic) If _FieldInfo.FieldType.IsGenericType AndAlso _FieldInfo.FieldType.GetGenericTypeDefinition().Equals(gettype(Nullable(of ))) Then System.Console.WriteLine(Nullable.GetUnderlyingType(_FieldInfo.FieldType).FullName) Else System.Console.WriteLine(_FieldInfo.FieldType.FullName) End If Next``` Since this is reflection you won’t really need this much but from time to time it comes in handy. Untill we get better lambda support in VB10 this will have to do. One learns something new every day and the you die. [1]: http://blog.dotnetclr.com/archive/2008/03/11/get-underlying-type-from-a-nullable-type.aspx [2]: http://blog.dotnetclr.com/
We all know that we should avoid index and table scans like the plague and try to get an index seek all the time. Okay, what will happen if we fill a table with one million rows that have the same exact value and then create a clustered index on it. Yes, you can create a clustered index on a non unique column because SQL Server will create a uniquefier on that column to make the index unique.
Someone posted the following question I need to add table called group with a column called code How do I add a check constraint to the column so it will only allow the following alphabetic characters (D, M, O, P or T) followed by 2 numeric characters. Someone posted the following answer You cannot do this out of the box – MS SQL Server does support CHECK CONSTRAINTS – but for things like a maximum or minimum INT value, or a string length or such.
Background I have a report that returns specific documentation from the database with one parameter, a CustomerID. The report is bound to a stored procedure which has hard-coded in it the names of the specific documents that should be included. This solution is problematic because when the list of documents needs to change, the SP has to be updated, which means mistakes can be (and have been) made. The good step of converting the SP to use a table doesn’t satisfy me fully, because these reports are executed from a special reporting system that also has its own list of document names, so that it knows when to kick off a particular report—for example, if none of the documents exist, no report will be generated. I didn’t like the idea of depending on having the same data updates made in two places: I should be able to just update the reporting system with the new document names and then trust that the reports will contain the correct data. In the past, we had a mistake where the reporting system received a new document name that didn’t get included in the SP properly, so after finally fixing the SP, I had to do a recovery and resend some reports.
I had to restore a bunch of databases yesterday from our live server running on SQL Server 2000 to a server running SQL Server 2008. These databases range in size from 5 GB to well over 100 GB. I remember when I scripted out the biggest database with all the filegroups and ran that script on a 2000 box it took over an hour to create this database. The reason for this is that all the filegroups get filled with zeroes. In SQL Server 2008 (and SQL Server 2005) this doesn’t work like that anymore. When you create the database, the filegroups don’t get filled with zeroes anymore. When I took the script that ran for over an hour and ran it on the SQL Server 2008 box it finished in under a minute.
Most of you guys don’t know what a spectral library is and I forgive ye. But I needed something to test this brand new thing. So I choose something I know and something I know is hard to find. But this is all about the new VB10. So I started of by downloading the also new Windows 7 RC and VS2010 beta 1. I installed windows 7 on a Virtual machine for Virtual PC.
Microsoft has made available the SQL Server 2008 Developer Training Kit for download. The size of the download is 57MB. The SQL Server 2008 Developer Training Kit will help you understand how to build web applications which deeply exploit the rich data types, programming models and new development paradigms in SQL Server 2008. Overview SQL Server 2008 offers an impressive array of capabilities for developers that build upon key innovations introduced in SQL Server 2005. The SQL Server 2008 Developer Training Kit will help you understand how to build web applications which deeply exploit the rich data types, programming models and new development paradigms in SQL Server 2008. The training kit is brought to you by Microsoft Developer and Platform Evangelism.