Search Results

Search found 1971 results on 79 pages for 'matt roberts'.

Page 9/79 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Why can XSLT not parse this XML?

    - by Matt W
    Taking the XSLT and XML from this page as an example: http://www.w3schools.com/xsl/xsl_transformation.asp I have an xml file which contains (above example modified): <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?> <catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/"> <cd> In my case, the output contains nothing when the XSLT/XML is processed by the browser. The moment I remove the attributes from the element, it works. Problem is, I don't really have the option of pre-processing those attributes out of the file. Can anyone explain how to force the XSLT to work with the XML as is, please? After all, those attributes seem fairly standard. Many thanks, Matt.

    Read the article

  • Trouble with __VA_ARGS__

    - by Noah Roberts
    C++ preprocessor __VA_ARGS__ number of arguments The accepted answer there doesn't work for me. I've tried with MSVC++ 10 and g++ 3.4.5. I also crunched the example down into something smaller and started trying to get some information printed out to me in the error: template < typename T > struct print; #include <boost/mpl/vector_c.hpp> #define RSEQ_N 10,9,8,7,6,5,4,3,2,1,0 #define ARG_N(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,N,...) N #define ARG_N_(...) ARG_N(__VA_ARGS__) #define XXX 5,RSEQ_N #include <iostream> int main() { print< boost::mpl::vector_c<int, ARG_N_( XXX ) > > g; // ARG_N doesn't work either. } It appears to me that the argument for ARG_N ends up being 'XXX' instead of 5,RSEQ_N and much less 5,10,...,0. The error output of g++ more specifically says that only one argument is supplied. Having trouble believing that the answer would be proposed and then accepted when it totally fails to work, so what am I doing wrong? Why is XXX being interpreted as the argument and not being expanded? In my own messing around everything works fine until I try to pass off VA_ARGS to a macro containing some names followed by ... like so: #define WTF(X,Y,...) X , Y , __VA_ARGS__ #define WOT(...) WTF(__VA_ARGS__) WOT(52,2,5,2,2) I've tried both with and without () in the various macros that take no input.

    Read the article

  • Doxygen - <X>:1: warning: return type of member X is not documented

    - by Matt Clarkson
    /*! \var GLOBAL_VAR * \brief This is my global initialisation array for MY_STRUCT */ MY_STRUCT GLOBAL_VAR = { 1, 3, 2, 1, }; I get the following error: <GLOBAL_VAR>:1: warning: return type of member GLOBAL_VAR is not documented But this shouldn't have any return type?! If I do either of the following the warning goes away: /*! \var GLOBAL_VAR * \brief This is my global initialisation array for MY_STRUCT * \returns */ MY_STRUCT GLOBAL_VAR = { 1, 3, 2, 1, }; Or: /*! \var GLOBAL_VAR * \brief This is my global initialisation array for MY_STRUCT */ MY_STRUCT GLOBAL_VAR = 3; The isn't very useful as it puts a "Returns" into my HTML documentation and the second one breaks my code! How do I remove this warning? Thanks Matt

    Read the article

  • Handle order dependence in for loops

    - by Matt
    Hey all, I'm making a templating system where I instantiate each tag using a foreach loop. The issue is that some of the tags rely on each other so, I'm wondering how to get around that ordering from the looping. Here's an example: Class A { public $width; __construct() { $this->width = $B->width(); // Undefined! Or atleast not set yet.. } } Class B { private $width; __construct() { $this->width = "500px"; } __tostring() { return "Hello World!"; } } Template.php $tags = array("A", "B"); foreach ($tags as $tag) { $TagObj[$tag] = new $tag(); } echo $TagObj['A']->width; // Nadamundo! I know this has applications elsewhere and I'm sure this has been solved before, if someone could enlighten me or point me in the right direction that'd be great! Thanks! Matt Mueler

    Read the article

  • Joining different models in Django

    - by Andrew Roberts
    Let's say I have this data model: class Workflow(models.Model): ... class Command(models.Model): workflow = models.ForeignKey(Workflow) ... class Job(models.Model): command = models.ForeignKey(Command) ... Suppose somewhere I want to loop through all the Workflow objects, and for each workflow I want to loop through its Commands, and for each Command I want to loop through each Job. Is there a way to structure this with a single query? That is, I'd like Workflow.objects.all() to join in its dependent models, so I get a collection that has dependent objects already cached, so workflows[0].command_set.get() doesn't produce an additional query. Is this possible?

    Read the article

  • How can I return a sql select into a sql variable

    - by Matt
    Hi, I'm trying to put the results of a SELECT into a variable and loop through the results to manipulate that data, all in the same stored proceedure... Here's what I have so far: DECLARE @i int @Result = (SELECT * FROM UserImport) SET @i = 0 WHILE @i < (SELECT Count(@Result) As Count) BEGIN /* Do Stuff */ END I know I'm way off because it's saying @Result was not declared, but I'm not sure how to declare a variable to be able to hold the results of a SELECT statement. Can anyone tell me where i'm going wrong and how to fix it? Thanks, Matt

    Read the article

  • How can I prevent SerializeJSON from changing Yes/No/True/False strings to boolean?

    - by Dan Roberts
    I have a data struct being stored in JSON format, converted using the serializeJSON function. The problem I am running into is that strings that can be boolean in CF such as Yes,No,True,and False are converted into JSON as boolean values. Below is example code. Any ideas on how to prevent this? Code: <cfset test = {str='Yes'}> <cfset json = serializeJSON(test)> <cfset fromJSON = deserializeJSON(json)> <cfoutput> #test.str#<br> #json#<br> #fromJSON.str# </cfoutput> Result: Yes {"STR":true} YES

    Read the article

  • Javascript to pull formatted data

    - by Dusty Roberts
    Hi there I have a recruitment portal that people can use to advertise and search for jobs. I would like the recruiters to be able to add a small javascript snippet to their personal websites, that will list jobs on my site. how can i go about this? I have webservices set up so the javascript can just call that, but i also need the result to be formatted and placed inline. This should work in a simular way to google adsense. I would really appreciate a small example

    Read the article

  • not getting output from parmiko/ssh command

    - by Matt
    I am using paramiko/ssh/python to attempt to run a command on a remote server. When I ssh manually and run the command in question, I get the results I want. But if I use the python (co-opted from another thread on this site) below, there is no returned data. If I modify the command to be something more basic like 'pwd' or 'ls' I can then get the output. Any help is appreciated. Thanks, Matt import paramiko import time import sys, os, select import select username='medelman' password='Ru5h21iz' hostname='10.15.27.166' hostport=22 cmd='tail -f /x/web/mlog.txt' #works cmd='' #doesn't work client = paramiko.SSHClient() client.load_system_host_keys() client.connect(hostname=hostname, username=username, password=password) transport = client.get_transport() channel = transport.open_session() channel.exec_command(cmd) while True: rl, wl, xl = select.select([channel],[],[],0.0) if len(rl) 0: # Must be stdout print channel.recv(1024) time.sleep(1)

    Read the article

  • What is the Browser version of a WebBrowser control in Windows Forms

    - by Chris Roberts
    I'm building a Windows Forms application which makes use of the WebBrowser control. Can anyone tell me what rendering engine the control uses? Is it fixed based on the version of the .NET framework I'm developing against or is it based on the version of IE installed on the client's machine? Does the client even need IE? In other words, if a website looks right in my application on my machine, is it reasonably safe to assume it'll render right on everyone else's machine? Thanks!

    Read the article

  • How am I supposed to deploy an ASP.NET MVC 4.0 website?

    - by Matt Frear
    What's the recommended way to deploy a website created with ASP.NET 4.0 and Visual Studio 2010? I've previously always added a web setup project to my solution, and used that to create an MSI, even for small applications. But when I build a web setup project in VS2010 it kind of works but some stuff still seems broken: 1. I need to turn on IIS 6 Compatibility on a Win 2008 R2 box to get the msi to run. 2. The msi includes web.config, web.debug.config, and web.release.config. I thought VS's web.config transformations was supposed to take care of that. -Matt

    Read the article

  • Qt and variadic functions

    - by Noah Roberts
    OK, before lecturing me on the use of C-style variadic functions in C++...everything else has turned out to require nothing short of rewriting the Qt MOC. What I'd like to know is whether or not you can have a "slot" in a Qt object that takes an arbitrary amount/type of arguments. The thing is that I really want to be able to generate Qt objects that have slots of an arbitrary signature. Since the MOC is incompatible with standard preprocessing and with templates, it's not possible to do so with either direct approach. I just came up with another idea: struct funky_base : QObject { Q_OBJECT funky_base(QObject * o = 0); public slots: virtual void the_slot(...) = 0; }; If this is possible then, because you can make a template that is a subclass of a QObject derived object so long as you don't declare new Qt stuff in it, I should be able to implement a derived templated type that takes the ... stuff and turns it into the appropriate, expected types. If it is, how would I connect to it? Would this work? connect(x, SIGNAL(someSignal(int)), y, SLOT(the_slot(...))); If nobody's tried anything this insane and doesn't know off hand, yes I'll eventually try it myself...but I am hoping someone already has existing knowledge I can tap before possibly wasting my time on it.

    Read the article

  • SimpleXML adding html into Hash tree

    - by Miriam Raphael Roberts
    Question: I have an xml file that I am pulling from the web and parsing. One of the items in the xml is a 'content' value that has HTML. I am using SimpleXML/XMLin to parse the file like so: $xml= eval { $data-XMLin($xmldata, forcearray = 1, suppressempty= +'') }; When I use Dumper to dump the hash, I dsicovered that SimpleXML is parsing the HTML into the hash tree. 'content' => { 'div' => [ { 'xmlns' => 'http://www.w3.org/1999/xhtml', 'p' => [ { 'a' => [ { 'href' => 'http://miamiherald.typepad.com/.a/6a00d83451b26169e20133ec6f4491970b-pi', 'style' => 'FLOAT: left', 'img' => [ etc..... This is not what I want. I want to just grab content inside of this entry. How do I do this?

    Read the article

  • Basic Login Script using php and mysql inquiry

    - by Matt
    Attempting to write a check for a login script to see if the username is available. Would the best way to write this query be to check if isset(!_POST[]) for both values (nick and pass) then connect to database WHERE the mysql database for the usernick requested return the user id if the usernick exists evaluate if isset($id) to see if the user name is taken and use that to continue to creating an entry Does this logically sound like a method to check for login without using excessive code sorry for not posting the code, it is on another computer and this computer is locked down by my administrator at work... Also, is there another way to evaluate if a value exists in the database? For instance, instead of setting $id to the return value of the mysql database can i just ping the mysql database for the information and have it return a Boolean result so I am not putting out any user information. Thanks, Matt

    Read the article

  • How is your Mac set up for Windows development?

    - by Matt Brailsford
    Hi Guys, I'm looking at buying a MacBook Pro to replace my tiring laptop. My day to day job is as a .NET web developer so I am looking to use VMware Fusion to run VS and SQL server etc. As I've not run my dev environment in a VM before, I would like to know how others are setup. What apps to you have installed? In which environment? Where do you store your files? Within each environment, or some shared drive? Are there any gotchas? Or essentials I should know. Many thanks Matt

    Read the article

  • Inserting newlines into a GtkTextView widget (GTK+ programming)

    - by Mark Roberts
    I've got a button which when clicked copies and appends the text from a GtkEntry widget into a GtkTextView widget. (This code is a modified version of an example found in the "The Text View Widget" chapter of Foundations of GTK+ Development.) I'm looking to insert a newline character before the text which gets copied and appended, such that each line of text will be on its own line in the GtkTextView widget. How would I do this? I'm brand new to GTK+. Here's the code sample: #include <gtk/gtk.h> typedef struct { GtkWidget *entry, *textview; } Widgets; static void insert_text (GtkButton*, Widgets*); int main (int argc, char *argv[]) { GtkWidget *window, *scrolled_win, *hbox, *vbox, *insert; Widgets *w = g_slice_new (Widgets); gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "Text Iterators"); gtk_container_set_border_width (GTK_CONTAINER (window), 10); gtk_widget_set_size_request (window, -1, 200); w->textview = gtk_text_view_new (); w->entry = gtk_entry_new (); insert = gtk_button_new_with_label ("Insert Text"); g_signal_connect (G_OBJECT (insert), "clicked", G_CALLBACK (insert_text), (gpointer) w); scrolled_win = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (scrolled_win), w->textview); hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start_defaults (GTK_BOX (hbox), w->entry); gtk_box_pack_start_defaults (GTK_BOX (hbox), insert); vbox = gtk_vbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0); gtk_container_add (GTK_CONTAINER (window), vbox); gtk_widget_show_all (window); gtk_main(); return 0; } /* Insert the text from the GtkEntry into the GtkTextView. */ static void insert_text (GtkButton *button, Widgets *w) { GtkTextBuffer *buffer; GtkTextMark *mark; GtkTextIter iter; const gchar *text; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (w->textview)); text = gtk_entry_get_text (GTK_ENTRY (w->entry)); mark = gtk_text_buffer_get_insert (buffer); gtk_text_buffer_get_iter_at_mark (buffer, &iter, mark); gtk_text_buffer_insert (buffer, &iter, text, -1); } You can compile this command (assuming the file is named file.c): gcc file.c -o file `pkg-config --cflags --libs gtk+-2.0` Thanks everybody!

    Read the article

  • How to rewrite url to include subdirectory?

    - by Jason Roberts
    The following set of rewrite rules rewrite any urls formatted as foo.mydomain.com/bar to mydomain.com/mysubs/foo/bar.php. This all works fine except if I have a subdirectory named 'blah' in the original url such as foo.mydomain.com/blah/bar, then it will rewrite it as mydomain.com/mysubs/foo/bar (without the blah subdirectory) when what I need is the url to be rewritten as mydomain.com/mysubs/foo/blah/bar. So, what do I need to change to make this work correctly? Options +FollowSymLinks Options -Indexes RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !www.mydomain.com$ [NC] RewriteCond %{HTTP_HOST} ^([^./]+)\.mydomain\.com$ RewriteRule !^mysubs/ mysubs/%1%{REQUEST_URI} [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php

    Read the article

  • Flash causing jerky javascript animations

    - by Matt Brailsford
    Hi Guys, I'm developing a site which has a flash background playing a small video loop scaled to fill the whole background. Over the top I have a number of HTML elements which are animated using javascript. The problem I am having is that (predominantly in FF, but also in others to a lesser degree) the flash seems to be causing my javascript animations to run rather jerky, and in some cases missing the animation altogether and just jumping to the end state. Does anybody have any thoughts on how to make the 2 work together nicely? Many thanks Matt

    Read the article

  • PHP: session isnt saving before header redirect

    - by Matt
    Hi guys, I have read through the php manual for this problem and it seems quite a common issue but i have yet to find a solution. I am saving sessions in a database. My code is as follows: // session $_SESSION['userID'] = $user->id; header('Location: /subdirectory/index.php'); Then at the top of index.php after the session_start(), i have var_dumped the $_SESSION global and the userID is not in there. As i said ive looked through the PHP manual (http://php.net/manual/en/function.session-write-close.php) and neither session_write_close or session_regenerate_id(true) worked for me. Does anybody know a solution? Edit: I have session_start() at the top of my file. When i var_dump the session global before the header redirect, i see the userID in there, but not in the other file, which is in a subdirectory of this script Thanks, Matt

    Read the article

  • Vim error E492: Not an editor command: dd

    - by Roberts Jameson
    I started learning vim today and installed it using sudo apt-get install vim Now, when I try to do something like :5dd it gives me the not an editor command error. I'm not sure why this is. Am I doing anything wrong? I looked at tutorials and everywhere I look I see that 5dd is a valid command.

    Read the article

  • Really new to XCode. Why won't the thing run?

    - by Matt W
    Hi, I'm trying to follow the April 2009 and Winter 2010 Stanford iPhone app development videos and I'm running up against the same problems with both. First, they don't appear to be using the latest version of XCode - the Outlets and Actions panels are in a different window and there is little info on the net about this (other than one other post on S.O.F.) Second, having got to the point where I've managed to connect the slider, label and changedLabelText connections, I save, build and run the app - the simulator loads, the app loads and then promptly closes again. What's going on? I have not written any code yet and I still have an app which, while it compiles, does not behave! Is there a better starting point for an XCode noob than the Stanford vids? Thanks, Matt.

    Read the article

  • view handler design pattern

    - by Mark Roberts
    I'm trying to figure out the origin of the view handler design pattern in software engineering. Many of the design patterns in software engineering were inspired by things which pre-date computers, and I was wondering if anybody had any insights on the origin of this particular pattern.

    Read the article

  • WPF UserControl Embedded Animation

    - by Matt B
    Hi all, I have a UserControl called Beetle.xaml which has animation makeing the legs move. So far so good. I added this to my Background.xaml page by decaring the xmlns and xaml as: xmlns:my="clr-namespace:Intellident.Liber8.GUI.Theme.Jungle" and <my:Beetle VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="180,0,0,175"> <UserControl.RenderTransform> <MatrixTransform x:Name="trnBeetle" /> </UserControl.RenderTransform> </my:Beetle> However I get errors telling me that I can't declare my:Name as I'm in the wrong scope. I can't declare my:Name as this doesn't exist. How do I do this, I want to create a path animation on the beetle to make him walk around... Ta, Matt. EDIT: THought I'd point out that both Beetle.xaml and Background.xaml live in Intellident.Liber8.GUI.Theme.Jungle namescope.

    Read the article

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