Search Results

Search found 1556 results on 63 pages for 'scott ewart'.

Page 7/63 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Enum.HasFlag

    - by Scott Dorman
    An enumerated type, also called an enumeration (or just an enum for short), is simply a way to create a numeric type restricted to a predetermined set of valid values with meaningful names for those values. While most enumerations represent discrete values, or well-known combinations of those values, sometimes you want to combine values in an arbitrary fashion. These enumerations are known as flags enumerations because the values represent flags which can be set or unset. To combine multiple enumeration values, you use the logical OR operator. For example, consider the following: public enum FileAccess { None = 0, Read = 1, Write = 2, }   class Program { static void Main(string[] args) { FileAccess access = FileAccess.Read | FileAccess.Write; Console.WriteLine(access); } } The output of this simple console application is: The value 3 is the numeric value associated with the combination of FileAccess.Read and FileAccess.Write. Clearly, this isn’t the best representation. What you really want is for the output to look like: To achieve this result, you simply add the Flags attribute to the enumeration. The Flags attribute changes how the string representation of the enumeration value is displayed when using the ToString() method. Although the .NET Framework does not require it, enumerations that will be used to represent flags should be decorated with the Flags attribute since it provides a clear indication of intent. One “problem” with Flags enumerations is determining when a particular flag is set. The code to do this isn’t particularly difficult, but unless you use it regularly it can be easy to forget. To test if the access variable has the FileAccess.Read flag set, you would use the following code: (access & FileAccess.Read) == FileAccess.Read Starting with .NET 4, a HasFlag static method has been added to the Enum class which allows you to easily perform these tests: access.HasFlag(FileAccess.Read) This method follows one of the “themes” for the .NET Framework 4, which is to simplify and reduce the amount of boilerplate code like this you must write. Technorati Tags: .NET,C# 4

    Read the article

  • Visual Studio, .NET Framework, and language versions

    - by Scott Dorman
    Every so often a question comes up about how Visual Studio, the .NET Framework, and a .NET programming language relate to each other. Mostly, these questions have to do with versions. The reality is that these are actually three different “products” that are versioned independently of each other but are related. Looking at how Visual Studio, the .NET Framework version, and the CLR versions relate to each other results in the following: Visual Studio CLR .NET Framework Visual Studio .NET (Ranier) 1.0.3705 1.0 Visual Studio 2003 (Everett) 1.1.4322 1.1 Visual Studio 2005 (Whidbey) 2.0.50727 2.0 Visual Studio 2005 with .NET 3.0 Extensions 2.0.50727 2.0, 3.0 Visual Studio 2008 (Orcas) 2.0.50727 2.0 SP1, 3.0 SP1, 3.5 Visual Studio 2008 SP1 2.0.50727 2.0 SP2, 3.0 SP2, 3.5 SP1 Visual Studio 2010 (Hawaii) 4.0.30319 4.0 The actual Visual Studio version numbers are: Product Name Version Ship Date Visual Studio .NET 7.0.???? 02/2002 Visual Studio .NET 2002 SP1 7.0.????   Visual Studio 2003 7.1.???? 04/2003 Visual Studio 2003 SP1 7.1.6030 09/13/2006 Visual Studio 2005 8.0.5072   Visual Studio 2005 SP1   12/14/2006 Visual Studio 2008 9.0.21022.8 11/19/2007 Visual Studio 2008 SP1 9.0.30729.1   Visual Studio 2010 10.0.30319.1 04/12/2010 (For those entries that are missing information, it simply means that I didn’t already know it and/or couldn’t easily find it online.) So far, everything seems fairly reasonable and isn’t terribly difficult to keep coordinated. However, when you start trying to find language versions and how those relate to .NET Framework, CLR, or Visual Studio releases it becomes more difficult. The breakdown for the programming languages that are part of Visual Studio are: Framework CLR Language     C# VB F# 1.0 1.0.3705 1.0 7.0 - 1.1 1.1.4322 1.1 7.1 - 2.0 2.0.50727 2.0 8.0 - 3.0 2.0.50727 2.0 8.0 - 3.5 2.0.50727 2.0 9.0 - 4.0 4.0.30319 4.0 10.0 2.0   Technorati Tags: Visual Studio,.NET

    Read the article

  • USA keyboard layout keeps getting added on login

    - by Scott Severance
    I use the USA International keyboard layout. Every time I log in, the USA layout gets added to my list of layouts, which causes the keyboard layout indicator to be displayed. How can I stop the USA layout from being added? Additional info: I'm running Natty. Until recently, I had all four layout slots filled. Recently I changed from SCIM to iBus. With this change, I no longer need multiple layouts since iBus better handles my needs. So, I don't want both indicators (iBus and Keyboard layout) showing up.

    Read the article

  • Oracle Delivers Latest Release of Oracle Enterprise Manager 12c

    - by Scott McNeil
    Richer Service Catalog for Database and Middleware as a Service; Enhanced Database and Middleware Management Help Drive Enterprise-Scale Private Cloud Adoption News Summary IT organizations are adopting private clouds as a stepping-stone to business-driven, self-service IT. Successful implementations hinge on the ability to efficiently deploy and manage cloud services at enterprise scale. Having a complete cloud management solution integrated with an enterprise-class technology stack is a fundamental requirement for IT. Oracle Enterprise Manager 12c Release 4 meets that requirement by helping businesses become more agile and responsive, while reducing cost, complexity, and risk. News Facts Oracle Enterprise Manager 12c Release 4, available today, lets organizations rapidly adopt Oracle-based, enterprise-scale private clouds. New capabilities provide advanced technology stack management, secure database administration, and enterprise service governance, enabling Oracle customers and partners to maximize database and application performance and drive innovation using self-service IT platforms. The enhancements have been driven by customers and the growing Oracle Enterprise Manager Ecosystem, comprised of more than 750 Oracle PartnerNetwork (OPN) Specialized partners. Oracle and its partners and customers have built over 140 plug-ins and connectors for Oracle Enterprise Manager. Watch the video highlights. Automation for Broader Cloud Services Oracle Enterprise Manager 12c Release 4 allows for a rapid enterprise-wide adoption of database, middleware and infrastructure services in the private cloud, driven by an enhanced API-enabled service catalog. The release features “push button” style provisioning of complete environments such as SOA and Oracle Active Data Guard, and fast data cloning that enables rapid deployment and testing of enterprise applications. Out-of-the-box capabilities to detect data and configuration vulnerabilities provide enhanced cloud service governance along with greater operational control through a flexible and extensible showback mechanism. Enhanced Database Management A new performance warehouse enables predictive database diagnostics and trend analysis and helps identify database problems before they occur. New enterprise data-governance capabilities enhance security by helping systematically discover and protect sensitive data. Step-by-step orchestration of upgrades with the ability to rollback changes enables faster adoption of Oracle Database 12c. Expanded Fusion Middleware Management A new consolidated view of Oracle Fusion Middleware 12c deployments with a guided management capability lets administrators apply best management practices to diverse middleware environments and identify performance issues quickly. A Java VM Diagnostics as a Service feature allows governed access to diagnostics data for IT workers across multiple disciplines for accelerated DevOps resolutions of defects and performance optimization. New automated provisioning for SOA lets middleware administrators perform mass SOA provisioning with ease. Superior Enterprise-Grade Management Private roles and preferred credentials have been added to Oracle Enterprise Manager to provide additional fine-grained security for organizations with complex access control requirements. A new security console provides a single point of control for managing the security of Oracle Enterprise Manager environments. Support for the latest industry standard SNMP v3 protocol, including encryption, enables more secure heterogeneous management. “Smart monitoring” adapts to observed environmental changes and adds self-management capabilities to help Oracle Enterprise Manager run at peak performance, while demanding less IT supervision. Supporting Quotes “Lawrence Livermore National Laboratory has a strong tradition of technology breakthroughs and leadership. As a member of Oracle’s Customer Advisory Board for Oracle Enterprise Manager, we have consistently provided feedback and guidance in the areas of enterprise-scale cloud, self-diagnosability, and secure administration for the product,” said Tim Frazier, CIO, NIF and Photon Sciences, Lawrence Livermore National Laboratory. “We intend to take advantage of the Release 4 features that support enterprise-scale availability and fine-grained security capabilities for private cloud deployments.” “IDC's most recent CloudTrack survey shows that most enterprises plan to adopt hybrid cloud architectures over the next three years,” said Mary Johnston Turner, Research Vice President, Enterprise System Management Software, IDC. “These organizations plan to deploy a wide range of workloads into cloud environments including mission critical database and middleware services that require high levels of fault tolerance and disaster recovery. Such capabilities were traditionally custom configured for each application but cloud offers the possibility to incorporate such properties within the service definition, enabling organizations to adopt cloud without compromise. With the latest release of Oracle Enterprise Manager 12c, Oracle is providing customers with an out-of-the-box experience for delivering highly-resilient cloud services for databases and applications.” “Since its inception, Oracle has been leading the way in innovative, scalable and high performance solutions for the enterprise. With this release of Oracle Enterprise Manager, we are extending this leadership by providing enterprise-scale capabilities for planning, delivering, and managing private clouds. We call this ‘zero-to-cloud – accelerated.’ These enhancements help our customers to expedite their adoption of cloud computing and prepares them for the next generation of self-service IT,” said Prakash Ramamurthy, senior vice president of Systems and Cloud Management at Oracle. Supporting Resources Oracle Enterprise Manager 12c Video: Cerner Delivers High Performance Private Cloud Video: BIAS Achieves Outstanding Results with Private Cloud Press Release Stay Connected: Twitter | Facebook | YouTube | Linkedin | Newsletter Download the Oracle Enterprise Manager 12c Mobile app

    Read the article

  • 13.10 cannot login to Ubuntu default desktop environment - must use GNOME Flashback or Cinnamon

    - by Scott Stensland
    On boot at the password prompt - after I enter my password I get some error popup which disappears too fast to see then it reverts back to same password login Greeter screen. Same screen has icons where I can choose : Select desktop environment Cinnamon GNOME Flashback Ubuntu I really want to login to the normal ubuntu 13.10 Unity using above Ubuntu, however I can successfully login using either : Cinnamon or GNOME. Suggestions ? I have researched around and no help after removing file ~/.Xauthority Also I see this : cat .xsession-errors Script for cjkv started at run_im. Script for default started at run_im. init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd main process ended, respawning init: at-spi2-registryd respawning too fast, stopped

    Read the article

  • General input/output error on OpenOffice 3.2

    - by Scott
    I have been working on a research paper in OpenOffice 3.2 Word Processor and I had a slide show OpenOffice 3.2 Presentation. I saved both frequently and they were not very big (no more then 5 pages of text or a few slides). A few days after I last edited and saved them, I tried to open the slide show but I received window saying: General Error. General input/output error When I tried opening the paper, it asked for ASCII Filter Options (font, character, language, and paragraph break). When I set the normal settings, a single blank document opened with nothing on it. I looked at both of the file's properties and the size was 0 or 1.5 KB, and the volume was unknown. I recently installed some updates for Ubuntu 10.10 and everything else in my computer is working normally including other documents and slide shows. Is this a fixable crash?

    Read the article

  • How to prevent Google Website Optimizer from making Google Analytics spike Direct Traffic and lower Bounce Rate?

    - by Scott
    I am using Google Website Optimizer (GWO) and Google Analytics. Whenever a person (Google Website Optimizer) does a javascript redirect, Google Analytics will change the referrer. When the referrer changes, the traffic source becomes yourself and is changed to Direct Traffic. For Example: A visitor goes to google: searches for my great service. Clicks the link that goes to website page: /home/ At this point, Google Analytics tracks the referrer as Google. However, /home/ has a GWO javacript redirect to a battery of A/B tests. /home-1/ or /home-2/ or /home-3/ When the redirect from /home/ occurs to /home-1/, google analytics on the /home-1/ page now thinks the referrer is yourself and converts the referrer to Direct Traffic since the Direct Traffic bucket is the unknown. I'm really surprised that GWO and GA do this when they both come from google. Now, How does one fix this to prevent the overwrite of the referrer using GWO?

    Read the article

  • Announcing: Oracle Enterprise Manager 12c Delivers Advanced Self-Service Automation for Oracle Database 12c Multitenant

    - by Scott McNeil
    New Self-Service Driven Provisioning of Pluggable Databases Today Oracle announced new capabilities that support managing the full lifecycle of pluggable database as a service in Oracle Enterprise Manager 12c Release 3 (12.1.0.3). This latest release builds on the existing capabilities to provide advanced automation for deploying database as a service using Oracle Database 12c Multitenant option. It takes it one step further by offering pluggable database as a service through Oracle Enterprise Manager 12c self-service portal providing customers with fast provisioning of database cloud services with minimal time and effort. This is a significant addition to Oracle Enterprise Manager 12c’s existing portfolio of cloud services that includes infrastructure as a service, database as a service, testing as a service, and Java platform as a service. The solution provides a self-service mechanism to provision pluggable databases allowing users to request and access database(s) on-demand. The self-service operations are also enabled through REST APIs allowing customers to integrate with third-party automation systems or their custom enterprise portals. Benefits Self-service provisioning allows rapid access to pluggable database as a service for hosting or certifying applications on Oracle Database 12c Self-service driven migration to pluggable database as a service in order to migrate a pre-Oracle Database 12c database to a pluggable database as a service model and test the consolidation strategy Single service catalog for all approved pluggable database as a service configurations which helps customers achieve standardization while catering to all applications and users in the enterprise Resource guarantee via database resource manager (and IORM on Oracle Exadata) that enables deployment of mixed workloads in a shared environment Quota, role based access, and policy based management that enforces governance and reduces administrative overhead Chargeback or showback which improves metering and accountability for services consumed by each pluggable database Comprehensive REST APIs that support integration with ticketing or change management systems, and or with other self-service portals Minimal administrative and maintenance overhead through self-managing automation that allows for intelligent placement of pluggable databases To understand how pluggable database as a service works, watch this quick demo: Stay Connected: Twitter | Facebook | YouTube | Linkedin | Newsletter Download the Oracle Enterprise Manager Cloud Control12c Mobile app

    Read the article

  • Visual Studio 2010 and Target Framework Version

    - by Scott Dorman
    Almost two years ago, I wrote about a Visual Studio macro that allows you to change the Target Framework version of all projects in a solution. If you don’t know, the Target Framework version is what tells the compiler which version of the .NET Framework to compile against (more information is available here) and can be set to one of the following values: .NET Framework 2.0 .NET Framework 3.0 .NET Framework 3.5 .NET Framework 3.5 Client Profile .NET Framework 4.0 .NET Framework 4.0 Client Profile This can be easily accomplished by editing the project properties: The problem with this approach is that if you need to change a lot of projects at one time it becomes rather unwieldy. One possible solution is to edit the project files by hand in a text editor and change the <TargetFrameworkVersion /> and <TargetFrameworkProfile /> properties to the correct values. For example, for the .NET Framework 4.0 Client Profile, these values would be: <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkProfile>Client</TargetFrameworkProfile> Again, this is not only time consuming but can also be error-prone. The better solution is to automate this through the use of a Visual Studio macro. Since I had already created a macro to do this for Visual Studio 2008, I updated that macro to work with Visual Studio 2010 and .NET 4.0. It prompts you for the target framework version you want to set for all of the projects and then loops through each project in the solution and makes the change. If you select one of the Framework versions that support a Client Profile, it will ask if you want to use the Client Profile or the Full Profile. It is smart enough to skip project types that don’t support this property and projects that are already at the correct version. This version also incorporates the changes suggested by George (in the comments). The macro is available on my SkyDrive account. Download it to your <UserProfile>\Documents\Visual Studio 2010\Projects\VSMacros80\MyMacros folder, open the Visual Studio Macro IDE (Alt-F11) and add it as an existing item to the “MyMacros” project. I make no guarantees or warranties on this macro. I have tested it on several solutions and projects and everything seems to work and not cause any problems, but, as always, use with caution. Since it is a macro, you have the full source code available to investigate and see what it’s actually doing. If you find any bugs or make any useful changes, please let me know and I’ll update the macro. Technorati Tags: Macros,Visual Studio

    Read the article

  • Highly recommended: "5 Things SQL Server does different from what many developers expect" by Nico Ja

    A couple of weeks ago, the Belgian Techdays were held in Antwerp. Together with Scott Hillier I presented the SharePoint pre-conference sessions (watch them online over here, search for pre-conference or SharePoint). Even though Belgium is not a very big country, the Microsoft team managed to get some high profile speakers like Anders Hejlsberg and Scott Hanselman. But if you have like 60 minutes to spare there is one session that I'd really recommend to check out, not related to SharePoint, but...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Developing professionally for iOS, Android and web - an insight

    - by Scott Roberts
    This is not really a question on how to develop all three, I know various cross platform ways and so on. But I more want to know from developer standpoint how hard it is to basically develop iOS, Android and web apps? I am currently in my first job as a mobile/web developer. I have already developed my first iPhone/iPad app and now I have to develop the app for android because the web version I tried just didn't perform as well as needed and web databases just did not seem to make the cut. But I am not sure it's possible to be good at developing all 3 in terms of remembering all the api's etc. I wouldn't say I have an issue with the programming languages just how to use the api's for the various platforms. Also, all the other languages I look at, in my spare time, just feel like I am spreading myself to thin. Is it feasible for one person to be developing ios, android and web apps? Should I think about reducing it to iOS and web based apps? I develop everything by myself, so I have no one to discuss what the best solutions are for everything and I am just trying to workout as I go along. So any cross platform developers out there? Do companies have different teams for different platforms? Any insight would just help me get my head together. Hopefully this question makes sense.

    Read the article

  • Multiple site URLs now showing up in SERPs

    - by Scott Helme
    Recently when you search for me on Google several URLs from my blog have started showing up, instead of just the main URL. 1) https://scotthelme.co.uk/ 2) https://scotthelme.co.uk/category/wifi-pineapple-2/? 3) https://scotthelme.co.uk/wifi-pineapple-karma-sslstrip/ Is there a reason this starts happening? I have contemplated doing something to remove them but is it better to occupy the top 3 spots instead of just the top spot? Should I just leave them there?

    Read the article

  • St. Louis Day of .NET 2010

    - by Scott Spradlin
    Register now at http://www.stlouisdayofdotnet.com/registration.aspx The Date This year's conference will be held on Friday and Saturday, August 20-21, 2010, at the Ameristar Conference Center in St. Charles, Missouri.  Sessions will begin at 8:00 a.m. and run through 4:30 p.m. on both days.  Registration and sign-in will open at 7:00 a.m. on Friday morning, and will run throughout the event. The Venue Based on the almost unanimous feedback from last year's event, we are very excited to bring our conference back to the Ameristar Conference Center. The Ameristar has worked with us to offer a great rate on their large suites, should you be traveling from out-of-town -- or are just interested in a night away from home.  Attendees can book a suite at a discounted rate of only $139/night, which is a substantial discount from their standard rates.  We encourage you take the opportunity to hang around, spend the night, and enjoy the social events and networking opportunities that we have planned. If you are interested in taking advantage of the discounted hotel rate, you can reserve your room online at Ameristar's Online Registration Site, using the special offer code: GDOTH10.  You can also call the hotel's reservation number at (636) 940-4301 and let them know you are attending the St. Louis Day of .NET 2010 to receive your discounted rates. The Content All attendees will have access to over 80 technical sessions by many great regional and national technology experts, covering a wide range of .NET development topics.  In addition to refreshments throughout the event, all attendees will be provided with breakfast and lunch on both days of the conference. You will find sessions on many of the most current .NET development topics including: Visual Studio .NET 2010 Silverlight 4.0 Windows 7 Series Phone Development ASP.NET MVC DotNetNuke SharePoint 2010 Architecture Windows Presentation Foundation (WPF) And much, much more... This year's event will also include many informal "Open Space" sessions where all attendees with similar interests can discuss current trends or issues they are facing in today's real-world development environments. Finally, all attendees are invited to a social networking event at the HOME Nightclub at the Ameristar, which will be held on the Friday evening of the conference. The Cost The cost of this year's conference is $200 per attendee.  However, for a limited time we are offering a $75 discount for early registrants. To take advantage of this discounted rate, you must register on our site prior to July 10, 2010.  We accept Visa, MasterCard, and American Express.  In addition, this year we allow for a single user of our site to easily register multiple attendees at once. To register, please visit the official St. Louis Day of .NET site at www.stldodn.com, and click on the "Registration" tab. For More Information And for the most up-to-the-minute information on the event, please follow us online: Twitter:  @stldodn Facebook: http://www.facebook.com/stldodn We strongly encourage you to share this email, as well as the attached flier, with your peers and colleagues, and anyone else you think might be interested in this exciting event. If you have any questions regarding registration, you can email us at [email protected] and we will be happy to address them. Sponsors We are extremely thankful to the many great sponsors who are partnering with us this year to help make the St. Louis Day of .NET 2010 a huge success. (There are still sponsorship opportunities available. For complete information, visit the sponsor page on the web site.)

    Read the article

  • Backtick (Grave accent) button sticking

    - by Scott Lemmon
    I have Ubuntu 12.04 running in a Virtual Box virtual machine, on my Windows 7 32bit system. It has been working great, except that the backtick/tilde button sticks(not physically). When I hit the backtick button it keeps repeating until another input button is pressed. So if I press the spacebar while the backtick is repeating, it stops, but if I press the shift while it is repeating, the backtick turns into a tilde, and the tilde keeps repeating until I release the shift key (at which point it's a backtick again and keeps repeating). This sticking behavior only happens with the backtick key, and only in my Ubuntu virtualization, never in windows. I've tried both my laptop's keyboard and an external USB keyboard and the problem happens on both. Both keyboards I've tried are Japanese 106/109 key layout, but I'm using them with a English(US) 101 profile. When I refer to the backtick key above, I mean where it is on the US layout. If I use the Japanese profile, the key in that location (the US backtick location) still sticks, but its no longer mapped as the backtick key. Any thoughts as to what might be causing this and possible solutions? I've searched a lot, but have not found any help so far. Any help is greatly appreciated.

    Read the article

  • CLR 4.0: Corrupted State Exceptions

    - by Scott Dorman
    Corrupted state exceptions are designed to help you have fewer bugs in your code by making it harder to make common mistakes around exception handling. A very common pattern is code like this: public void FileSave(String name) { try { FileStream fs = new FileStream(name, FileMode.Create); } catch (Exception e) { MessageBox.Show("File Open Error"); throw new Exception(IOException); } The standard recommendation is not to catch System.Exception but rather catch the more specific exceptions (in this case, IOException). While this is a somewhat contrived example, what would happen if Exception were really an AccessViolationException or some other exception indicating that the process state has been corrupted? What you really want to do is get out fast before persistent data is corrupted or more work is lost. To help solve this problem and minimize the chance that you will catch exceptions like this, CLR 4.0 introduces Corrupted State Exceptions, which cannot be caught by normal catch statements. There are still places where you do want to catch these types of exceptions, particularly in your application’s “main” function or when you are loading add-ins.  There are also rare circumstances when you know code that throws an exception isn’t dangerous, such as when calling native code. In order to support these scenarios, a new HandleProcessCorruptedStateExceptions attribute has been added. This attribute is added to the function that catches these exceptions. There is also a process wide compatibility switch named legacyCorruptedStateExceptionsPolicy which when set to true will cause the code to operate under the older exception handling behavior. Technorati Tags: CLR 4.0, .NET 4.0, Exception Handling, Corrupted State Exceptions

    Read the article

  • Microsoft StyleCop is now Open Source

    - by Scott Dorman
    I have previously talked about Microsoft StyleCop. For those that might not know about it, StyleCop is a source analysis tool (different from the static analysis that FxCop performs) that analyzes the source code directly. As a result, it focuses on more design (or style) issues such as layout, readability and documentation. In an interesting move (and one that I am happy to see), Microsoft has decided to make StyleCop an open source project (under the MS-PL license) available on CodePlex. (The project site isn’t up  yet, but should be in the next few weeks.) This will give the development community the opportunity to help contribute to the project, expanding support to other languages (currently it only supports C#), adding features, and fixing bugs. Shortly after the CodePlex site is up, StyleCop 4.4 will be released which includes support for C# 4.0 as well as a large number of bug fixes and other improvements. Technorati Tags: Code Style and Standard,StyleCop

    Read the article

  • The Dispose Pattern (and FxCop warnings)

    - by Scott Dorman
    [This is actually a response to Bill’s blog post, but since it isn’t possible to leave this as a comment on his blog it’s a post here.] There are many different ways to implement the Dispose pattern correctly. Some are (in my opinion) better than others. In Bill’s blog post he presents a particular pattern, which is an excerpt from his book (Effective C#). The issue centers around the fact that a reader took the code sample presented in the book and ran FxCop (Code Analysis) on it, which generated a warning: “Ensure that base.Dispose() is always called.” The “lesson learned” that Bill presents is that “tools are there to help us, not control us.” While I completely agree with the belief that tools are there to help us, I think it’s important to understand why FxCop is raising this particular warning. The code presented in Bill’s book looks like: // Have its own disposed flag.private bool disposed = false;protected override void Dispose(bool isDisposing){ // Don't dispose more than once. if (disposed) return; if (isDisposing) { // TODO: free managed resources here. } // TODO: free unmanaged resources here. // Let the base class free its resources. // Base class is responsible for calling // GC.SuppressFinalize( ) base.Dispose(isDisposing); // Set derived class disposed flag: disposed = true;} This code does follow all of the guidelines for implementing the Dispose pattern. In this case, it’s presumably part of a larger example showing how to implement the pattern as part of a base class. The reason FxCop is warning you about this code is the first if statement in the Dispose method, which will cause the method to exit if disposed is true. The problem here is that there is the possibility that if the disposed flag is true, the call to base.Dispose() will never be executed. As Bill points out, it is possible for some other code elsewhere in the class to set this flag. He states that this is an “unlikely occurrence.” While that is probably true, it can be a potentially dangerous assumption to make and is one that can be easily corrected. By changing the code slightly you can remove this assumption and correct the FxCop violation. private bool disposed = false;protected override void Dispose(bool disposing){ if (!disposed) { if (disposing) { // Dispose managed resources. } // Dispose unmanaged resources. disposed = true; } base.Dispose(disposing);} Using this implementation allows the call to base.Dispose() to always occur, which ensures that the the disposal chain is always properly followed. Technorati Tags: .NET,C#,Dispose Pattern

    Read the article

  • ArchBeat Link-o-Rama for 2012-03-30

    - by Bob Rhubart
    The One Skill All Leaders Should Work On | Scott Edinger blogs.hbr.org Assertiveness, according to HBR blogger Scott Edinger, has the "power to magnify so many other leadership strengths." When Your Influence Is Ineffective | Chris Musselwhite and Tammie Plouffe blogs.hbr.org "Influence becomes ineffective when individuals become so focused on the desired outcome that they fail to fully consider the situation," say Chris Musselwhite and Tammie Plouffe. BPM in Retail Industry | Sanjeev Sharma blogs.oracle.com Sanjeev Sharma shares links to a pair of blog posts that address common BPM use-cases in the Retail industry. Oracle VM: What if you have just 1 HDD system | Yury Velikanov www.pythian.com "To start playing with Oracle VM v3 you need to configure some storage to be used for new VM hosts," says Yury Velikanov. He shows you how in this post. Thought for the Day "Elegance is not a dispensable luxury but a factor that decides between success and failure." — Edsger Dijkstra

    Read the article

  • Fun With the Chrome JavaScript Console and the Pluralsight Website

    - by Steve Michelotti
    Originally posted on: http://geekswithblogs.net/michelotti/archive/2013/07/24/fun-with-the-chrome-javascript-console-and-the-pluralsight-website.aspxI’m currently working on my third course for Pluralsight. Everyone already knows that Scott Allen is a “dominating force” for Pluralsight but I was curious how many courses other authors have published as well. The Pluralsight Authors page - http://pluralsight.com/training/Authors – shows all 146 authors and you can click on any author’s page to see how many (and which) courses they have authored. The problem is: I don’t want to have to click into 146 pages to get a count for each author. With this in mind, I figured I could write a little JavaScript using the Chrome JavaScript console to do some “detective work.” My first step was to figure out how the HTML was structured on this page so I could do some screen-scraping. Right-click the first author - “Inspect Element”. I can see there is a primary <div> with a class of “main” which contains all the authors. Each author is in an <h3> with an <a> tag containing their name and link to their page:     This web page already has jQuery loaded so I can use $ directly from the console. This allows me to just use jQuery to inspect items on the current page. Notice this is a multi-line command. In order to use multiple lines in the console you have to press SHIFT-ENTER to go to the next line:     Now I can see I’m extracting data just fine. At this point I want to follow each URL. Then I want to screen-scrape this next page to see how many courses each author has done. Let’s take a look at the author detail page:       I can see we have a table (with a css class of “course”) that contains rows for each course authored. This means I can get the number of courses pretty easily like this:     Now I can put this all together. Back on the authors page, I want to follow each URL, extract the returned HTML, and grab the count. In the code below, I simply use the jQuery $.get() method to get the author detail page and the “data” variable that is in the callback contains the HTML. A nice feature of jQuery is that I can simply put this HTML string inside of $() and I can use jQuery selectors directly on it in conjunction with the find() method:     Now I’m getting somewhere. I have every Pluralsight author and how many courses each one has authored. But that’s not quite what I’m after – what I want to see are the authors that have the MOST courses in the library. What I’d like to do is to put all of the data in an array and then sort that array descending by number of courses. I can add an item to the array after each author detail page is returned but the catch here is that I can’t perform the sort operation until ALL of the author detail pages have executed. The jQuery $.get() method is naturally an async method so I essentially have 146 async calls and I don’t want to perform my sort action until ALL have completed (side note: don’t run this script too many times or the Pluralsight servers might think your an evil hacker attempting a DoS attack and deny you). My C# brain wants to use a WaitHandle WaitAll() method here but this is JavaScript. I was able to do this by using the jQuery Deferred() object. I create a new deferred object for each request and push it onto a deferred array. After each request is complete, I signal completion by calling the resolve() method. Finally, I use a $.when.apply() method to execute my descending sort operation once all requests are complete. Here is my complete console command: 1: var authorList = [], 2: defList = []; 3: $(".main h3 a").each(function() { 4: var def = $.Deferred(); 5: defList.push(def); 6: var authorName = $(this).text(); 7: var authorUrl = $(this).attr('href'); 8: $.get(authorUrl, function(data) { 9: var courseCount = $(data).find("table.course tbody tr").length; 10: authorList.push({ name: authorName, numberOfCourses: courseCount }); 11: def.resolve(); 12: }); 13: }); 14: $.when.apply($, defList).then(function() { 15: console.log("*Everything* is complete"); 16: var sortedList = authorList.sort(function(obj1, obj2) { 17: return obj2.numberOfCourses - obj1.numberOfCourses; 18: }); 19: for (var i = 0; i < sortedList.length; i++) { 20: console.log(authorList[i]); 21: } 22: });   And here are the results:     WOW! John Sonmez has 44 courses!! And Matt Milner has 29! I guess Scott Allen isn’t the only “dominating force”. I would have assumed Scott Allen was #1 but he comes in as #3 in total course count (of course Scott has 11 courses in the Top 50, and 14 in the Top 100 which is incredible!). Given that I’m in the middle of producing only my third course, I better get to work!

    Read the article

  • Visual Studio 2010 Short Cut Links!

    - by Dave Noderer
    This week Scott Cate came to South Florida and gave a great talk on his Visual Studio shortcuts and how he uses them. You can find a collection of short video’s he has done at: http://scottcate.com/tricks/ Also you might want to check out Sara Ford’s blog: http://blogs.msdn.com/saraford/default.aspx, she started doing a tip a day but has many more now. Scott covers many of these in the videos. And.. as with past releases, the languages team has provided PDF’s with a lot of keyboard shortcuts, this time for VB, C#, F# and C++. You can find downloads for all of these at the top of the FlaDotNet.com page and are included below: VB: http://www.fladotnet.com/downloads/VS2010VB.pdf C#: http://www.fladotnet.com/downloads/VS2010CSharp.pdf F#: http://www.fladotnet.com/downloads/VS2010FSharp.pdf C++: http://www.fladotnet.com/downloads/VS2010CPP.pdf Happy Keyboarding!!

    Read the article

  • Removing hard-coded values and defensive design vs YAGNI

    - by Ben Scott
    First a bit of background. I'm coding a lookup from Age - Rate. There are 7 age brackets so the lookup table is 3 columns (From|To|Rate) with 7 rows. The values rarely change - they are legislated rates (first and third columns) that have stayed the same for 3 years. I figured that the easiest way to store this table without hard-coding it is in the database in a global configuration table, as a single text value containing a CSV (so "65,69,0.05,70,74,0.06" is how the 65-69 and 70-74 tiers would be stored). Relatively easy to parse then use. Then I realised that to implement this I would have to create a new table, a repository to wrap around it, data layer tests for the repo, unit tests around the code that unflattens the CSV into the table, and tests around the lookup itself. The only benefit of all this work is avoiding hard-coding the lookup table. When talking to the users (who currently use the lookup table directly - by looking at a hard copy) the opinion is pretty much that "the rates never change." Obviously that isn't actually correct - the rates were only created three years ago and in the past things that "never change" have had a habit of changing - so for me to defensively program this I definitely shouldn't store the lookup table in the application. Except when I think YAGNI. The feature I am implementing doesn't specify that the rates will change. If the rates do change, they will still change so rarely that maintenance isn't even a consideration, and the feature isn't actually critical enough that anything would be affected if there was a delay between the rate change and the updated application. I've pretty much decided that nothing of value will be lost if I hard-code the lookup, and I'm not too concerned about my approach to this particular feature. My question is, as a professional have I properly justified that decision? Hard-coding values is bad design, but going to the trouble of removing the values from the application seems to violate the YAGNI principle. EDIT To clarify the question, I'm not concerned about the actual implementation. I'm concerned that I can either do a quick, bad thing, and justify it by saying YAGNI, or I can take a more defensive, high-effort approach, that even in the best case ultimately has low benefits. As a professional programmer does my decision to implement a design that I know is flawed simply come down to a cost/benefit analysis?

    Read the article

  • IE6 Support - When to drop it? [closed]

    - by Scott Brown
    Possible Duplicate: Should I bother supporting IE6? I'm thinking about IE6 support and when to give up on it. Do you have a percentage of total visitors figure in mind for when to drop support? Would you let a trend develop past this figure or are you just going take the first opportunity? I've seen a 44% drop in IE6 visitors in the past 12 months from 23%(ish) of visitors down to 13%(ish). Even if it was 5% it still seems too early to drop support to me (it's still 1 in every 20 users). What are people's thoughts on this?

    Read the article

  • Answers to Your Common Oracle Database Lifecycle Management Questions

    - by Scott McNeil
    We recently ran a live webcast on Strategies for Managing Oracle Database's Lifecycle. There were tons of questions from our audience that we simply could not get to during the hour long presentation. Below are some of those questions along with their answers. Enjoy! Question: In the webcast the presenter talked about “gold” configuration standards, for those who want to use this technique, could you recommend a best practice to consider or follow? How do I get started? Answer:Gold configuration standardization is a quick and easy way to improve availability through consistency. Start by choosing a reference database and saving the configuration to the Oracle Enterprise Manager repository using the Save Configuration feature. Next create a comparison template using the Oracle provided template as a starting point and modify the ignored properties to eliminate expected differences in your environment. Finally create a comparison specification using the comparison template you created plus your saved gold configuration and schedule it to run on a regular basis. Don’t forget to fill in the email addresses of those you want to notify upon drift detection. Watch the database configuration management demo to learn more. Question: Can Oracle Lifecycle Management Pack for Database help with patching an Oracle Real Application Cluster (RAC) environment? Answer: Yes, Oracle Enterprise Manager supports both parallel and rolling patch application of Oracle Real Application Clusters. The use of rolling patching is recommended as there is no downtime involved. For more details watch this demo. Question: What are some of the things administrators can do to control configuration drift? Why is it important? Answer:Configuration drift is one of the main causes of instability and downtime of applications. Oracle Enterprise Manager makes it easy to manage and control drift using scheduled configuration comparisons combined with comparison templates. Question: Does Oracle Enterprise Manager 12c Release 2 offer an incremental update feature for "gold" images? For instance, if the source binary has a higher PSU level, what is the best approach to update the existing "gold" image in the software library? Do you have to create a new image or can you just update the original one? Answer:Provisioning Profiles (Gold images) can contain the installation files and database configuration templates. Although it is possible to make some changes to the profile after creation (mainly to configuration), it is normally recommended to simply create a new profile after applying a patch to your reference database. Question: The webcast talked about enforcing in-house standards, does Oracle Enterprise Manager 12c offer verification of your databases and systems to those standards? For example, the initial "gold" image has been massively deployed over time, and there may be some changes to it. How can you do regular checks from Enterprise Manager to ensure the in-house standards are being enforced? Answer:There are really two methods to validate conformity to standards. The first method is to use gold standards which you compare other databases to report unwanted differences. This method uses a new comparison template technology which allows users to ignore known differences (i.e. SID, Start time, etc) which results in a report only showing important or non-conformant differences. This method is quick to setup and configure and recommended for those who want to get started validating compliance quickly. The second method leverages the new compliance framework which allows the creation of specific and robust validations. These compliance rules are grouped into standards which can be assigned to databases quickly and easily. Compliance rules allow for targeted and more sophisticated validation beyond the basic equals operation available in the comparison method. The compliance framework can be used to implement just about any internal or industry standard. The compliance results will track current and historic compliance scores at the overall and individual database targets. When the issue is resolved, the score is automatically affected. Compliance framework is the recommended long term solution for validating compliance using Oracle Enterprise Manager 12c. Check out this demo on database compliance to learn more. Question: If you are using the integration between Oracle Enterprise Manager and My Oracle Support in an "offline" mode, how do you know if you have the latest My Oracle Support metadata? Answer:In Oracle Enterprise Manager 12c Release 2, you now only need to download one zip file containing all of the metadata xmls files. There is no indication that the metadata has changed but you could run a checksum on the file and compare it to the previously downloaded version to see if it has changed. Question: What happens if a patch fails while administrators are applying it to a database or system? Answer:A large portion of Oracle Enterprise Manager's patch automation is the pre-requisite checks that happen to ensure the highest level of confidence the patch will successfully apply. It is recommended you test the patch in a non-production environment and save the patch plan as a template once successful so you can create new plans using the saved template. If you are using the recommended ‘out of place’ patching methodology, there is no urgency because the database is still running as the cloned Oracle home is being patched. Users can address the issue and restart the patch procedure at the point it left off. If you are using 'in place' method, you can address the issue and continue where the procedure left off. Question: Can Oracle Enterprise Manager 12c R2 compare configurations between more than one target at the same time? Answer:Oracle Enterprise Manager 12c can compare any number of target configurations at one time. This is the basis of many important use cases including Configuration Drift Management. These comparisons can also be scheduled on a regular basis and emails notification sent should any differences appear. To learn more about configuration search and compare watch this demo. Question: How is data comparison done since changes are taking place in a live production system? Answer:There are many things to keep in mind when using the data comparison feature (as part of the Change Management ability to compare table data). It was primarily intended to be used for maintaining consistency of important but relatively static data. For example, application seed data and application setup configuration. This data does not change often but is critical when testing an application to ensure results are consistent with production. It is not recommended to use data comparison on highly dynamic data like transactional tables or very large tables. Question: Which versions of Oracle Database can be monitored through Oracle Enterprise Manager 12c? Answer:Oracle Database versions: 9.2.0.8, 10.1.0.5, 10.2.0.4, 10.2.0.5, 11.1.0.7, 11.2.0.1, 11.2.0.2, 11.2.0.3. Watch the On-Demand Webcast Stay Connected: Twitter | Facebook | YouTube | Linkedin | NewsletterDownload the Oracle Enterprise Manager Cloud Control12c Mobile app

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >