Search Results

Search found 289 results on 12 pages for 'christopher mackinnon'.

Page 10/12 | < Previous Page | 6 7 8 9 10 11 12  | Next Page >

  • Ant task does not return properly if slept longer than 9 seconds executing from jruby.

    - by Christopher Dancy
    So here is a strange error/bug/idk ... I'm running jruby 1.4 with ant 1.8 ... from within jruby I execute an ant task with system(command_to_execute_ant_script) and everything works as expected ... however if the ant should sleep for longer than 9 seconds the script does not return EVER from within jruby. If the script sleeps for exactly 9 seconds or less the script returns properly. I've tried using jruby.1.5.0.rc1 as well as older versions of ant and still the same problem ... Any ideas?

    Read the article

  • Multiple robots.txt for subdomains in rails

    - by Christopher
    I have a site with multiple subdomains and I want the named subdomains robots.txt to be different from the www one. I tried to use .htaccess, but the FastCGI doesn't look at it. So, I was trying to set up routes, but it doesn't seem that you can't do a direct rewrite since every routes needs a controller: map.connect '/robots.txt', :controller => ?, :path => '/robots.www.txt', :conditions => { :subdomain => 'www' } map.connect '/robots.txt', :controller => ?, :path => '/robots.club.txt' What would be the best way to approach this problem? (I am using the request_routing plugin for subdomains)

    Read the article

  • What is recursion? -- In plain english.

    - by Christopher Altman
    I hear this word everyday, but cannot give a meaningful, concise, or plain-english answer to what it is. Recursion is defined by the bastian of knowledge as: Recursion in computer science is a method where the solution to a problem depends on solutions to smaller instances of the same problem.1 The approach can be applied to many types of problems, and is one of the central ideas of computer science.[2] Source Is recursion simply something that repeats itself to get a solution? I am looking for a "Recursion for Dummies" definition, and maybe simple examples. My goal is to be able to understand and explain recursion in my own words. I do not like simply thinking I know the meaning of something because I hear it referenced daily, but have not paused to form my own understanding.

    Read the article

  • Implementing a scalable and high-performing web app

    - by Christopher McCann
    I have asked a few questions on here before about various things relating to this but this is more of a consolidation question as I would like to check I have got the gist of everything. I am in the middle of developing a social media web app and although I have a lot of experience coding in Java and in PHP I am trying things a bit different this time. I have modularised each component of the application. So for example one component of the application allows users to private message each other and I have split this off into its own private messaging service. I have also created a user data service the purpose of which is to return data about the user for example their name, address, age etc etc from the database. Their is also another service, the friends service, which will work off the neo4j database to create a social graph. My reason for doing all this is to allow me up to update seperate modules when I need to - so while they mostly all run off MySQL right now I could move one to Cassandra later if I thought it approriate. The actual code of the web app is really just used for the final construction. The modules behind it dont really follow any strict REST or SOAP protocol. Basically each method on our API is turned into a PHP procedural script. This then may make calls to other back-end code which tends to be OO. The web app makes CURL requests to these pages and POSTs data to them or GETs data from them. These pages then return JSON where data is required. I'm still a little mixed up about how I actually identify which user is logged in at that moment. Do I just use sessions for that? Like if we called the get-messages.php script which equates to the getMessages() method for that user - returning all the private messages for that user - how would the back-end code know which user it is as posting the users ID to the script would not be secure. Anyone could do that and get all the messages. So I thought I would use sessions for it. Am I correct on this? Can anyone spot any other problems with what I am doing here? Thanks

    Read the article

  • display base64 image in html

    - by Christopher
    Having trouble displaying a base64 image inline. Can someone point me in the right direction? <!DOCTYPE html> <html> <head> <title>Display Image</title> </head> <body> <img style='display:block; width:100px;height:100px;' id='base64image' src='data:image/jpeg;base64, LzlqLzRBQ...<!-- base64 data -->' /> </body>

    Read the article

  • Connecting a PHP front-end to a back-end java service

    - by christopher-mccann
    I am currently using various back-end services and I want to use PHP to simply query these services and perform the final page construction. These services could be coded in any number of programming langauges such as Erlang, Java, Python etc. However I am unsure of the best way to actually interface the back-end services with the web app. Requests to these services would be both synchronous and asynchronous. Would I use something like SOAP or JSON-RPC?? Any help greatly appreciated.

    Read the article

  • Mass update of data in sql from int to varchar

    - by Christopher Kelly
    we have a large table (5608782 rows and growing) that has 3 columns Zip1,Zip2, distance all columns are currently int, we would like to convert this table to use varchars for international usage but need to do a mass import into the new table convert zip < 5 digits to 0 padded varchars 123 becomes 00123 etc. is there a way to do this short of looping over each row and doing the translation programmaticly?

    Read the article

  • gwtQuery's outerWidth(true) and IE8 not working without putting a delay

    - by Christopher
    I recently came across an odd behavior when trying to calculate the width (with margins) of an element using gwtQuery. The goal is to get the width (including padding, borders and margins) of a given element as a child of a certain parent. This parent may define specific CSS rules for some children so I clone it, add my element to this parent, call .outerWidth(true) to get the width and finally remove the clone from the parent. It works fine on Chrome, Firefox and IE 10, but randomly fails (outputs 0) on IE 8. However I noticed that if I put a "sleep" between the moment I add the element to the DOM and the moment I get the outer width, it always succeeds. I obviously don't want to keep that sleep. So my question is does anyone has any insights on how to work around this behavior or even a better way of achieving the same goal? Thank you! Here's a code snippet private Integer computeTabWidth(IsWidget tab) { GQuery $tab = $("<li></li>").append($(tab).clone()); $(containerPanel).append($tab); // IE 8 debug. sleep(100); Integer tabWidth = $tab.outerWidth(true); $tab.remove(); return tabWidth; } private void sleep(int i) { long time = new Date().getTime() + i; while (time > new Date().getTime()); }

    Read the article

  • Need help with a LINQ ArgumentOutOfRangeException in C#

    - by Christopher Klein
    Hi there, Hoping this is a nice softball of a question for a friday but I have the following line of code: //System.ArgumentOutOfRangeException generated if there is no matching data currentAnswers = new CurrentAnswersCollection().Where("PARTICIPANT_ID", 10000).Load()[0]; CurrentAnswersCollection is a strongly-typed collection populated by a view going back to my database. The problem of course is that if there is not a corresponding PARTICIPANT_ID = 10000 I get the error message. Is there a better way to write this so that I wouldn't get the error message at all? I just dont know enough about LINQ syntax to know if I can test for the existance first? thanks.

    Read the article

  • Reference book on Ruby on Rails social network site for novices

    - by Christopher
    Hey, so I am a novice programmer who has only worked with HTML, CSS, and a touch of Java a couple of years ago. I am looking to try to get a social network site up and running on Ruby on Rails and was looking at RailsSpace: Building a Social Networking Website with Ruby on Rails (Addison-Wesley Professional Ruby Series) - Paperback (July 30, 2007) by Michael Hartl. This was published in 2007, however, and the newer reviews say it is not very helpful. Does anyone know if there are any new publications out there that walk you through building a social network site while teaching you the code(rather than just using a out of the box program)? Thanks

    Read the article

  • URL of the website calling Restlet API

    - by Christopher McCann
    I have a Restlet API and the methods exposed on it are called by a PHP web app. This web app is accessible by several domain names and depending on the domain certain aspects of the app are changed (look and feel, content etc). Is there a way for Restlet to determine the URL of the calling web app? I have used getReference() but all I can get is the (internal) IP address of the calling web server (not the domain name). My only other alternative is to pass the URL of the web app with every request to the API but it would be cleaner if Restlet already knew. Thanks

    Read the article

  • Switching to tabs to the right or left of the current tab in Notepad++

    - by Christopher Swiedler
    How can I switch to the document to the left or right of the current document in Notepad++? For example, if I have documents A, B, and C open, and I'm currently editing B, I would like a shortcut to be able to switch to A (Alt-LeftArrow or Ctrl-Pageup) or C (Alt-RightArrow or Ctrl-PageDown). Is this possible? All I've found is a way to switch to next or previous documents based on the "history" of when the document was last opened (Ctrl-Tab and Ctrl-Shift-Tab), which are useful, but not what I want.

    Read the article

  • How do you run your unit tests? Compiler flags? Static libraries?

    - by Christopher Gateley
    I'm just getting started with TDD and am curious as to what approaches others take to run their tests. For reference, I am using the google testing framework, but I believe the question is applicable to most other testing frameworks and to languages other than C/C++. My general approach so far has been to do either one of three things: Write the majority of the application in a static library, then create two executables. One executable is the application itself, while the other is the test runner with all of the tests. Both link to the static library. Embed the testing code directly into the application itself, and enable or disable the testing code using compiler flags. This is probably the best approach I've used so far, but clutters up the code a bit. Embed the testing code directly into the application itself, and, given certain command-line switches either run the application itself or run the tests embedded in the application. None of these solutions are particularly elegant... How do you do it?

    Read the article

  • Is there a consolidated way of writing several prototype functions for a single object?

    - by Christopher Altman
    I have about eight prototype functions for the Date object. I would like to avoid repeating Date.prototype. Is there a consolidated way of writing several prototype functions for a single object? I tried this to no avail: Date.prototype = { getMonthText: function(date){ var month = this.getMonth(); if(month==12) month = 0; return ['JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC'][month]; }, getDaysInMonth: function(date){ return 32 - new Date(this.getFullYear(), this.getMonth(), 32).getDate(); } };

    Read the article

  • Which is faster when animating the UI: a Control or a Picture?

    - by Christopher Walker
    /I'm working with and testing on a computer that is built with the following: {1 GB RAM (now 1.5 GB), 1.7 GHz Intel Pentium Processor, ATI Mobility Radeon X600 GFX} I need scale / transform controls and make it flow smoothly. Currently I'm manipulating the size and location of a control every 24-33ms (30fps), ±3px. When I add a 'fade' effect to an image, it fades in and out smoothly, but it is only 25x25 px in size. The control is 450x75 px to 450x250 px in size. In 2D games such as Bejeweled 3, the sprites animate with no choppy animation. So as the title would suggest: which is easier/faster on the processor: animating a bitmap (rendering it to the parent control during animation) or animating the control it's self?

    Read the article

  • PHP REMOTE_ADDR and secure sessions

    - by Christopher McCann
    One of the ways I have used to make securer sessions in the past is to also record the clients IP address and user agent at the handshake. Each time the client moves a page and calls session_start() I also check that the IP address and user agent stored is still the same to prevent hiijacking. But if someone is connecting from say a company network then all the users will probably have the same external static IP address and they could also really easily be using the same user agent. Is there other metrics I can use which are local only to the physical machine? Thanks

    Read the article

  • Cassandra instead of MySQL for social networking app

    - by Christopher McCann
    I am in the middle of building a new app which will have very similar features to Facebook and although obviously it wont ever have to deal with the likes of 400,000,000 million users it will still be used by a substantial user base and most of them will demand it run very very quickly. I have extensive experience with MySQL but a social app offers complexities which MySQL is not well suited too. I know Facebook, Twitter etc have moved towards Cassandra for a lot of their data but I am not sure how far to go with it. For example would you store such things as user data - username, passwords, addresses etc in Cassandra? Would you store e-mails, comments, status updates etc in Cassandra? I have also read alot that something like neo4j is much better for representing the friend relationships used by social apps as it is a graph database. I am only just starting down the NoSQL route so any guidance is greatly appreciated. Would anyone be able to advise me on this? I hope I am not being too general!

    Read the article

  • Writing a line in a JTextArea from another class

    - by Christopher Nastovski
    I'm trying to use a Method in my class 'Visual' to write a line of code into a JTextArea and it prints when I call it from 'Visual' but when I call it from 'Login' It only prints Text into the Console, not to the TextArea. private static Visual Visual; Visual.WriteLine("I'm sorry, your username or password is incorrect. Please try again."); or private static Visual Visual = new Visual(); Visual.WriteLine("I'm sorry, your username or password is incorrect. Please try again."); Dont work form 'Login' But, WriteLine("Test"); works from 'Visual', the class that the method is in. Here's the method in 'Visual' public void WriteLine(String Text) { System.out.println(Text); SystemFeed.append(Text.toString() + "\n"); SystemFeed.setCaretPosition(SystemFeed.getDocument().getLength()); }

    Read the article

< Previous Page | 6 7 8 9 10 11 12  | Next Page >