Search Results

Search found 2568 results on 103 pages for 'advantage'.

Page 32/103 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • DRY, string, and unit testing

    - by Rodrigue
    I have a recurring question when writing unit tests for code that involves constant string values. Let's take an example of a method/function that does some processing and returns a string containing a pre-defined constant. In python, that would be something like: STRING_TEMPLATE = "/some/constant/string/with/%s/that/needs/interpolation/" def process(some_param): # We do some meaningful work that gives us a value result = _some_meaningful_action() return STRING_TEMPLATE % result If I want to unit test process, one of my tests will check the return value. This is where I wonder what the best solution is. In my unit test, I can: apply DRY and use the already defined constant repeat myself and rewrite the entire string def test_foo_should_return_correct_url(): string_result = process() # Applying DRY and using the already defined constant assert STRING_TEMPLATE % "1234" == string_result # Repeating myself, repeating myself assert "/some/constant/string/with/1234/that/needs/interpolation/" == url The advantage I see in the former is that my test will break if I put the wrong string value in my constant. The inconvenient is that I may be rewriting the same string over and over again across different unit tests.

    Read the article

  • Using XA Transactions in Coherence-based Applications

    - by jpurdy
    While the costs of XA transactions are well known (e.g. increased data contention, higher latency, significant disk I/O for logging, availability challenges, etc.), in many cases they are the most attractive option for coordinating logical transactions across multiple resources. There are a few common approaches when integrating Coherence into applications via the use of an application server's transaction manager: Use of Coherence as a read-only cache, applying transactions to the underlying database (or any system of record) instead of the cache. Use of TransactionMap interface via the included resource adapter. Use of the new ACID transaction framework, introduced in Coherence 3.6.   Each of these may have significant drawbacks for certain workloads. Using Coherence as a read-only cache is the simplest option. In this approach, the application is responsible for managing both the database and the cache (either within the business logic or via application server hooks). This approach also tends to provide limited benefit for many workloads, particularly those workloads that either have queries (given the complexity of maintaining a fully cached data set in Coherence) or are not read-heavy (where the cost of managing the cache may outweigh the benefits of reading from it). All updates are made synchronously to the database, leaving it as both a source of latency as well as a potential bottleneck. This approach also prevents addressing "hot data" problems (when certain objects are updated by many concurrent transactions) since most database servers offer no facilities for explicitly controlling concurrent updates. Finally, this option tends to be a better fit for key-based access (rather than filter-based access such as queries) since this makes it easier to aggressively invalidate cache entries without worrying about when they will be reloaded. The advantage of this approach is that it allows strong data consistency as long as optimistic concurrency control is used to ensure that database updates are applied correctly regardless of whether the cache contains stale (or even dirty) data. Another benefit of this approach is that it avoids the limitations of Coherence's write-through caching implementation. TransactionMap is generally used when Coherence acts as system of record. TransactionMap is not generally compatible with write-through caching, so it will usually be either used to manage a standalone cache or when the cache is backed by a database via write-behind caching. TransactionMap has some restrictions that may limit its utility, the most significant being: The lock-based concurrency model is relatively inefficient and may introduce significant latency and contention. As an example, in a typical configuration, a transaction that updates 20 cache entries will require roughly 40ms just for lock management (assuming all locks are granted immediately, and excluding validation and writing which will require a similar amount of time). This may be partially mitigated by denormalizing (e.g. combining a parent object and its set of child objects into a single cache entry), at the cost of increasing false contention (e.g. transactions will conflict even when updating different child objects). If the client (application server JVM) fails during the commit phase, locks will be released immediately, and the transaction may be partially committed. In practice, this is usually not as bad as it may sound since the commit phase is usually very short (all locks having been previously acquired). Note that this vulnerability does not exist when a single NamedCache is used and all updates are confined to a single partition (generally implying the use of partition affinity). The unconventional TransactionMap API is cumbersome but manageable. Only a few methods are transactional, primarily get(), put() and remove(). The ACID transactions framework (accessed via the Connection class) provides atomicity guarantees by implementing the NamedCache interface, maintaining its own cache data and transaction logs inside a set of private partitioned caches. This feature may be used as either a local transactional resource or as logging XA resource. However, a lack of database integration precludes the use of this functionality for most applications. A side effect of this is that this feature has not seen significant adoption, meaning that any use of this is subject to the usual headaches associated with being an early adopter (greater chance of bugs and greater risk of hitting an unoptimized code path). As a result, for the moment, we generally recommend against using this feature. In summary, it is possible to use Coherence in XA-oriented applications, and several customers are doing this successfully, but it is not a core usage model for the product, so care should be taken before committing to this path. For most applications, the most robust solution is normally to use Coherence as a read-only cache of the underlying data resources, even if this prevents taking advantage of certain product features.

    Read the article

  • APress Deal of the Day 23/Aug/2014 - Pro Windows 8 Development with HTML5 and JavaScript

    - by TATWORTH
    Originally posted on: http://geekswithblogs.net/TATWORTH/archive/2014/08/23/apress-deal-of-the-day-23aug2014---pro-windows-8.aspxToday’s $10 Deal of the Day from APress at http://www.apress.com/9781430244011 is Pro Windows 8 Development with HTML5 and JavaScript. “Apps are at the heart of Windows 8, bringing rich and engaging experiences to both tablet and desktop users. Windows 8 uses the Windows Runtime (WinRT), a complete reimagining of Windows development that supports multiple programming languages and is built on HTML5, CSS and JavaScript. These applications are the future of Windows development and JavaScript is perfect language to take advantage of this exciting and flexible environment.”

    Read the article

  • Ubuntu 12.04 UEFI Partition Boot Fail

    - by John
    I've built a new system, and I want to take full advantage of UEFI and Ubuntu. So I install Ubuntu, and try to boot from it, and my BIOS (Asus EZ Mode / Advanced Mode) simply says "No bootable medium found. Insert Bootable Medium and press any key to try again." So I've reinstalled several times, without any failures, Ubuntu IS installed, and I've tried Ubuntu Boot Repair (link below) and nothing I do seems to work. My Build: Asus f1a75m pro AMD A8 APU Samsung 1TB HDD 8GB G-Skill Ripjaws X (1866) Partitions and Ubuntu Boot Repair here

    Read the article

  • Do you use i-->0 for backward loops?

    - by maaartinus
    Some people write for (int i=N; i-->0; ) doSomething(i); instead of for (int i=N-1; i>=0; --i) doSomething(i); for backward loops. The --> "operator"1 looks very confusing at the first glance, but it's trivial: i-->0 simply parses as (i--)>0, and once you get it, you see it immediately. The main disadvantage is the strange look. The advantage is that you'll get it always right (unlike the more verbose version offering the possibility to forget something, which really happened to me a couple of times). What do you think about using the --> "operator"? 1First time I saw the funny term in a comment to this question today.

    Read the article

  • Move site to new domain divided by language across subdomains

    - by mark
    I managed to find a nice domain for a fairly fledgling site of mine that actually hasn't been parked by scumbag squatters. Given the upcoming move I'm thinking I'd take the opportunity to split the content across subdomains according to language, much like wikipedia for example: current: www.old-domain.com/en/subject # English www.old-domain.com/subjecto # Spanish (default so not locale in url) proposed en.new-domain.com/subject es.new-domain.com/subjecto The advantage of doing this is a fairly competitive keyword such that I may wish to put a copy of my application on a Spanish slice in order to gain a few serp's. Also pure vanity. Google's webmaster tools allows me to move to the new domain and I can add the root domain and the subdomains but forward to only one. I'll 301 from the old domain appropriately but is there anything I should know about webmaster tools in this respect where effectively I'm moving to two addresses? (Feel free to dissuade me from doing this if it's a bad idea in comments.) I've now asked this same question on google's forums.

    Read the article

  • Meet and Greet with IDM Executives at Oracle OpenWorld

    - by Tanu Sood
    Oracle’s Identity Management Team Invites You to Learn How to Secure The New Digital Experience Come see how the Oracle Identity Management platform can position your company to take advantage of the emerging business opportunities. Leverage Social Identities for web authentication Enable customers and employees to interact through their mobile devices Deploy Self Service User Provisioning for quick role changes based on business needs We look forward to seeing you there! Wednesday, October 3rd  3:30-4:30 PM  Meeting 4:30-5:30 PM  Cocktail Reception Four Seasons Hotel Yerba Buena Room 757 Market Street San Francisco, CA 94103 415.633.3000 http://www.fourseasons.com/sanfrancisco/   RSVP Now Copyright © 2012, Oracle and/or its affiliates.  All rights reserved. Contact Us | Legal Notices and Terms of Use | Privacy Statement

    Read the article

  • Visual Studio Load Tests Virtual Users Simulation

    - by Eldar
    Hello, I'm currently working on writing a load testing application that takes advantage of Load Test using Visual Studio 2010. The load test will simulate 20 users on the same machine, and I need some data to be shared in-memory between all simulated users. I was suprised I couldn't find documentation answering the following question: What seperates each virtual user's running context from the other? Does each virtual user runs the tests in its own process? Maybe in its own app domain? Or just on its own thread? I need to know because if each user is running tests in its own process then all the in-memory cache isn't shared and is created for each user instead of one time for all of them, which is bad for me.

    Read the article

  • Concatenating Rows

    Often in database design we store different values in rows to take advantage of a normalized design. However many times we need to combine multiple rows of data into one row for a report of some sort. New author Carl P. Anderson brings us some interesting T-SQL code to accomplish this. Free trial of SQL Backup™“SQL Backup was able to cut down my backup time significantly AND achieved a 90% compression at the same time!” Joe Cheng. Download a free trial now.

    Read the article

  • Just wondering about "Do-It Yourself Apps" on the internet versus apps written by us developers

    - by user657514
    Hi, I have been doing Objective-C programming over the past few weeks, and I have learnt a lot. However, I see that there are other Web-companies offering services to consumers directly from their website that allow consumers to create their apps through a point and click and drag features without any code. Clearly they are more cost effective and fast than having a developer write an app. I was wondering if there are any advantages then of having a developer build an app for someone, other than the obvious advantage that its got a custom look and feel. Could someone please clarify, since Im new and would like to evaluate whether it is worthwhile spending time towards learning a whole new development environment when someone could just use a webservice to make an app for multiple platforms Thanks

    Read the article

  • Can anyone list some real examples of 'HTML5' being used in the wild?

    - by betamax
    I am using HTML5 in the same way everyone seems to be using it these days, meaning: HTML5 tags, Canvas / 3D / javascript and CSS3. I am struggling to find examples of sites that are using these technologies practically and that are not just a demo of something cool someone has managed to do using Canvas or CSS3 transforms or shapes. I am looking for sites that have a nice visual look but also take advantage of things like animation, scrolling and offset à la Silverback or the Canvas to create an interactive and I guess 'Flash-looking' site. These are some examples that I have found: Scrolling http://nikebetterworld.com/index http://benthebodyguard.com/ Animation http://www.elladesign.com/contact.html Other http://www.pirateslovedaisies.com/ I am using HTML5 loosely and I hate to be using it. I would be happy if you listed a really visually appealing Javascript-based site but it didn't have the HTML5 doctype.

    Read the article

  • Why would i need extra IP adresses from my web host?

    - by user4524
    I am moving to a new and cheaper host. My old one raised the prices suddenly by a factor 10. Now what I did not like about the old one, was that each time I set up a new website, I had to set up a new account, with the result that I have to pay for a lot of webspace and a lot of bandwith i don't use. Now I am moving over to a new host, who cheaply offers virtual servers. Now I am a n00b when it comes to server tech. I have two questions about this: 1. Could I install all my webistes on this virtual server, provided it is big enough? 2. They offer the possibility of getting more than one IP address, but it costs more. What would be the advantage of this? Would I be able to suffice with one IP address?

    Read the article

  • First Steps. Windows Phone game development

    - by anatoliiG
    I'm pretty new in game development. Have a couple ideas wich could be cool. First that comes to mind is to develop a 2D game (kinda puzzles) for Windows Phone Mango. You may ask: "Why Windows Phone?". I answer - I've got solid experience in Silverlight and C#. For me, this is a major advantage compared to other platforms. Please, give advice and suggestions about: What should I read? Best practices. Third party libraries. Silverlight(Only) vs XNA. Whatever I should pay attention to.

    Read the article

  • Why is it an issue that it takes 2 digits to represent the number 10 in decimal?

    - by Crizly
    So we use hexadecimal which has the advantage of going up to 15 in single digits A-F, but why is it an issue that it takes 2 digits to represent the number 10 in decimal? I was reading up about hexadecimal and I came across these 2 lines: Base 16 suggests the digits 0 to 15, but the problem we face is that it requires 2 digits to represent 10 to 15. Hexadecimal solves this problem by using the letters A to F. My question is, why do we care how many digits it takes to represent 15? What is the importance of this number, and how does denoting it with a single character have any value?

    Read the article

  • Partner Milestones

    - by Kristin Rose
    Ahhh the joys of success especially during graduation time…It’s the same joy we feel when one of our partners reaches an Oracle milestone. After all, we want to help partners gain maximum exposure for their hard work and achievements. How you ask? Through streamlined press releases and social media exposure of course! So whether you just completed a Specialization or an Oracle Exastack program achievement, we want to help you share that news  both near and far. Be sure to check out the key PR assets that are available to you, which include: Easy to follow guidelines to help you create and promote your OPN successes – as well as how to submit your press release to Oracle for review OPN press release templates to help develop your announcements OPN’s social media outlets where you can further promote and share your news Contact information for your global Oracle Partner PR representatives Take advantage of these invaluable resources and “Go Get ‘Em,”The OPN Communications Team

    Read the article

  • Why does DirectX use a left-handed coordinate system?

    - by greyfade
    I considered posting on Stack Overflow, but the question strikes me as being far too subjective since I can't think of a reasonable technical explanation for Microsoft's choice in this matter. But this question has bugged me for so long and the issue keeps coming up in one of my projects, and I have never actually seen an attempt at explaining this: OpenGL uses a right-handed coordinate system, where the +Z part of the world coordinate system extends toward the viewer. DirectX uses a left-handed system where the +Z part of the world coordinate extends into the screen, away from the viewer. I never used the Glide API, so I don't know how it worked, but from what I can gather, it uses a left-handed system as well. Is there a technical reason for this? And if not, is there some conceptual advantage to a particular handedness of a coordinate system? Why would one choose one over the other?

    Read the article

  • O'Reilly Deal of the day - 5/JSep/2012 - Programming Windows 8 Applications with C#

    - by TATWORTH
    Today's deal of the day from O'Reilly at http://shop.oreilly.com/product/0636920024200.do?code=DEAL is Programming Windows 8 Applications with C# ."With Early Release e-books, you get books in their earliest form — the author's raw and unedited content as he or she writes — so you can take advantage of these technologies long before the official release of these titles. You'll also receive updates when significant changes are made, new chapters as they're written, and the final e-book bundle. If you want to build Windows 8 applications for desktops and the forthcoming Microsoft Surface tablet PC, this book will show you how to work with the Metro design language and the Windows RT operating system. You’ll learn this new landscape step-by-step, including the minute system details and design specifications necessary to innovate and build a variety of Windows 8 apps. It’s ideal for .NET developers who use C#."

    Read the article

  • Libgdx change color of Texture at runtime [on hold]

    - by Springrbua
    i allready asked this on Stackoverflow, but i think this question may belong here. In a Libgdx game i have some Animations for my Player. All the Frames for this Animation are inside a TextureAtlas. The Player Textures show a human, with a white T-Shirt. The T-Shirt is the only white part of the Player. Now i want to be able to replace the white color with red for Player1, with green for Player2 and so on. How can i do that, without loosing the advantage of the TextureAtlas (Texture switching)? Ofc 1 way would be to store 4 versions of every Frame, for 4 different Players (colors). But there are games out there, where you can fully customize the Player, give him a blue hat, red pants and pink shirts and so on. How can this be done? Thanks a lot! EDIT: The question on Stackoverflow

    Read the article

  • Who created that user?

    - by AaronBertrand
    Twitter has provided some great fodder for blog content lately. And twice this week, I've found an excuse to take advantage of the default trace. Tonight @meltondba asked: I'm trying to find who created a user act in a DB It is true, SQL Server doesn't really keep track of who created objects, such as user accounts in a database. You can get some of this information from the default trace, though, since it tracks EventClass 109 (Audit Add DB User). If you run this code: USE [master] ; GO CREATE LOGIN...(read more)

    Read the article

  • How can I make apt-get wait for another instance to finish?

    - by rajagenupula
    Is there any way I can make apt-get wait for the other apt-get (or similar) processes to finish? I know that, generally, apt-get can only one instance at a time and if we try to run apt-get at the same time then we get a message saying that some other process is using it. My question is: how can I make apt-get wait for the other processes to finish and then run? Advantage: No need to type the command apt-get again, it will be automated after the 1st apt-get finishes.

    Read the article

  • Oracle Transportation Management 6 Essentials (1Z1-578) Certified Implementation Exam Is Available In Beta

    - by swalker
    The Oracle Transportation Management 6 Essentials (1Z1-578) exam beta, available until December 23, is designed for individuals who possess a strong foundation and expertise in selling or implementing Oracle Transportation Management solutions. This certification exam covers topics such as OTM Core Functionality and Shipment Planning Overview, Fleet Management and Payment, Agents, Multi-Legs, Multi-Stops and Workflows. Up-to-date training and field experience are recommended. The Oracle Transportation Management Implementation Specialist certification recognizes OPN members as OPN Certified Specialists. This certification differentiates OPN members in the marketplace by providing a competitive edge through proven expertise, and helps the OPN member's partner organization qualify for the Oracle Transportation Management Specialization. Take advantage of a free exam now and send your request for a beta exam voucher to [email protected].

    Read the article

  • Super slow and laggy?

    - by Mystogan
    I'm a native Windows user, running 7 Home Premium atm. In the past I installed Ubuntu 10 on my netbook I believe, but was a bit 'scared' by it. Anyways, I made a partition on my desktop pc, 100gb and installed Ubuntu 12.10 on it. It was pretty slow first thought it had to install updates or something, so I rebooted it. Now after the login it looks like everything freezes, I can move my mouse only ,but that's it! I can see my desktop and launcher, but the task bar doesn't display time and misc system info, only a black bar, I downloaded the android SDK pack and installed vlc media player before I rebooted. My computer info: - 1tb HDD - 8gb ddr3 ram - ATI Radeon 4890 videocard (1gb) - AMD Phenom 2 x4 black 3,2ghz CPU(64 bits) Thanks in advantage!

    Read the article

  • SSRS Reports as a Data Source in Excel 2013

    DBAs are expected to know how to administer the technologies that are available with and peripheral to SQL Server. To properly administer them, it certainly helps to understand the technology from the point of view of the user. By using an existing SSRS report as a data feed for Excel, Rodney Landrum explains how these users can now take advantage of development efforts in new ways. The seven tools in the SQL DBA Bundle support your core SQL Server database administration tasks.Make backups a breeze! Enjoy trouble-free troubleshooting! Make the most of monitoring! Download a free trial now.

    Read the article

  • Manual Directory Submission Service a Long Way to Go But Effective

    Yes you heard it right Manual Directory Submission Service is really a long way to go but very effective for your business. In fact this is a process of registering or submitting your website with its details to an online web directory. The advantage of this listing is that when a customer needs any service or product, he will search for business on a web directory for assistance and when your expertise meet with the keywords that he typed in search bar, you website link will be visible to him and he will click that link from where he will be redirected to your website.

    Read the article

  • Webcast: Extreme Analytics Without Limits

    - by Rob Reynolds
    Event Date: November 8, 2012 Event Time: 1 p.m. PT / 4 p.m. ET If you are a current Oracle Business Intelligence Applications customer, or thinking about implementing the BI Apps, please join us for this Webcast to learn how the combination of Oracle Exalytics In- Memory Machine and Oracle’s market leading analytic applications enables you to go beyond the traditional boundaries of data analysis and get the insight you need from massive volumes of data – all at the speed of thought. See how you can benefit from running your analytic applications on Oracle Exalytics to: Lower TCO Improve Operational Decision Making and Enhance Competitive Advantage Deliver Speed-of-thought Analysis – Anytime, Anywhere Click here to register.

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >