Search Results

Search found 1714 results on 69 pages for 'adam stone'.

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

  • Parsing prototype AJAX.response XML in IE

    - by adam
    Hi I have an xml webservice which I'm fetching using PrototypeJS. The xml has the correct content type and is well-formed, and looks like this: <GetTokenResponse xmlns="http://tempuri.org/"> <GetTokenResult>F655100D64F098F0AC33AFF414A4A0D5</GetTokenResult> </GetTokenResponse> The AJAX request is completing successfully, and I can access the GetTokenResult node in both IE and FF but can only get the text content of the node in FF. My code is below: node = transport.responseXML.documentElement.getElementsByTagName('GetTokenResult')[0]; rawToken = (document.all) ? node.innerText : node.textContent; I've tried innerText and innerHTML, as well as children[0] and a few other chance guesses but IE returns 'undefined' when I access rawToken. Anyone able to lend a hand? Thanks, Adam

    Read the article

  • mysql - funny square characters added to the value when inserting it into table

    - by stone
    Hi, I have a php script that inserts values into mySQL table INSERT INTO stories (title) VALUES('$_REQUEST[title]); I checked the values of my request variables before going into the table and it's fine. But when I add title=john to the table for example, I get something like this: title = "[][][][]john" and when I extract the value, it's a newline then john. I have my columns set to utf-8, I tried swedish character set as well. Note: I don't get this error when inserting values from the phpMyAdmin commandline

    Read the article

  • Syncing data between devel/live databases in Django

    - by T. Stone
    With Django's new multi-db functionality in the development version, I've been trying to work on creating a management command that let's me synchronize the data from the live site down to a developer machine for extended testing. (Having actual data, particularly user-entered data, allows me to test a broader range of inputs.) Right now I've got a "mostly" working command. It can sync "simple" model data but the problem I'm having is that it ignores ManyToMany fields which I don't see any reason for it do so. Anyone have any ideas of either how to fix that or a better want to handle this? Should I be exporting that first query to a fixture first and then re-importing it? from django.core.management.base import LabelCommand from django.db.utils import IntegrityError from django.db import models from django.conf import settings LIVE_DATABASE_KEY = 'live' class Command(LabelCommand): help = ("Synchronizes the data between the local machine and the live server") args = "APP_NAME" label = 'application name' requires_model_validation = False can_import_settings = True def handle_label(self, label, **options): # Make sure we're running the command on a developer machine and that we've got the right settings db_settings = getattr(settings, 'DATABASES', {}) if not LIVE_DATABASE_KEY in db_settings: print 'Could not find "%s" in database settings.' % LIVE_DATABASE_KEY return if db_settings.get('default') == db_settings.get(LIVE_DATABASE_KEY): print 'Data cannot synchronize with self. This command must be run on a non-production server.' return # Fetch all models for the given app try: app = models.get_app(label) app_models = models.get_models(app) except: print "The app '%s' could not be found or models could not be loaded for it." % label for model in app_models: print 'Syncing %s.%s ...' % (model._meta.app_label, model._meta.object_name) # Query each model from the live site qs = model.objects.all().using(LIVE_DATABASE_KEY) # ...and save it to the local database for record in qs: try: record.save(using='default') except IntegrityError: # Skip as the record probably already exists pass

    Read the article

  • Xcode 4.2 how include one project into another one?

    - by Alex Stone
    I keep searching, but cannot find a clear and simple explanation on how to include one XCode project, along with all of it's sub-classes into another project. I routinely see stuff like that in sample projects that I download off the web, but do not know how to do this myself. Within XCode, along with .h and .m files, and folders, there's a whole new project, starting with a blue xcode project icon, that is expandable to contain everything within the project. Please, can someone explain to me step by step what do I need to do to add one XCode project into another one? I've seen a ton of one liners like "header search paths", but that does not tell me much. UPDATE: After re-reading the documentation, I realized that the project to include must be dragged ONTO the BLUE project icon of the parent project. Regular sources can be dragged anywhere, but a project must be dragged onto a project. Thank you!

    Read the article

  • sIFR in Javascript news rotator?

    - by Adam Brown
    Hi everyone, I'm using sIFR on a website that is database driven and it works great. However, I have a news rotator on the home page and sIFR won't replace the text on the tile below the rotating image, so I have to create images for this each time. Example of the site is http://www.aucklandcityfc.com. Put home.asp on the end of the URL to see what it looks like trying to run sIFR by default. What I'd like to be able to do is use sIFR to replace that text as well, and then other people can add stories through the CMS. Alternatively, if there's a better rotator (or possibly a Flash application) that anyone knows of, please let me know. Thanks, Adam

    Read the article

  • jQuery fadeIn IE Png Issue when loading from external

    - by Adam Stone
    I am loading data from external html files within my domain into a div on my webpage using a load content method in jQuery. I take the div out of the new page whilst hiding the div in the current page by fading this out and fading the new one in. There is a png image in both of these divs and it is creating horrid black blobs in IE, works fine in other browsers but due to IEs inability to process multiple filters its making a mess. I tried using the unit png fix to no avail, does anyone have any fixes or ideas to help keep my pngs looking nice during this transition? i46.tinypic.com/t9dtvr.jpg this is a screenshot of the problem, cheers also discovered that the png that is on the page originaly (before loading anything new) fades in and out perfectly using the unit png fix but stuff loading in and then back out from external files doesnt. Ive added the fix to those pages too but that doesnt work either.

    Read the article

  • How do I determine which C/C++ compiler to use?

    - by Adam Siddhi
    Greetings, I am trying to figure out which C/C++ compiler to use. I found this list of C/C++ compilers at Wikipedia: http://en.wikipedia.org/wiki/List_of_compilers#C.2FC.2B.2B_compilers I am fairly certain that I want to go with an open source compiler. I feel that if it is open source then it will be a more complete compiler since many programmer perspectives are used to make it better. Please tell me if you disagree. I should mention that I plan on learning C/C++ mainly to program 2D/3D game applications that will be compatible with Windows, Linux, MAC and iPhone operating systems. I am currently using Windows Vista x64 OS. Thanks, Adam

    Read the article

  • Modify jkpanel to load internal content instead of external content

    - by Adam Stone
    I am using an implementation of jkpanel in a vb.net app, the script (see below) loads an external file into the drop down panel. I need to modify this script to load an internal content like a specific div or span so that I can have this nested within the master page. //Drop Down Panel script (March 29th, 08'): By JavaScript Kit: http://www.javascriptkit.com var jkpanel={ controltext: 'Panel Content', $mainpanel: null, contentdivheight: 0, openclose:function($, speed){ this.$mainpanel.stop() //stop any animation if (this.$mainpanel.attr('openstate')=='closed') this.$mainpanel.animate({top: 0}, speed).attr({openstate: 'open'}) else this.$mainpanel.animate({top: -this.contentdivheight+'px'}, speed).attr({openstate: 'closed'}) }, init:function(file, height, speed){ jQuery(document).ready(function($){ jkpanel.$mainpanel=$('<div id="dropdownpanel"><div class="contentdiv"></div><div class="control">'+jkpanel.controltext+'</div></div>').prependTo('body') var $contentdiv=jkpanel.$mainpanel.find('.contentdiv') var $controldiv=jkpanel.$mainpanel.find('.control').css({cursor: 'wait'}) $contentdiv.load(file, '', function($){ var heightattr=isNaN(parseInt(height))? 'auto' : parseInt(height)+'px' $contentdiv.css({height: heightattr}) jkpanel.contentdivheight=parseInt($contentdiv.get(0).offsetHeight) jkpanel.$mainpanel.css({top:-jkpanel.contentdivheight+'px', visibility:'visible'}).attr('openstate', 'closed') $controldiv.css({cursor:'hand', cursor:'pointer'}) }) jkpanel.$mainpanel.click(function(){jkpanel.openclose($, speed)}) }) } } //Initialize script: jkpanel.init('path_to_content_file', 'height of content DIV in px', animation_duration) jkpanel.init('panelcontent.htm', '200px', 500) Does anybody have any idea on how to modify this to do so or even have any tips or pointers to point me in the right direction to start doing so. Cheers

    Read the article

  • What does the "build-essential" & "build-dep" Terminal commands mean & do in Linux based operating s

    - by Adam Siddhi
    Hi. I am researching how to install Ruby 1.9.1 in Xubuntu 10.04 and I came across the command build-essential and build-dep multiple times. Sometimes it is followed by packages and sometimes it is both preceded and post-ceded by packages. The 2 examples I am looking at are: sudo apt-get install build-essential zlib1g zlib1g-dev zlibc libruby1.9 libxml2 libxml2-dev libxslt-dev sudo apt-get build-dep ruby1.9 and sudo apt-get install ruby irb ri rdoc ruby1.8-dev libzlib-ruby libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby libruby-extras libfcgi-ruby1.8 build-essential libopenssl-ruby libdbm-ruby libdbi-ruby libdbd-sqlite3-ruby sqlite3 libsqlite3-dev libsqlite3-ruby libxml-ruby libxml2-dev Thanks :adam

    Read the article

  • Single quotes in JavaScript object literal

    - by stone
    I'm looking at the Google Maps API tutorial, and I see this: <script type="text/javascript" src="http://www.google.com/jsapi?autoload={'modules':[{name:'maps', version:3, other_params:'sensor=false'}]}"></script> Why is modules wrapped in single quotes?

    Read the article

  • Ruby: change each value in a hash with something like #collect for arrays?

    - by Adam Nonymous
    Hi! I'd like to replace each value in a hash with value.some_method. For example in a simple hash {"a" = "b", "c" = "d"} every value should be .upcase-d so it looks like {"a" = "B", "c" = "D"}. I tried #collect and #map but always just get arrays back. Is there an 'elegant' way to do this? Thanks in advance, Adam Nonymous UPDATE: Damn, I forgot: The hash is in an instance variable which should not be changed. I need a new hash with the changed values, but would prefer not to define that variable explicitly and then loop over the hash filling it. Something like new_hash = hash.magic {...} ;)

    Read the article

  • Where to put constant strings in C++: static class members or anonymous namespaces

    - by stone
    I need to define some constant strings that will be used only by one class. It looks like I have three options: Embed the strings directly into locations where they are used. Define them as private static constant members of the class: //A.h class A { private: static const std::string f1; static const std::string f2; static const std::string f3; }; //A.cpp const std::string f1 = "filename1"; const std::string f2 = "filename2"; const std::string f3 = "filename3"; //strings are used in this file Define them in an anonymous namespace in the cpp file: //A.cpp namespace { const std::string f1 = "filename1"; const std::string f2 = "filename2"; const std::string f3 = "filename3"; } //strings are used in this file Given these options, which one would you recommend and why? Thanks.

    Read the article

  • Encrypt text using a number

    - by Adam Matan
    Project Euler I have recently begun to solve some of the Project Euler riddles. I found the discussion forum in the site a bit frustrating (most of the discussions are closed and poorly-threaded), So I have decided to publish my Python solutions on launchpad for discussion. The problem is that it seems quite unethical to publish these solutions, as it would let other people gain reputation without doing the programming work, which the site deeply discourages. My Encryption problem I want to encrypt my answers so that only those who have already solved the riddles can see my code. The logical key would be the answer to the riddle, which is always numeric. In order to prevent brute-force attacks on my answers, I want to find an encryption algorithm that takes a significantly long time (few seconds) to run. Do you know any such algorithm? I would fancy a Python package, which I can attach to the code, over an external program that might have portability issues. Thanks, Adam

    Read the article

  • BeautifulSoup: Get the contents of a specific table

    - by Adam Matan
    Hi, My local airport disgracefully blocks users without IE, and looks awful. I want to write a Python scripts that would get the contents of the Arrival and Departures pages every few minutes, and show them in a more readable manner. My tools of choice are mechanize for cheating the site to believe I use IE, and BeautifulSoup for parsing page to get the flights data table. Quite honestly, I got lost in the BeautifulSoup documentation, and can't understand how to get the table (whose title I know) from the entire document, and how to get a list of rows from that table. Any ideas? Adam

    Read the article

  • PHP Strange error "0:". Possible Object syntax problem?

    - by Michael Stone
    I'm trying to transfer a site from one hosting company to another. I was using 000webhost until the client had hosting and a domain. Now that the client has their domain and hosting, using FatCow.com, I can not for the life of me, debug my PHP code. I'm not getting any errors. I have a successful DB connection. If you procedurally display data, it works, but when I try to use my original objects, something is breaking and just returns "0:". I have all errors on. On old server where the site worked: PHP Version 5.2.11 MySQL Version: 5.0.81 On new server where I get the "0:": PHP Version 5.2.12 MySQL Version 5.0.32 I've setup a test page to test just the output of the variables with the DB connection. Below is my code: <?php error_reporting(E_ALL); ini_set('display_errors', '1'); try { $link = mysql_connect('connectionstring', 'username', 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); } else{ $db = mysql_select_db('a8210422_lit'); } if($db){ include_once('admin/classes/clsPOW.php'); include_once('admin/classes/clsProviders.php'); $pow = new POW(); $prov = new Providers(); $new = $pow->getNew(); $newAr = $new->val(); $get = $prov->getAll($newAr['providerId']); $getAr = $get->val(); $img = $getAr['image']; $name = $getAr['provider']; $desc = $getAr['description']; $zip = $getAr['zip']; $web = $getAr['link']; if($zip==0){ $zip = "Unavailable"; } print $img; print $name; print $desc; print $zip; print $web; } else{ print 'fail!'; } } //catch exception catch(Exception $e) { echo 'Message: ' .$e->getMessage(); } ?>

    Read the article

  • Base X string encoding

    - by Paul Stone
    I'm looking for a routine that will encode a string (stream of bytes) into an arbitrary base/alphabet (like base64 encoding but I get to choose the alphabet). I've seen a few routines that do base X encoding for a number, but not for a string.

    Read the article

  • Want to build simple SQL admin interface to change a few values in a table.

    - by Adam McC
    i am currently building a system in MSSQL 2K5. i have a table that holds information about certain insurance schemes such as overheads and other things. these values will change occasionally and currently i administer the database straight through the management Studio. i would like to build a simple interface that will allow my colleagues to change these values by selecting the company in a dropdown and the current values will populate. they can then edit these values and submit them to the database. is this possible in the current Visual Studio supplied with MSSQL server 2K5 or do i need to get another product. i am confident that with the help of stack overflow and google i can build this myself, but i need pointed in the right direction as to which environment would be easiest and best to start building it. Many thanks, adam

    Read the article

  • Rails and PostgreSQL: Role postgres does not exist

    - by Adam
    I have installed postgresql on my Mac OS Lion, and am working on a rails app. I use RVM to keep everything separate from my other rails apps. For some reason when I try to migrate the db for the first time rake cannot find the postgres user. I get the error FATAL: role "postgres" does not exist I have pgAdmin 3 so I can clearly see there is a postgres user in the DB - the admin account in fact - so I'm not sure what else to do. I read somewhere about people having issues with postgresql because of which path it was installed in, but then i don't think i would have gotten that far if it couldn't find the db. Any clues would be gratefully received! Thanks, Adam

    Read the article

  • Are CMAttitude and CATransform3D related by rotational matrices?

    - by Alex Stone
    I'm looking at the core motion class CMAttitude, it can express the device's orientation as a 3x3 rotational matrix. At the same time I've taken a look at the CATransform3D, which encapsulates the view's attitude, as well as scaling. The CATransform3D is a 4x4 matrix. I've seen that the OpenGL rotational matrix is 4x4 and is simply 0001 padded in the 4th row and column. I'm wandering if the CMAttitude's rotational matrix is related to CATransform's matrix? Can I use the device's rotation in space obtained via a rotational matrix to transform a UIView using CATransform3D? My intention is to let the user move the phone and apply the same transform to a UIView on the screen. Bonus question: if they are related, how do I transform a CMAttitude's rotational matrix to CATransform3D?

    Read the article

  • Locking down multiple sites in Sitecore

    - by adam
    Hi I have two sites running under one Sitecore 6 installation. The home nodes of the sites are as such: /sitecore/content/Home /sitecore/content/Careers Assuming the primary site is at domain.com, the careers site can be accessed at careers.domain.com. My problem is that, by prefixing the uri with /sitecore/content/, any sitecore item can be accessed by either (sub)domain. For example, I can get to: http://domain.com/sitecore/content/careers.aspx (should be under careers.domain.com) http://careers.domain.com/sitecore/content/home/destinations.aspx (should be under domain.com). I know I can redirect these urls (using IIS7 Redirects or ISAPIRewrite) but is there any way to 'lock' Sitecore down to only serve items under the configured home node for that domain? Thanks, Adam

    Read the article

  • What does the "build-essential" Terminal command mean & do in Linux based operating systems like Ubu

    - by Adam Siddhi
    Hi. I am researching how to install Ruby 1.9.1 in Xubuntu 10.04 and I came across the command build-essential multiple times. Sometimes it is followed by packages and sometimes it is both preceded and post-ceded by packages. The 2 examples I am looking at are: sudo apt-get install build-essential zlib1g zlib1g-dev zlibc libruby1.9 libxml2 libxml2-dev libxslt-dev and sudo apt-get install ruby irb ri rdoc ruby1.8-dev libzlib-ruby libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby libruby-extras libfcgi-ruby1.8 build-essential libopenssl-ruby libdbm-ruby libdbi-ruby libdbd-sqlite3-ruby sqlite3 libsqlite3-dev libsqlite3-ruby libxml-ruby libxml2-dev Thanks :adam

    Read the article

  • Specializating a template function that takes a universal reference parameter

    - by David Stone
    How do I specialize a template function that takes a universal reference parameter? foo.hpp: template<typename T> void foo(T && t) // universal reference parameter foo.cpp template<> void foo<Class>(Class && class) { // do something complicated } Here, Class is no longer a deduced type and thus is Class exactly; it cannot possibly be Class &, so reference collapsing rules will not help me here. I could perhaps create another specialization that takes a Class & parameter (I'm not sure), but that implies duplicating all of the code contained within foo for every possible combination of rvalue / lvalue references for all parameters, which is what universal references are supposed to avoid. Is there some way to accomplish this? To be more specific about my problem in case there is a better way to solve it: I have a program that can connect to multiple game servers, and each server, for the most part, calls everything by the same name. However, they have slightly different versions for a few things. There are a few different categories that these things can be: a move, an item, etc. I have written a generic sort of "move string to move enum" set of functions for internal code to call, and my server interface code has similar functions. However, some servers have their own internal ID that they communicate with, some use strings, and some use both in different situations. Now what I want to do is make this a little more generic. I want to be able to call something like ServerNamespace::server_cast<Destination>(source). This would allow me to cast from a Move to a std::string or ServerMoveID. Internally, I may need to make a copy (or move from) because some servers require that I keep a history of messages sent. Universal references seem to be the obvious solution to this problem. The header file I'm thinking of right now would expose simply this: namespace ServerNamespace { template<typename Destination, typename Source> Destination server_cast(Source && source); } And the implementation file would define all legal conversions as template specializations.

    Read the article

  • How to run an .exe application in another computer?

    - by ADAM
    I am working on a C# application in Visual Studio 2013. When I run the .exe file from my computer, the application runs very well and all the features work. When I tried to run the .exe on another computer, the database side doesn't work well and the connection with the database couldn't be opened. The SqlConnection is constructed as follows: SqlConnection cn = new SqlConnection("Data Source=ADAM-PC;Initial Catalog=integrationdatabase;Integrated Security=True" I don't know how to change the data source to make the connection with the database established in another computer. How can I solve this problem?

    Read the article

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