Luca's profileLuca TarriniPhotosBlogListsMore ![]() | Help |
Luca TarriniSystem.Fenomeno |
||||
|
June 25 Add method for Collection Initializers
A fundamental rule of using collection initializer is the collection implements System.Collections.IEnumerable and includes an Add method. Then you would not be able to use with Queue<T>, LinkedList<T>, or Stack<T> because they have no Add methods. Look the attempt to use collection initializers with a Stack: 1: Stack<int> stack = new Stack<int>() { 1, 2, 3, 4, 5 }; This is the following error: 1: Error 1 'System.Collections.Generic.Stack<int>' does not contain a definition for 'Add' F:\Application\LINQ\Chapter_4\Test_1\Program.cs 12 51 Test_1
Luca Tarrini May 27 Outer Variables
Local variables declared outside an anonymous method are called outer variables. When an outer variable is used by anonymous method, that variable is captured. The same one is with Lambda expression. Outer variables captured by anonymous expression live on until after the anonymous function’s delegate is destroyed. Look this example: 1: int[] items = new int[5]; 2: int swapCount = 0; 3: 4: for (int i = 0; i < items.Length; i++) 5: items[i] = int.Parse(Console.ReadLine()); 6: 7: BubbleSort(items, (first, second) => 8: {9: bool swap = first < second; 10: if (swap) 11: swapCount++; 12: 13: return swap; 14: }); 15: 16: for (int i = 0; i < items.Length; i++) 17: Console.Write(items[i] + " "); 18: Console.WriteLine("\n===================="); 19: Console.WriteLine("# swapped: {0}", swapCount);
March 02 Install Windows Live 2009 on Windows Server 2008
If you want install Windows Live 2009 on your Windows Server 2008, then you can read this post. It is great. I wrote this post by Writer 2009. Below I copy exactly the post: ---------------------------------------------------------------------------------- Download the standalone version form HERE. Download The Resource Editing Tool Here. Then Open ResourceHacker. Click on File Menu and select open. Now Select the Windows Live installer and click open. Now expand to CONFIG\CONFIG0\0. Search [CTRL+F to search and enter the string to search] the string "workstation" [without quotes] and replace it with "server" [again without quotes]. Done! Now install Windows Live 2009 on Any Server Operating System. ---------------------------------------------------------------------------------- Luca Tarrini
February 17 Data Structures and Algorithms Using C#
I read the Circularly Linked List chapter of the book "Data Structures and Algorithms Using C#" by Michael McMillan I bought some months ago. I am so disappointed for the great number of errors. I checked Customer Reviews and it has exactly a low rating. Luca Tarrini Connect Office Outlook with Hotmail account
I found this interesting Microsoft tool. Some months ago I had the problem to manage my Hotmail email by Office Outlook 2007. I was so disappointed about that but finally now there is Outlook Connector. If you have your Windows Live Hotmail account email, then Office Outlook 2003 and Outlook 2007 can access you re-mail messages by Microsoft Office Outlook Connector. You can find more explanation here. Luca Tarrini December 04 Cannot specify accessibility modifiers for both accessors of the property
Access modifiers {get; set} for properties can have different modifiers. One problem with the properties is risen after a compile error Cannot specify accessibility modifiers for both accessors of the property. For example let's suppose to have this snapshot code: 1: public string Name 2: {3: protected get { return _name; } 4: private set { _name = value; } 5: } 6: 7: string _name;
Then the problem is both accessors have a different access level from the property. In fact one of the accessors must follow the access level of the property. As there isn't any logic in the properties set and get, I can use the auto-implemented properties. 1: public string Name { get; private set; }
Luca Tarrini December 03 AppHangB1 Error
I had this problem with IE. --------------------------------------------------------------------------------------------------------- Description Problem signature ---------------------------------------------------------------------------------------------------------- A possible solution is to disable some add-ons. In particular I disabled Windows Live Messenger add-ons and IE is working properly. Luca Tarrini Request failed with HTTP status 503: service unavailable.
Today I found this error message while I am working with Team Foundation Server: Request failed with HTTP status 503: service unavailable. All service are running and then where it is the problem? I checked and the TFSService and TFSReport password were expired. Then I updated the password and restarted the system and now TFS is working well. I found a good help in this post. Luca Tarrini Visio and Team System 2005
If you want UML diagrams with VSTS 2005, then you can need to install Visio 2003 for Enterprise Architects which is the \Visio folder of the Visual Studio Team System. But the same option is not possible with the version 2008. In fact the Visio 2003 is not compatible with Team System 2008. Instead there is a partial compatibility between Visio Professional 2007 and VSTS 2008. You have the only database reverse engineering. For further instructions guide, you can visit this link Visual Studio Team System 2008 and Visio FAQ. Luca Tarrini November 27 Great Future Short MovieSoftware Architect?
Today I am very tired. I spent all day for the Biztalk Server sessions. In any way I discovered that finding the right solution to address the problem seems no so easy. But I am not discouraged, in fact understanding the correct patterns I will be able to build complex solutions. No more software engineering but software architect. Why not? To synthesize the work of today, I began to explore the art to architecting the incoming and outgoing messages by the Biztalk Messaging Engine. Luca Tarrini PS. From tomorrow I will start off to study Swedish hoping in more spare time. October 26 Clone Array containing reference types
Arrays are reference types and then if you assign an array variable to another one, two arrays reference the same array. The interface ICloneable allows to obtain a shallow copy of the object. The Clone() method, defined with ICloneable interface, creates a shallow copy of the array. If the elements of the array are value are copied. If I modify the nums1[0] it doesn't affect nums2[0].
1: int[] nums1 = { 1, 2, 3, 4, 5 }; 2: int[] nums2 = (int[])nums1.Clone(); 3: nums1[0] = 100;
If the elements contains reference types, then the Clone method will copy the references to those objects. To have a deep copy, I will need to create a new instance of any reference type variables during the cloning process. Person type is my reference type
1: class Person : ICloneable 2: {3: public Person(string first, string second) 4: { 5: FirstName = first; 6: LastName = second; 7: } 8: 9: public string FirstName { get; set; } 10: public string LastName { get; set; } 11: 12: public override string ToString() 13: {14: return string.Format("{0}, {1}", FirstName, LastName); 15: } 16: 19: public object Clone() 20: { 21: string currFirstname = FirstName; 22: string currLastname = LastName; 23: 24: return new Person(currFirstname, currLastname); 25: } 28: }
If I need a deep copy of the internal reference types, then one possible implementation is the following:
1: Person[] myFamily = { new Person("Luca", "Tarrini"), new Person("Marco", "Tarrini") }; 2: Person[] myFamilyClone = new Person[myFamily.Length]; 3: 4: for (int i = 0; i < myFamily.Length; i++) 5: myFamilyClone[i] = (Person)myFamily[i].Clone();
Then if you need a deep copy of an array containing reference types, you have to iterate the array and create new objects. Luca Tarrini October 17 Cannot open database "TfsWarehouse" requested by the login. The login failed & The Team System cube.......
I must be honest that the setting of TFS takes a lot time. I don't know if somebody else spends so much of time as me but I have wasted many hours in the setting. In any way I hope now it is all right. The last error I received from TFS was the following: Then I opened Analysis Services and I processed TfsWarehouse with the following error: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Detailed Message: Cube processing runtime error: \r\nMicrosoft.AnalysisServices.OperationException: Internal error: The operation terminated unsuccessfully. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Now the solution is:
Then I restarted the SQL Analysis Services. Now TfsWarehouse and Show Project Portal work correctly. In any way you will find some posts on MSDN Forums. Luca Tarrini October 16 Samsung NV40
Today it is coming back......my digital camera. Now I am amateur not a professional photographer. But having it can be useful when for example I am in holiday. In fact this summer I was in Italy and I couldn't take a picture of my beautiful holiday. In any way I immediately used the digital camera showing my workstation, library, whiteboard (in the next day it will arrive the new one 1200mm x 900mm) and Aaron:
Luca Tarrini October 12 TFS Reporting ServiceInstalling Team Foundation Server 2008 on SQL Server 2008
If you are installing Team Foundation Server 2008 on a platform where it is installed SQL Server 2008, you could view this error:
One problem is the absence of compatibility between TFS 2008 and the Full Text Search or Reporting Services in SQL Server 2008. Then during the setup you will fail the initial check. To overcome the problem, you must integrate Team Foundation Server SP1. Read this post! Luca Tarrini Accounts Required for Team Foundation Server
After the problems with the last installation of TFS 2008, I decided to install it again. I didn't have had good feedback from MSDN Forum (disappointed with it) and looking for in Google I didn't find any valid solution. First starting out again the installation, I read again the TFS install guide in regard to accounts required. PS. The installation is on single server deployment. In the picture below I take a snapshot:
Reading some post about Installing Team Foundation 2008, I found a post of James McCaffrey very interesting. I quote this passage: "One of the more confusing parts of the installation instructions revolves around accounts and permissions. The documentation is inconsistent in several minor spots, but just enough to cause confusion. Anyway, I created domain accounts TFSSETUP and TFSSERVICE, and assigned them to the Administrators group on the local machine. The documentation says not to do this for account TFSSERVICE but security is not a major concern for me and security access problems can be nightmarish. This allowed me to skip going to Local Security Policy, User Rights Assignment, and messing around with log-on-as-a-service and allow-log-on-locally entries because Administrators get all that (and more of course). Also, forget about a separate TFSREPORTS account for SQL reporting services, and I didn't need a TFSPROXY account because I'm putting everything on one machine. I logged off the server and logged back on as TFSSETUP." Luca Tarrini October 08 The permissions granted to user 'MATRIX\TFSService' are insufficient for performing this operation. (rsAccessDenied)
I installed TFS 2008 on Windows 2008 Server and SQL Server 2008 as database. The installation is in a single server deployment. Unfortunately when I try Show Project Portal on my projects I find this Reporting Services Error: “The permissions granted to user 'MATRIX\TFSService' are insufficient for performing this operation. (rsAccessDenied)” I followed the guide Team Foundation Installation Guide for Visual Studio Team System 2008 and on Reporting Services Configuration I did not configure the report server because Team Foundation Server will configure the report server for me. I checked what about Reporting Server folder in IIS and I discovered that directory doesn’t exist. Then I tried to set the permissions for reporting services following the address http://localhost/reposrts but I don’t have a Properties tab as I guessed. Then someone can suggest a possible solution? Luca Tarrini October 01 Windows 2008 Server
If you decide to use Windows 2008 Server Backup, the feature tools need to be installed. The easiest way is to use the Add Features function within Server Manager.
Luca Tarrini September 26 Your Data. Any Place. Any Time = SQL Server 2008
Finally I have my SQL Server 2008 DVD. I also wish to install on my home PC where I installed Visual Studio Team Server 2008 and SQL Server 2005. Then I hope to upgrade the configuration to SQL Server 2008 without problem. Luca Tarrini September 25 Swedish Lesson
Yesterday I did my first Swedish lesson focusing on alphabet. The manual states beforehand the Swedish is probably one of the easiest languages to learn to pronounce. I am not so sure! Luca Tarrini September 24 My Name Is Sabine
I want write a short post on the documentary I watched some days ago. The provocative documentary is set in France and it is the story and the life of Sabine handicapped by severe autism. It is the sister of Sabine, Sandrine, behind the camera and she contrasts the young Sabine full of vitality and the anxious 40-years old Sabine overweight and prone the violence against herself and the others. At the end of the the movie I appreciated the meaning and I hope that people as Sabine can have the necessary care. In any way the movie is painful and it couldn't be otherwise! Luca Tarrini September 19 Strings in C# have a Schizophrenic Nature
I am reading the book " DATA STRUCTURES AND ALGORITHMS USING C#" by Michael McMillan and I found this bizarre definition: "Strings in C# have a schizophrenic nature—they are both native types and objects of a class. Actually, to be more precise, we should say that we can work with strings as if they are native data values, but in reality every string created is an object of String class." Luca Tarrini August 26 Biztalk Server 2006 Release 3?
For the moment I don't specialize in Biztalk Server also if some months ago I developed some applications. I wish install Biztalk on my PC running Windows Server 2008 but I discovered they aren't compatible. It seems there will be an updated version of Biztalk some time in the first half of 2009 for Windows Server 2008. The version will be called Biztalk Server 2006 Release 3. This is the same one happened with Biztalk Server 2006. It was released when Visual Studio 2005 and SQL Server 2005 were RTM. Some day ago SQL Server 2008 was released and then Microsoft will follow un update to be compatible with the most recent platform releases. Luca Tarrini August 25 TF30059: Fatal error while initializing web service
I installed the SP1 on Team Foundation Server and I couldn't connect to server. Dammit!! In fact I had this error stated in the title of this post.....Why SP1 has raised this problem?
After searching on the web to find the solution, I discovered others with the same problem and the solution. The solution is on this Microsoft KB article entitled "TFS 2008/ Not able to connect to TFS 2008 after installing Visual Studio 2008 SP1". I must download TFS 2008 SP1. Read the instructions carefully before installing the SP1: If you plan on using Windows Server 2008 or SQL Server 2008 with Team Foundation Server 2008 SP1 please see the Team Foundation Installation Guide for details on how to install SP1 on the Team Foundation Server and do not install the service pack using the instruction below. Additionally, if you plan to install this service pack on a server that has a client for Team Foundation also installed on it, you must install SP1 for Visual Studio 2008 on that server before you install SP1 for Team Foundation Server. For more information, see “Installing Team Foundation Server and Service Pack 1” in the installation guide.Luca Tarrini |
|
|||
|
|