A first preview of the next version of Microsoft Expression Blend, called Blend 2 is available at the Microsoft Download Center. This preview version allows you to create Silverlight 1.0-based applications. Microsoft Expression Design can export content in a format that can be used in Blend 2 August Preview for creating Silverlight-based applications.
Among the new features is the support for Visual Studio 2008. WPF projects and solutions created in Blend 2 August Preview are Visual Studio 2008 projects and solutions, if .NET Framework 3.5 is installed. Of course you can still open and work with projects created with Microsoft Blend or Visual Studio 2005.
For a complete list of the new features visit the product download page.
Hits for this post: 5833 .
The C++ standard, specifies in the paragraph 23.1.10 that swapping two containers should not invalidate any references, pointers or iterators refering to the elements of the containers being swapped. Unfortunatelly, that is not the case of the VC++ 2005 implementation.
Imagine the following case:
std::vector vec1;
vec1.push_back(1);
vec1.push_back(2);
vec1.push_back(3);
std::vector vec2;
vec2.push_back(10);
vec2.push_back(20);
std::vector::iterator it1 = vec1.begin();
std::vector::iterator it2 = vec2.begin();
std::cout << *it1 << std::endl;
std::cout << *it2 << std::endl;
You can swap the containers, and still should be able to use the iterators:
vec1.swap(vec2);
std::cout << *it1 << std::endl;
std::cout << *it2 << std::endl;
That works fine in a debug build, but in a release build, the code will crash, because parent pointers added to the iterators because _SECURE_SCL is defined (default for a release build), are broken by the swapping. Stephan Lavavej recently blogged in the VC++ blog about the problem and how it was fixed in Visual Studio 2008. The fix came with a downside in performace, so if your code could be affected by it, make sure you read his comments on the issue.
Hits for this post: 5549 .
I’m using Yahoo! mail beta, and a couple a day ago I found something intriguing: a feature called ‘Subject-O-Matique’. It is an automatical subject line generator. When you hit the subject button it inserts random (unique) titles such as:
- Eating pasta with chopsticks
- Pass the timbits!
- Space heaters make great house-warming gifts
- Boris or Brigitte?
- Astonishing feats of MENTALISM!
- holy schadenfreude batgirl
- I am the kid next door’s imaginary friend
- etc.
However, Yahoo! did not invent it. It was part of a web application called Oddpost. It was bought by Yahoo! and now they use this Subject-O-Matique feature.
Hits for this post: 6595 .
The first CTP (called August 2007 CTP) for the next version of Visual Studio Team System code-named ‘Rosario’ (after a resort located on the Orcas Island, Seattle) was released at the end of the last week. This will be the next version after Visual Studio Team System 2008 (that will be officially launched on February 27, 2008). According to John Beehler, the main reasons for this CTPs are:
- practice shipping, and especially
- collecting feedback; you can submit bugs and suggestings at http://connect.microsoft.com/visualstudio; if you do that, make sure you indicate the product version as “Visual Studio Team System Code Name “Rosario” (August 2007 CTP)”.
You can download the ‘Rosario’ VPC images from here.
Hits for this post: 6263 .
I’ve seen this question many times asked in forums. Unfortunatelly, not all the answers are ok. A a good wait to find the available COM ports is by using function GetDefaultCommConfig, that returns the default configuration for a specified communication device. Following code shows how to use it:
#include
#include
// this can be defined in a separate file
#ifdef _UNICODE
#define tstring std::wstring
#else
#define tstring std::string
#endif
void DetectComPorts(std::vector< tstring >& ports, size_t upperLimit = 128)
{
for(size_t i=1; i<=upperLimit; i++)
{
TCHAR strPort[32] = {0};
_stprintf(strPort, _T("\\\\.\\COM%d"), i);
DWORD dwSize = 0;
LPCOMMCONFIG lpCC = (LPCOMMCONFIG) new BYTE[1];
BOOL ret = GetDefaultCommConfig(strPort, lpCC, &dwSize);
delete [] lpCC;
lpCC = (LPCOMMCONFIG) new BYTE[dwSize];
ret = GetDefaultCommConfig(strPort, lpCC, &dwSize);
delete [] lpCC;
if(ret) ports.push_back(strPort);
}
}
Here is an example of how to use this function:
int _tmain(int argc, _TCHAR* argv[])
{
std::vector< tstring > ports;
DetectComPorts(ports);
for(std::vector< tstring >::const_iterator it = ports.begin(); it != ports.end(); ++it)
{
std::cout << *it << std::endl;
}
return 0;
}
Hits for this post: 11278 .
I read a very interesting article written in 2004 by Joel Spolsky, called How Microsoft Lost the API War. It shares my view that latelly, Microsoft has released simply too many programs and technologies and we can no longer cope with them. They have to take a break (and fix problems in the current releases) and give us a break too. Though a few years old, I find it very actual, and I encourage you to read it.
One funny thing that I read in the article was a problem of the famous SimCity game, which crashed on the beta release of Windows 95, because it accessed memory after it was freed. So Microsoft changed memory handling, introducing a special check for the program that was running, and if SimCity was found it allowed it to access memory after it was freed.
Hits for this post: 7845 .