Search Results

Search found 988 results on 40 pages for 'andy simpson'.

Page 11/40 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How to optimize this user ranking query

    - by James Simpson
    I have 2 databases (users, userRankings) for a system that needs to have rankings updated every 10 minutes. I use the following code to update these rankings which works fairly well, but there is still a full table scan involved which slows things down with a few hundred thousand users. mysql_query("TRUNCATE TABLE userRankings"); mysql_query("INSERT INTO userRankings (userid) SELECT id FROM users ORDER BY score DESC"); mysql_query("UPDATE users a, userRankings b SET a.rank = b.rank WHERE a.id = b.userid"); In the userRankings table, rank is the primary key and userid is an index. Both tables are MyISAM (I've wondered if it might be beneficial to make userRankings InnoDB).

    Read the article

  • Efficient storage/retrieval method for replayable comet style applications (Google Wave, Etherpad)

    - by Gareth Simpson
    I am considering a web application that would have the same kind of multi user, automatic saving, infinite undo / replay capabilities that you see in Google Wave and Etherpad (albeit on a drastically smaller scale and userbase). Before I go away and reinvent the wheel, is this something that has already been addressed as either a piece of technology or library, or even just a design pattern. I know this isn't necessarily the best Stack Overflow question as there is probably not a "right" answer, but my Google-fu has failed me and I'd just like a reading list! Ordinarily I would be developing under python/django but this is not a firm requirement just a preference :)

    Read the article

  • Why are my connections not closed even if I explicitly dispose of the DataContext?

    - by Chris Simpson
    I encapsulate my linq to sql calls in a repository class which is instantiated in the constructor of my overloaded controller. The constructor of my repository class creates the data context so that for the life of the page load, only one data context is used. In my destructor of the repository class I explicitly call the dispose of the DataContext though I do not believe this is necessary. Using performance monitor, if I watch my User Connections count and repeatedly load a page, the number increases once per page load. Connections do not get closed or reused (for about 20 minutes). I tried putting Pooling=false in my config to see if this had any effect but it did not. In any case with pooling I wouldn't expect a new connection for every load, I would expect it to reuse connections. I've tried putting a break point in the destructor to make sure the dispose is being hit and sure enough it is. So what's happening? Some code to illustrate what I said above: The controller: public class MyController : Controller { protected MyRepository rep; public MyController () { rep = new MyRepository(); } } The repository: public class MyRepository { protected MyDataContext dc; public MyRepository() { dc = getDC(); } ~MyRepository() { if (dc != null) { //if (dc.Connection.State != System.Data.ConnectionState.Closed) //{ // dc.Connection.Close(); //} dc.Dispose(); } } // etc } Note: I add a number of hints and context information to the DC for auditing purposes. This is essentially why I want one connection per page load

    Read the article

  • Custom Django Field is deciding to work as ForiegnKey for no reason

    - by Joe Simpson
    Hi, i'm making a custom field in Django. There's a problem while trying to save it, it's supposed to save values like this 'user 5' and 'status 9' but instead in the database these fields show up as just the number. Here is the code for the field: def find_key(dic, val): return [k for k, v in dic.items() if v == val][0] class ConnectionField(models.TextField): __metaclass__ = models.SubfieldBase serialize = False description = 'Provides a connection for an object like User, Page, Group etc.' def to_python(self, value): if type(value) != unicode: return value value = value.split(" ") if value[0] == "user": return User.objects.get(pk=value[1]) else: from social.models import connections return get_object_or_404(connections[value[0]], pk=value[1]) def get_prep_value(self, value): from social.models import connections print value, "prep" if type(value) == User: return "user %s" % str(value.pk) elif type(value) in connections.values(): o= "%s %s" % (find_key(connections, type(value)), str(value.pk)) print o, "return" return o else: print "CONNECTION ERROR!" raise TypeError("Value is not connectable!") Connection is just a dictionary with the "status" text linked up to the model for a StatusUpdate. I'm saving a model like this which is causing the issue: Relationship.objects.get_or_create(type="feedback",from_user=request.user,to_user=item) Please can someone help, Many Thanks Joe *_*

    Read the article

  • How to extract the last name from [email protected] using Oracle?

    - by Simpson
    Hello - I know this can't be too difficult, but I've tried everything I can think of and cannot get it to work. I need to compare the value of a column (LASTNAME) with a system variable (:VARIABLE), but the variable is an email address, so I need to trim off the "@email.com" and "firstname." Some things I've tried: select * from TABLENAME where LASTNAME LIKE :VARIABLE select * from TABLENAME where LASTNAME IN :VARIABLE I've been able to trim off the @email.com, can't figure out how to trim off FIRSTNAME. at the same time. Thanks!

    Read the article

  • Does the order of columns in a query matter?

    - by James Simpson
    When selecting columns from a MySQL table, is performance affected by the order that you select the columns as compared to their order in the table (not considering indexes that may cover the columns)? For example, you have a table with rows uid, name, bday, and you have the following query. SELECT uid, name, bday FROM table Does MySQL see the following query any differently and thus cause any sort of performance hit? SELECT uid, bday, name FROM table

    Read the article

  • Efficiently compute the row sums of a 3d array in R

    - by Gavin Simpson
    Consider the array a: > a <- array(c(1:9, 1:9), c(3,3,2)) > a , , 1 [,1] [,2] [,3] [1,] 1 4 7 [2,] 2 5 8 [3,] 3 6 9 , , 2 [,1] [,2] [,3] [1,] 1 4 7 [2,] 2 5 8 [3,] 3 6 9 How do we efficiently compute the row sums of the matrices indexed by the third dimension, such that the result is: [,1] [,2] [1,] 12 12 [2,] 15 15 [3,] 18 18 ?? The column sums are easy via the 'dims' argument of colSums(): > colSums(a, dims = 1) but I cannot find a way to use rowSums() on the array to achieve the desired result, as it has a different interpretation of 'dims' to that of colSums(). It is simple to compute the desired row sums using: > apply(a, 3, rowSums) [,1] [,2] [1,] 12 12 [2,] 15 15 [3,] 18 18 but that is just hiding the loop. Are there other efficient, truly vectorised, ways of computing the required row sums?

    Read the article

  • Get more error information from unhandled error

    - by Andrew Simpson
    I am using C# in a desktop application. I am calling a DLL written in C that I do not have the source code for. Whenever I call this DLL I get an untrapped error which I trap in an UnhandledException event/delegate. The error is : object reference not set to an instance of an object But the stack trace is empty. When I Googled this the info back was that the error was being hanlded eleswhere and then rethrown. But this can only be in the DLL I do not have the source code for. So, is there anyway I can get more info about this error? This is my code... in program.cs... AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { try { Exception _ex = (Exception)e.ExceptionObject; //the stact trace property is empty here.. } finally { Application.Exit(); } } My DLL... [DllImport("AutoSearchDevice.dll", EntryPoint = "Start", ExactSpelling = false, CallingConvention = CallingConvention.StdCall)] public static extern int Start(int ASD_HANDLE); An I call it like so: public static void AutoSearchStart() { try { Start(m_pASD); } catch (Exception ex) { } }

    Read the article

  • How to handle dynamic site localizations?

    - by James Simpson
    I've got a website that is currently all in english. It is an online game, so it has a bunch of different pages with static text, as well as a lot of content in a database. I am trying to expand more globally and am gearing up to release some localizations of the site. However, I'm not sure about the best way to go about setting this up so that it'll be the easiest for me to manage and the easiest for users to use as well. Should I be storing the translated texts in a database, or should this be done in a completely different way? If it matters at all, the site is written in PHP and uses MySQL.

    Read the article

  • Validation and Firefox's input caching

    - by Chris Simpson
    When you refresh/reload a page or use the back button, Firefox is kind enough to repopulate your inputs with what was entered before you navigated away. Though this is a nice feature it does not trigger my jquery validation and the unsaved changes warning I add to my pages. Is there a way to either disable this feature in Firefox (without renaming every control every time) or capture the firefox events?

    Read the article

  • Right align text in an image with imagettftext(), PHP

    - by James Simpson
    I am setting up dynamic forum signature images for my users and I want to be able to put their username on the image. I am able to do this just fine, but since usernames are different lengths and I want to right align the username, how can I go about doing this when I have to set x & y coordinates. $im = imagecreatefromjpeg("/path/to/base/image.jpg"); $text = "Username"; $font = "Font.ttf"; $black = imagecolorallocate($im, 0, 0, 0); imagettftext($im, 10, 0, 217, 15, $black, $font, $text); imagejpeg($im, null, 90);

    Read the article

  • Java: PriorityQueue returning incorrect ordering from custom comparator??

    - by Michael Simpson
    I've written a custom comparator to compare my node classes, but the java priority queue is not returning my items in the correct order. Here is my comparator: public int compare(Node n1, Node n2){ if (n1.getF() > n2.getF()){ return +1; } else if (n1.getF() < n2.getF()){ return -1; } else { // equal return 0; } } Where getF returns a double. However after inserting several Nodes into the priority queue, I print them out using: while(open.size() > 0) { Node t = (Node)(open.remove()); System.out.println(t.getF()); } Which results in: 6.830951894845301 6.830951894845301 6.0 6.0 5.242640687119285 7.4031242374328485 7.4031242374328485 8.071067811865476 Any ideas why this is so? Is my comparator wrong? Thanks. Mike

    Read the article

  • Block upload of executable images (PHP)

    - by James Simpson
    It has come to my attention that a user has been trying to create an exploit through avatar image uploads. This was discovered when a user reported to me that they were getting a notice from their Norton Anti-virus saying "HTTP Suspicious Executable Image Download." This warning was referencing the user's avatar image. I don't think they had actually achieved anything in the way of stealing information or anything like that, but I assume it could be possible if the hole is left open long enough. I use PHP to upload the image files, and I check if the file being uploaded is a png, jpg, or gif.

    Read the article

  • %HOMEPATH% Posh-Git error in Powershell, in ConEmu on Windows 7 64-bit

    - by atwright
    I am always getting the following error in Posh-Git in Powershell, in ConEmu on Windows 7 64-bit: Resolve-Path : Cannot find path 'C:\wamp\www\MobileApps\Backbone\%HOMEPATH%' because it does not exist. At D:\Users\Andy\Documents\WindowsPowerShell\Modules\posh-git\GitUtils.ps1:265 char:13 + $home = Resolve-Path (Invoke-NullCoalescing $Env:HOME ~) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\wamp\www\Mob...bone\%HOMEPATH%:String) [Resolve-Path], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathComma nd Join-Path : Cannot bind argument to parameter 'Path' because it is null. At D:\Users\Andy\Documents\WindowsPowerShell\Modules\posh-git\GitUtils.ps1:266 char:29 + Resolve-Path (Join-Path $home ".ssh\$File") -ErrorAction SilentlyContinue 2> ... + ~~~~~ + CategoryInfo : InvalidData: (:) [Join-Path], ParameterBindingValidationExc eption + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Po werShell.Commands.JoinPathCommand Can anybody advise what might be wrong?

    Read the article

  • Access Insurance Company Wins 2010 Technology Innovation Award at IASA

    - by [email protected]
    Helen Pitts, senior product marketing manager for Oracle Insurance, is blogging from the 2010 IASA Annual Conference and Business Show this week. For the second time in two weeks an Oracle Insurance customer has earned recognition at an insurance industry event for its innovative use of technology to transform their business. Access Insurance Company received the 2010 Technology Innovation Award during the 2010 IASA Annual Conference and Business Show this week in Grapevine, Texas. The company earned the recognition for its "Instant Access" application, which executes all the business rules and processes needed to provide a quote, bind, and issue a policy. CIO Andy Dunn and Tim Reynolds stopped by the Oracle Insurance Booth at IASA to visit with the team, show their award, and share how the platform has provided a strategic advantage to the company and helped it increase revenue by penetrating new markets, increasing market share and improving customer retention. Since implementing Instant Access in 2009 - a platform that leverages both Oracle Insurance Insbridge Rating and Underwriting and Oracle Documaker - the carrier has: Increased policies in force by 22%, from 140,185 to more than 270,000 Grown market share by 4.6% Increased 2009 revenue by 26.5% Increased ratio of policyholders per CSR by 30% Increased its appointed independent producers by 43 percent Now that's true innovation! You can learn more about the company's formula for success by reading Access Insurance Holdings CEO and president Michael McMenamin's interview with Insurance & Technology, Data Mastery Drives Access Insurance's 'Instant Access' Business Technology Platform. Congratulations to Michael, Andy, Tim and the entire team at Access Insurance on this well deserved honor - and for your role as a technology leader for the industry. Helen Pitts is senior product marketing manager for Oracle Insurance.

    Read the article

  • links for 2010-04-12

    - by Bob Rhubart
    Andy Mulholland: We need innovation! What does that mean? "The most common response would seem to be ‘I will know it when I see it’, which suggests business success is based on ‘getting lucky’. As you might expect business schools don’t agree with this and as A G Lafley, author of several works on the topic comments: 'Innovation is risky, but it’s not random. Innovators have a disciplined invention process.'" Capgemini CTO blogger Andy Mulholland. (tags: entarch enterprisearchitecture innovation) @eelzinga: lEAI/Oracle Service Bus testing with Citrus Framework, part2 IT-Eye's Eric Elzinga continues his series with a test of a scenario that is part of a customer's middleware architecture. (tags: oracle otn ESB soa citrus) @fteter: Collaborate 10 - What Looks Good To Me Oracle ACE Director Floyd Teter from NASA's JPL shares quick previews of his Collaborate 10 presentations, along with a list of some sessions he plans to attend. (tags: oracle otn oracleace collaborate2010) Mark Rittman: OWB11gR2 for Windows Now Available Oracle ACE Director Mark Rittman of Rittman Mead shares insight on the recent Oracle Warehouse Builder release, along with a list of articles on the new features in Oracle Database 11gR2. (tags: oracle otn datewarehousing businessintelligence 11gr2)

    Read the article

  • links for 2010-03-11

    - by Bob Rhubart
    Andy Mulholland: (Information Technology) + (Business Technology) ÷ Clouds = Infostructure "Internal information technology with its dedicated users, applications, licenses, client-server, data-centric and close coupled integration architecture cannot support externally oriented business technology where almost every condition is different. Internet connectivity and the emergence of people centric services in the web 2.0 world has led business and user expectations to shift dramatically and give rise to the expectation of a new and completely different working environment, based in the cloud, or more correctly, clouds." -- Andy Mulholland, CTO Blog, Capgemini (tags: enterprisearchitecture cloud web2.0 entarch) @myfear: Getting started with (GSW #2): GlassFish v3 "If the application server/container of your choice is a Java EE compliant one, you are on the right track. This list is not too long these days, if you look for Java EE 6 compliant servers. The most prominent and well-known is also the Java EE 6 reference implementation (RI): The Oracle GlassFish v3." -- Oracle ACE Markus "@myfear" Eisele (tags: oracle otn oracleace glassfish java) @oraclenerd: The"Database is a Bucket" Mentality "Could it be that everyone out there believes that the sole purpose of a database is to store data? That it can't do anything else?" -- Chet "@oraclenerd" Justice (tags: otn oracle database dba) The Encyclopedia of SOA "SOA is an anagram for OSA, which means female bear in spanish. It is a well-known fact in the spanish-speaking world that female bears are able to model business processes and optimize reusable IT assets better than any other hibernating animal." -- One of the surprisingly funny nuggets of wisdom available in the Encyclopedia of SOA. (tags: architecture chucknorris humor soa software technology webservices) Marina Fisher: Book Review - Web 2.0 Fundamentals Marina Fisher reviews WEB 2.0 FUNDAMENTALS by Oswald Campesato and Kevin Nilson. (tags: sun web2.0 bookreview socialnetworking)

    Read the article

  • links for 2010-05-24

    - by Bob Rhubart
    Andrejus Baranovskis: Oracle OpenWorld 2010 - Developing Large Oracle ADF 11g Applications Oracle ACE Director Andrejus Baranovskis shares a preview of the presentation he will give at Oracle OpenWorld 2010. (tags: oracle otn oracleace oow10) Andy Mulholland: Complicated or complex architecture or solutions "Enterprise architecture, and EAI middleware, is not likely to be the answer to this, instead we should be looking at provisioning through using the granularity of ‘services’ as opposed to the monolithic approach of applications. Actually it’s not one or the other, it’s both used together. The goal is to introduce an abstraction layer between the core processes represented by applications connected together through closed coupled middleware in defined relationship, and the loose coupled environment of services with the flexibility of orchestrations. At least in part the ability of drag and drop tools to produce orchestrations ‘on-demand’ starts the change towards user-driven views on ‘outcomes’ that suit them rather than the computer’s database." Andy Mulholland (tags: enterprisearchitecture architect businessalignment government) @chrismuir: One size doesn't fit all: ADF and WLS JNDI configuration errors Oracle ACE Director Chris Muir shares "Another blog under the theme 'let's document it so we don't get caught out again', which can also be tagged as 'let's document it so others don't get caught out too.'" (tags: oracle otn oracleace adf wls jndi architect)

    Read the article

  • links for 2010-03-31

    - by Bob Rhubart
    Andy Mulholland: Rethinking the narrow and deep expertise model "We increasingly realise that we have to read requirements in a more open way to decide what techniques can be used, what business experience can be added, etc, so the whole idea of encouraging ‘cross’ discipline understanding seems to look increasingly necessary as we look at how technology touches every part of business, and/or any other aspect of life. It is time to rethink the narrow and deep expertise model and consider T-shaped approaches where the depth is complimented by the width to understand how it might be used and how it fits with other capabilities and disciplines too." -- Andy Mulholland (tags: enterprisearchitecture) @vambenepe: Smoothing a discrete world "For the short term (until we sell one) there are three cars in my household. A manual transmission, an automatic and a CVT (continuous variable transmission). This makes me uniquely qualified to write about Cloud Computing." -- William Vambenepe (tags: otn oracle cloud) @fteter: The Price of Progress "I wonder about the price of progress on the business world. Do some of us get attached to old business models or software applications? Do we resist change for the better for emotional reasons? Are we sometimes impediments to progress just because we don't want things to change?" -- Oracle ACE Director Floyd Teter (tags: otn oracle oracleace progress innovation) Pat Shepherd: Enterprise Architecture should not be Arbitrary "If done properly the Business, Application and Information architectures are nailed down BEFORE any technological direction (SOA or otherwise) is set. Those 3 layers and Governance (people and processes), IMHO, are layers that should not vary much as they have everything to do with understanding the business -- from which technological conclusions can later be drawn." - Pat Shepherd, responding to a post by Jordan Braunstein. (tags: oracle otn enterprisearchitecture soa)

    Read the article

  • OPN Exchange Keynote On-Demand

    - by kristin.jellison
    We hope everyone has had a chance to refresh and recharge after Oracle OpenWorld 2013. In case you didn’t have the opportunity to catch the full OPN Exchange keynote, we have it on demand for your viewing pleasure. A highlight reel is up on the OPN YouTube channel and on Oracle.com. You can also watch individual keynote segments, from Oracle Executives like Mark Hurd, John Fowler and Andy Bailey, highlighted below. So please, sit back, relax and enjoy the show! You know, in case your football team is on a bye this week. Mark Hurd, President, Oracle Executive Address John Fowler, Executive Vice President, Systems Hardware and Software Engineered to Work Together Joel Borellis, Group Vice President, Partner Enablement Technology, Middleware and Business Intelligence Chris Baker, Senior Vice President, Worldwide ISV,OEM and Java Sales Engineered Systems and Hardware Andy Bailey, Senior Vice President, Strategic Alliances Cloud, Fusion Applications and Customer Experience Thomas LaRocca, Senior Vice President, North America Sales Alliances and Channels Terri Hall, Group Vice President, North America Sales Alliances and Channels Oracle Partner Excellence Awards: North America Hugo Freytes, Senior Vice President, Latin America Alliances and Channels Oracle Partner Excellence Awards: Latin America Mark Lewis, Senior Vice President, APAC Alliances and Channels Hiroshi Watanabe, Senior Vice President, Japan Alliances and Channels Oracle Partner Excellence Awards: APAC and Japan David Callaghan, Senior Vice President, EMEA Alliances and Channels Oracle Partner Excellence Awards: EMEA Cheers! The OPN Communications Team

    Read the article

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

    - by Bob Rhubart
    2012 Real World Performance Tour Dates |Performance Tuning | Performance Engineering www.ioug.org Coming to your town: a full day of real world database performance with Tom Kyte, Andrew Holdsworth, and Graham Wood. Rochester, NY - March 8 Los Angeles, CA - April 30 Orange County, CA - May 1 Redwood Shores, CA - May 3. Oracle Cloud Conference: dates and locations worldwide http://www.oracle.com Find the cloud strategy that’s right for your enterprise. 2 new Cloud Computing resources added to free IT Strategies from Oracle library www.oracle.com IT Strategies from Oracle, the free authorized library of guidelines and reference architectures, has just been updated to include two new documents: A Pragmatic Approach to Cloud Adoption Data Sheet: Oracle's Approach to Cloud SOA! SOA! SOA!; OSB 11g Recipes and Author Interviews www.oracle.com Featured this week on the OTN Architect Homepage, along with the latest articles, white papers, blogs, events, and other resources for software architects. Enterprise app shops announcements are everywhere | Andy Mulholland www.capgemini.com Capgemini's Andy Mulholland discusses "the 'front office' revolution using new technologies in a different manner to the standard role of IT and its attendant monolithic applications based on Client-Server technologies." Encapsulating OIM API’s in a Web Service for OIM Custom SOA Composites | Alex Lopez fusionsecurity.blogspot.com Alex Lopez describes "how to encapsulate OIM API calls in a Web Service for use in a custom SOA composite to be included as an approval process in a request template." Thought for the Day "Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats." — Howard H. Aiken

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >