Search Results

Search found 276 results on 12 pages for 'stewart robinson'.

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

  • Javascript how can I trigger an event that was prevented

    - by Mike Robinson
    In my app a user clicks a link to another page. I'd like to track that in Omniture with a custom event, so I've bound the omniture s.t() event to the click event. How can I make certain the event fires before the next page is requested? I've considered event.preventDefault() on the click event of the link, but I actually want the original event to occur, just not immediately.

    Read the article

  • CSS- How to align background image over bottom border line? Jsfiddle included

    - by John Robinson
    I have an image I am trying to display over the top of a bottom border, but it is being arranged behind the bottom border element (in this example, named "divider"), and I can't get it to align correctly. I would like the image to be displayed in the middle of the the border element and over the top of it. Vertically, I am trying to get the 1px line on the left and right side of the image to align with the 1px border to appear as if it is one element. Here is the code: .divider { border-bottom: 1px solid #c3c3c3; clear: both; display: block; margin-bottom: 20px; padding-top: 20px; width: 100%; } .sidearrow { background: url(http://s16.postimage.org/sbf7v9n75/sidearrow.png) 50% 14px no-repeat; width: 100%; height: 25px; }? <p>Here is some content above</p> <div class="sidearrow"></div> <div class="divider"></div> <p>Here is some content below</p>? And the jsfiddle: http://jsfiddle.net/F5xjx/2/ Any ideas how to get this to work? Thanks in advance.

    Read the article

  • How I can I get my home network's IP address from a shell script?

    - by Steven Stewart-Gallus
    I have an account at a server at school, and a home computer that I need to work with sometimes. I have exchanged keys, and now only have one problem. While my school account has a name associated with it, "account_name@school", my home network does not. My plan is to have a script that every hour retrieves my home network's IP address, ssh'es into my school account and updates my ssh config file storing my home network's IP address. How can I retrieve my home computer's IP address from a shell script? P.S. Is this a sensible plan?

    Read the article

  • Ubuntu crashed, Eclipse lost .metadata, Java Perspective gone, missing, lost

    - by Stewart
    I am running Eclipse Galileo on Ubuntu 10.04 LTS. Ubuntu crashed on me today, and after rebooting, I found that Eclipse has completely lost the Java Perspective (it's like the perspective and all associated views never existed) and the .metadata dir in my workspace is empty except for version.ini. What's up with that? Why did it happen? How can I prevent it? How can I recover from it?

    Read the article

  • Putting $$s in the middle of an `equation` environment: why doesn't Latex complain?

    - by Charles Stewart
    I was surprised that the Latex code from a recent question didn't throw up any errors, and even more surprised on further investigation, that Crowley's explanation seems to be true. My intuition about the \begin{equation} ... \end{equation} code is clearly off, what's really going on? Consider this, slightly adapted code: \begin{equation} 1: e^{i\pi}+1=0 $$ 2: B\"ob $$ 3: e=mc^2 \end{equation} This seems to prove that Crowley's explanation of such code, namely that "What that code says to LaTeX is begin equation, end it, begin it again, typeset definition of tangens and end the equation" is right: lines 1&3 can only be typeset in maths mode, line 2 only in text mode. Shouldn't Latex see that the \end{equation} is ending a display math that wasn't started by the \begin{equation}?

    Read the article

  • LINQ .Cast() extension method fails but (type)object works.

    - by Ben Robinson
    To convert between some LINQ to SQL objects and DTOs we have created explicit cast operators on the DTOs. That way we can do the following: DTOType MyDTO = (LinqToSQLType)MyLinq2SQLObj; This works well. However when you try to cast using the LINQ .Cast() extension method it trows an invalid cast exception saying cannot cast type Linq2SQLType to type DTOType. i.e. the below does not work List<DTO.Name> Names = dbContact.tNames.Cast<DTO.Name>() .ToList(); But the below works fine: DAL.tName MyDalName = new DAL.tName(); DTO.Name MyDTOName = (DTO.Name)MyDalName; and the below also works fine List<DTO.Name> Names = dbContact.tNames.Select(name => (DTO.Name)name) .ToList(); Why does the .Cast() extension method throw an invalid cast exception? I have used the .Cast() extension method in this way many times in the past and when you are casting something like a base type to a derived type it works fine, but falls over when the object has an explicit cast operator.

    Read the article

  • Give the mount point of a path

    - by Charles Stewart
    The following, very non-robust shell code will give the mount point of $path: (for i in $(df|cut -c 63-99); do case $path in $i*) echo $i;; esac; done) | tail -n 1 Is there a better way to do this? Postscript This script is really awful, but has the redeeming quality that it Works On My Systems. Note that several mount points may be prefixes of $path. Examples On a Linux system: cas@txtproof:~$ path=/sys/block/hda1 cas@txtproof:~$ for i in $(df -a|cut -c 57-99); do case $path in $i*) echo $i;; esac; done| tail -1 /sys On a Mac osx system cas local$ path=/dev/fd/0 cas local$ for i in $(df -a|cut -c 63-99); do case $path in $i*) echo $i;; esac; done| tail -1 /dev Note the need to vary cut's parameters, because of the way df's output differs: indeed, awk is better. Answer It looks like munging tabular output is the only way within the shell, but df /dev/fd/impossible | tail -1 | awk '{ print $NF}' is a big improvement on what I had. Note two differences in semantics: firstly, df $path insists that $path names an existing file, the script I had above doesn't care; secondly, there are no worries about dereferncing symlinks. It's not difficult to write Python code to do the job.

    Read the article

  • Error on SQL insert statement

    - by Ashley Stewart
    I exported a recordset from one database into a csv file, and when I try to import it into another using mysql workbench I keep this this error message: Executing SQL script in server ERROR: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 'Lord it Over', 'Ben', '1993-03-01', 'TRC', NULL, 1983, '1999-09-01', 'NULL', '' at line 1 INSERT INTO `TRC`.`horse` (`horse_id`, `registered_name`, `stable_name`, `arrival_date`, `last_known_location`, `is_ex_racer`, `birth_year`, `death_date`, `horse_comments`, `sex`, `referral_date`, `horse_height`, `arrival_weight`, `passport_no`, `microchip_no`, `is_on_waiting_list`) VALUES (, 'Lord it Over', 'Ben', '1993-03-01', 'TRC', NULL, 1983, '1999-09-01', 'NULL', 'NULL', 'NULL', NULL, NULL, 'NULL', 'NULL', 0) SQL script execution finished: statements: 29 succeeded, 1 failed Fetching back view definitions in final form. Nothing to fetch Any help would be appreciated as their appears to be no errors as far as I can see.

    Read the article

  • Is there any way to group edit buttons in MediaWiki?

    - by Mark Robinson
    Is there any way to group the edit buttons displayed above the edit dialog in MediaWiki? By grouping, I mean like Word does (and even this editor) - you can add dividing lines to group them so that e.g. Bold and Italic are in one group, numbered list and bullet points in another. We've added lots of new buttons (in EditPage.php) and they are in a logical order, but at 30 buttons it is a bit overwhelming for some users.

    Read the article

  • I want to use contents of String or Array in an IF ELSE statement for iphone

    - by Michael Robinson
    I want to check to see if an array is empty to activate a shipping method. Here is the code for returning the array. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *fullFileName = [NSString stringWithFormat:@"%@/arraySaveFile", documentsDirectory]; NSMutableArray *array = [[NSMutableArray alloc] initWithContentsOfFile:fullFileName]; I want to write something like: if NSString *fullFileName ="" ; [nnNEP EnableShipping]; else [nnNEP DisableShipping]; OR if array contents ="" ; [nnNEP EnableShipping]; else [nnNEP DisableShipping]; I just can't find the right or description on how to do this properly. Thanks,

    Read the article

  • Building drag and drop interface on iphone

    - by John Stewart
    I am trying to build an app which will have a bunch of cards that the user needs to drag and drop them onto specific drop zones. How would one go about detecting this and if the card is not on the drop zone then it should slide back. Any suggestions on how to structure this app?

    Read the article

  • Shared static classes between AppDomains in loaded library code

    - by Christian Stewart
    I'm working on a program in which I want to do something similar to what the Photon Server system does: Offer a common "API" class library, which contains common data classes, enumerations, and interfaces for working with the host program. Have client programs (class libraries) reference this DLL and implement interfaces listed within it. Have the "host" application load built DLL client libraries into separate AppDomains and reference the interfaces that lie within to have polymorphic client code from within a dll file. I have something like this worked out: a class library that contains common code, but I've run into the following question How should I handle static classes? Should I add a method that is called by the host program to synchronize data? How do I keep a static class the same between AppDomains? Should I discard these classes in favor of better interfaces between the code levels? And in general, how do I share data between these loaded AppDomains?

    Read the article

  • Using variables for colors in table cells

    - by Mark Robinson
    Using the variables extension, I want to change the background color of a cell in a table. So far I've done this: {{#vardefine:green|<span style="background:Green; color:White">text</span>}} The problem is that, when I add {{#var:green}} to the cell, only the text itself has a green background. Ideally, I want the whole cell to have a background color, like it does if I use this: | bgcolor="#ff00ff" | test or this | style="background:silver" |silver in the cell. Does anyone know how to solve this?

    Read the article

  • What are the pitfalls to watch out for when upgrading MediaWiki?

    - by Mark Robinson
    We've got MediaWiki 1.13.2 and we'll soon be upgrading to the latest & greatest version (probably 1.16). We've got lots of extensions installed (for which we'll probably also need to get the latest versions) and we've done some minor configuring (e.g. adding new edit buttons). What should we watch out for during the upgrade? And what should we test? Does anyone have any experience of things that went wrong?

    Read the article

  • vnc application for iPhone. How to go about building one?

    - by John Stewart
    Alright.. I am on a mission to learn iPhone development as much as possible. At my current job they have requested me if I can build a vnc viewer in iPhone.. there are many vnc apps but i want to learn how to build an app like that.. what would be the architecture of this app how should i organize my app? Any thoughts? comments?

    Read the article

  • XPath selection from path in XML content

    - by Wayne Robinson
    I have the following XML: <root> <name>The name</name> <long> <path> <value>Some Value</value> </path> </long> <field>/root/name</field> <field>/root/long/path/value</field> </root> and I want to select these paths in the field tags however, when I try the following: <xsl:value-of select="/root/field[1]" /> all I get is the text value of the field. Is there a way of selecting the correct node from those values?

    Read the article

  • How to Transfer Large File from MS Word Add-In (VBA) to Web Server?

    - by Ian Robinson
    Overview I have a Microsoft Word Add-In, written in VBA (Visual Basic for Applications), that compresses a document and all of it's related contents (embedded media) into a zip archive. After creating the zip archive it then turns the file into a byte array and posts it to an ASMX web service. This mostly works. Issues The main issue I have is transferring large files to the web site. I can successfully upload a file that is around 40MB, but not one that is 140MB (timeout/general failure). A secondary issue is that building the byte array in the VBScript Word Add-In can fail by running out of memory on the client machine if the zip archive is too large. Potential Solutions I am considering the following options and am looking for feedback on either option or any other suggestions. Option One Opening a file stream on the client (MS Word VBA) and reading one "chunk" at a time and transmitting to ASMX web service which assembles the "chunks" into a file on the server. This has the benefit of not adding any additional dependencies or components to the application, I would only be modifying existing functionality. (Fewer dependencies is better as this solution should work in a variety of server environments and be relatively easy to set up.) Question: Are there examples of doing this or any recommended techniques (either on the client in VBA or in the web service in C#/VB.NET)? Option Two I understand WCF may provide a solution to the issue of transferring large files by "chunking" or streaming data. However, I am not very familiar with WCF, and am not sure what exactly it is capable of or if I can communicate with a WCF service from VBA. This has the downside of adding another dependency (.NET 3.0). But if using WCF is definitely a better solution I may not mind taking that dependency. Questions: Does WCF reliably support large file transfers of this nature? If so, what does this involve? Any resources or examples? Are you able to call a WCF service from VBA? Any examples?

    Read the article

  • Qt XQuery into a QStringList

    - by Stewart
    Hi, I'm trying to use QtXmlQuery to extract some data from XML. I'd like to put this into a QStringList. I try the following: QByteArray in = "this is where my xml lives"; QBuffer received; received.setData(in); received.open(QIODevice::ReadOnly); QXmlQuery query; query.bindVariable("data", &received); query.setQuery(NAMESPACE //contains definition of the t namespace "doc($data)//t:service/t:serviceID/text()"); QBuffer outb; outb.open(QIODevice::ReadWrite); QXmlSerializer s(query, &outb); query.evaluateTo(&s); qDebug() << "buffer" << outb.data(); //This works perfectly! QStringList * queryResult = new QStringList(); query.evaluateTo(queryResult); qDebug() << "string list" << *queryResult; //This gives me no output! As you can see, everything works fine when I send the output into a QBuffer via a QXmlSerializer... but I get nothing when I try to use a QStringList.

    Read the article

  • Are comonads a good fit for modeling the Wumpus world?

    - by Tim Stewart
    I'm trying to find some practical applications of a comonad and I thought I'd try to see if I could represent the classical Wumpus world as a comonad. I'd like to use this code to allow the Wumpus to move left and right through the world and clean up dirty tiles and avoid pits. It seems that the only comonad function that's useful is extract (to get the current tile) and that moving around and cleaning tiles would not use be able to make use of extend or duplicate. I'm not sure comonads are a good fit but I've seen a talk (Dominic Orchard: A Notation for Comonads) where comonads were used to model a cursor in a two-dimensional matrix. If a comonad is a good way of representing the Wumpus world, could you please show where my code is wrong? If it's wrong, could you please suggest a simple application of comonads? module Wumpus where -- Incomplete model of a world inhabited by a Wumpus who likes a nice -- tidy world but does not like falling in pits. import Control.Comonad -- The Wumpus world is made up of tiles that can be in one of three -- states. data Tile = Clean | Dirty | Pit deriving (Show, Eq) -- The Wumpus world is a one dimensional array partitioned into three -- values: the tiles to the left of the Wumpus, the tile occupied by -- the Wumpus, and the tiles to the right of the Wumpus. data World a = World [a] a [a] deriving (Show, Eq) -- Applies a function to every tile in the world instance Functor World where fmap f (World as b cs) = World (fmap f as) (f b) (fmap f cs) -- The Wumpus world is a Comonad instance Comonad World where -- get the part of the world the Wumpus currently occupies extract (World _ b _) = b -- not sure what this means in the Wumpus world. This type checks -- but does not make sense to me. extend f w@(World as b cs) = World (map world as) (f w) (map world cs) where world v = f (World [] v []) -- returns a world in which the Wumpus has either 1) moved one tile to -- the left or 2) stayed in the same place if the Wumpus could not move -- to the left. moveLeft :: World a -> World a moveLeft w@(World [] _ _) = w moveLeft (World as b cs) = World (init as) (last as) (b:cs) -- returns a world in which the Wumpus has either 1) moved one tile to -- the right or 2) stayed in the same place if the Wumpus could not move -- to the right. moveRight :: World a -> World a moveRight w@(World _ _ []) = w moveRight (World as b cs) = World (as ++ [b]) (head cs) (tail cs) initWorld = World [Dirty, Clean, Dirty] Dirty [Clean, Dirty, Pit] -- cleans the current tile cleanTile :: Tile -> Tile cleanTile Dirty = Clean cleanTile t = t Thanks!

    Read the article

  • How do you pull the URL for an ASP.NET web reference from a configuration file in Visual Studio 2008

    - by Ian Robinson
    I have a web reference for our report server embedded in our application. The server that the reports live on could change though, and I'd like to be able to change it "on the fly" if necessary. I know I've done this before, but can't seem to remember how. Thanks for your help. update - I've manually driven around this for the time being. It's not a big deal to set the URL in the code, but I'd like to figure out what the "proper" way of doing this in VS 2008 is. Could anyone provide any further insights? Thanks!

    Read the article

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