9.09.08
9.11.08
This is somewhat “not-easy-as-it-seems” array question. because there are a lot of things which we would not consider at first. Only After a thorough testing we can get the ultimate solution.
Return the "centered" average of an array of ints, which well say is the mean average of the values, except not counting the largest and smallest values in the array. Use int division to produce the final average. You may assume that the array is length 3 or more.
centeredAverage({1, 2, 3, 4, 100}) → 3
centeredAverage({1, 1, 5, 5, 10, 8, 7}) → 5
centeredAverage({-10, -4, -2, -4, -2, 0}) → –3
Solution
public int centeredAverage(int[] nums) {if(nums.length <3 ) return 0;int len=nums.length;int max=Integer.MIN_VALUE ;int min=Integer.MAX_VALUE ;int sum=0 ;int mini=0; // subscript of max ,minint maxi=0;// get max,min values and their subscriptsfor(int i=0;i<len;i++){if(nums[i]>max){max=nums[i];maxi=i;}if(nums[i]<min){min=nums[i];mini=i;}}// end for// compute the averagefor(int j=0 ; j<len; j++){if(maxi==mini) {// all the elements are samesum=nums[0];break;}if(j != maxi && j != mini)sum+=nums[j];}// end forreturn sum/(len-2);}
"Postal Vision 2020/2.0 is as much a movement as it is a Conference. It is a forum for an open and honest dialog to better understand the future of postal communications and shipping, and what this means to those who regulate, supply and use mail. It’s about sharing ideas and knowledge with the hope of sparking innovation and the creation of new successful business models. It’s about asking each other lots of difficult questions for which there may be many answers to consider before finding those that serve the long term health of the industry and any particular enterprise."USPS is broken at so many levels; they have short term as well long term issues to deal with and it is likely to get uglier before it may get better. Channeling Geoffrey Moore, USPS needs to retain their core and and redefine the context. Massive fleet of trucks, logistics, and outlets in all foreseeable locations is their core strength. Postal mail and other related services is their context where they are simply unable to compete because of shrinking addressable market (due to digital communication) and poor service design that applies the legacy mindset to solve todays and tomorrows problems.
If you are a SOA enabled enterprise application vendor trying to sell SOA to your customers you quickly realize that very few customers are interested in buying SOA by itself. Many customers believe SOA investment to be a non-differential one and they compare that with compliance – you have to have it and there is no direct ROI. A vendor can offer ROI if the vendor has the right integration and interoperability strategy. For customers it is all about lowering the TCO of the overall IT investment and not about looking at TCO of individual applications. SOA enabled applications with standardized, flexible, and interoperable interfaces work towards the lower TCO and provide customers sustainable competitive advantage. Generally speaking customers are not interested in the "integration governance" of the application provider as long as the applications are integrated out-of-the-box and has necessary services to support inbound and outbound integration with customers other software to support customers vision of true enterprise SOA.
It has always been a long debate what is a good integration strategy for SOA enabled products. Organizations debate on whether to use the same service interfaces for inter-application and intra-application integrations. Intra-application integration have major challenges, especially for large organizations. Different stakeholders and owners need to work together to make sure that the applications are integrated out-of-the-box. It sounds obvious but it is not quite easy. In most cases it is a trade off between to be able to "eat your own dog food" by using the published interfaces versus optimizing performance by compromising the abstraction by having a different contract than inter-application integration. There are few hybrid approaches as well that fall between these two alternatives, but it is always a difficult choice. Most of the customers do not pay too much attention to the intra-application strategy, but it is still in the best interest of a vendor to promote, practice, and advocate service-based composition against ad-hoc integration. There are many ways to fine tune the runtime performance if at all this approach results into performance degradation.
(Auto Shutdown – Allows you to set a timer to log off/shutdown/hibernate your computer.)
TweakNow PowerPack is a fully-integrated suite of utilities that let you fine-tune every aspect of your computers operating system and Web browser. The Registry Cleaner module provides you with a safe and simple way to clean Windows Registry. To keep your computer always at top performance, we recommend to clean your registry at least once a month. For Windows tweaking lovers, the suite provides more than 100 hidden Windows settings in the Windows Secret section. Using modules included in this section, you can easily customize your Windows like geeks do. The Virtual Desktop module lets you run as many as four custom-designed desktop configurations simultaneously, allowing you to tailor your computer screen to your mood and your work requirements. Last but not least, the suite also gives you a complete picture of all aspects of your computers hardware, including detailed information about your motherboard, processor, video card, memory, hard disk and network.