Search Results

Search found 675 results on 27 pages for 'kyle brandt'.

Page 18/27 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • How can I select this element?

    - by Kyle Sevenoaks
    Hi, I have code blindness, it's like snowblindness, just wth far too much code. I have a div class dynamically generated, <div class="even last"> How can I select that with CSS? div.even last { background-color:#ffffff; height:100%; border-top:1px solid #F5F5F5; padding:2px; margin-top:35px; } Doesn't seem to work, and I just can't think more.. Thanks :)

    Read the article

  • How to Elegantly convert switch+enum with polymorphism

    - by Kyle
    I'm trying to replace simple enums with type classes.. that is, one class derived from a base for each type. So for example instead of: enum E_BASE { EB_ALPHA, EB_BRAVO }; E_BASE message = someMessage(); switch (message) { case EB_ALPHA: applyAlpha(); case EB_BRAVO: applyBravo(); } I want to do this: Base* message = someMessage(); message->apply(this); // use polymorphism to determine what function to call. I have seen many ways to do this which all seem less elegant even then the basic switch statement. Using dyanimc_pointer_cast, inheriting from a messageHandler class that needs to be updated every time a new message is added, using a container of function pointers, all seem to defeat the purpose of making code easier to maintain by replacing switches with polymorphism. This is as close as I can get: (I use templates to avoid inheriting from an all-knowing handler interface) class Base { public: template<typename T> virtual void apply(T* sandbox) = 0; }; class Alpha : public Base { public: template<typename T> virtual void apply(T* sandbox) { sandbox->applyAlpha(); } }; class Bravo : public Base { public: template<typename T> virtual void apply(T* sandbox) { sandbox->applyBravo(); } }; class Sandbox { public: void run() { Base* alpha = new Alpha; Base* bravo = new Bravo; alpha->apply(this); bravo->apply(this); delete alpha; delete bravo; } void applyAlpha() { // cout << "Applying alpha\n"; } void applyBravo() { // cout << "Applying bravo\n"; } }; Obviously, this doesn't compile but I'm hoping it gets my problem accross.

    Read the article

  • Seeking through a streamed MP3 file with HTML5 <audio> tag

    - by Kyle Slattery
    Hopefully someone can help me out with this. I'm playing around with a node.js server that streams audio to a client, and I want to create an HTML5 player. Right now, I'm streaming the code from node using chunked encoding, and if you go directly to the URL, it works great. What I'd like to do is embed this using the HTML5 <audio> tag, like so: <audio src="http://server/stream?file=123"> where /stream is the endpoint for the node server to stream the MP3. The HTML5 player loads fine in Safari and Chrome, but it doesn't allow me to seek, and Safari even says it's a "Live Broadcast". In the headers of /stream, I include the file size and file type, and the response gets ended properly. Any thoughts on how I could get around this? I certainly could just send the whole file at once, but then the player would wait until the whole thing is downloaded--I'd rather stream it.

    Read the article

  • disable browser autocomplete for ajax:AutoCompleteExtender

    - by Kyle
    I'm using the .net ajaxtoolkit control AutoCompleteExtender. It works great but my firefox autocomplete overrides the values that the extender is returning (the firefox one lays on top of the control's). is there a way to disable the browser's version of autocomplete so that the .net one takes precendence?

    Read the article

  • How to calculate totals with smarty php

    - by Kyle Sevenoaks
    Hi, I have a list of "before discount" prices on my checkout, I want to calculate the total amount of these in a new div at the bottom.. Any ideas? What I want to calculate: {if $item.Product.formattedListPrice} <div id="salg" title="Rabatt"></div> {/if} <div id="cart2Salg"> {if $item.Product.formattedListPrice} <span class="listPrice" title="Opprinnelige prisen"> {$item.Product.formattedListPrice.$currency} </span> {else} <span class="listPrice"> </span> {/if} </div> And how I tried to calculate it: {foreach $item.Product.formattedListPrice.$currency as $savedtotal} <div id="savedtotals"> {$savedtotal.formattedAmount.$currency}</div> {/foreach} Thanks.

    Read the article

  • how to templatize partial template specializations?

    - by Kyle
    I'm not even sure what title to give this question; hopefully the code will demonstrate what I'm trying to do: #include <string> #include <list> using namespace std; template<typename A> class Alpha { public: A m_alpha_a; }; template<typename B> class Bravo { public: B m_bravo_b; }; template<> class Alpha<string> { public: string m_alpha_string; }; template<typename B> template<> class Alpha<Bravo<B> > { public: Bravo<B> m_bravo_class; // Line A }; int main() { Alpha<int> alpha_int; alpha_int.m_alpha_a= 4; Alpha<string> alpha_string; alpha_string.m_alpha_string = "hi"; Alpha<Bravo<int> > alpha_bravo_int; alpha_bravo_int.m_bravo_class.m_bravo_b = 9; }; I want to write a specialization for Alpha<A> when A is of any type Bravo<B>, but the compiler says invalid explicit specialization before ‘’ token enclosing class templates are not explicitly specialized (Referring to // Line A.) What's the correct syntax to do what I want?

    Read the article

  • Apache mod-vhost-alias question

    - by Kyle
    Hello! I was wondering if you could use a wildcard in the VirtualDocumentRoot directive. I mean is it possible to scan multiple directories with the VirtualDocumentRoot, like multiple home directories to look for sites?

    Read the article

  • Messy bash variable

    - by Kyle
    I'm writing a script to ssh in to a list of machines and compare a variable to another value.. I've run into a problem (I have a couple workarounds, but at this point I'm just wondering why this method isn't working). VAR=ssh $i "awk -F: '/^bar/ {print \$2}' /local/foo.txt" ($i would be a hostname. The hosts are trusted, no password prompt is given) Example of foo.txt: foo:123456:abcdef bar:789012:ghijkl baz:345678:mnopqr I'm assuming it's a problem with quotes, or \'s needed somewhere. I've tried several methods (different quoting, using $() instead of ``, etc) but can't seem to get it right. My script is working correctly using the following: VAR=ssh $i "grep bar /local/foo.txt" | awk -F: '{print \$2}' Like I said, just a curiousity, any response is appreciated.

    Read the article

  • Super simple CSS tooltip in a table, why is it not displaying and can I make it work?

    - by Kyle Sevenoaks
    Hi, I have been trying to implement many different tooltips on this page for my client, he's adamant that we have a picture of the product show up when you hover over the product name in the order page. I decided to use the super simple CSS tooltip, it's very easy to implement and does exactly what we want. It works on a dynamic page, the others I tried didn't. I have made an example here: CSS tooltip in table example. This page used to be displayed using divs, I have since changed it to a table, as it's tabular data and easier to work with. It worked fine when it used divs, now it's in a table, it won't display the span on hover. My questions are: Why is it not working? How can I make it work? If not, does anyone know another super easy to implement tooltip that can work properly on a dynamic page? Here's the DIV tooltip for reference: DIV display tooltip. Edit: Just noticed it kinda half works in IE8. Thanks.

    Read the article

  • FindControl() from UserControl inside a for loop

    - by Kyle
    I'm creating a usercontrol that will have a series of LinkButtons. I've declared all of my link buttons at the top of my class LinkButton LB1 = new LinkButton(); LinkButton LB2 = new LinkButton(); //... LinkButton LB9 = new LinkButton(); now I'd like to be able to create a loop to access all of those link buttons so I don't have to write them all out every time. I tried something like this within my overridden CreateChildControls() method: for (int i = 1; i < 10; i++) { LinkButton lb = (LinkButton)FindControl("LB" + i.ToString()); lb.Text = i.ToString() + "-Button"; } I keep getting an exception saying that lb.Text... is not set to an instance of an object. I also tried giving all of my LB1, LB2 etc valid Ids. ie: LB1.ID = "LB1"; still not dice. how can I do this?

    Read the article

  • iPhone Human Interface Guidelines question

    - by Kyle
    iPhone Human Interface Guidelines -- Do they apply for OpenGL games? GL games typically have custom buttons, custom lists, etc. Take the Quake player list for example, if ported, it wouldnt be a typical UI list object. Does this mean the reviewer in question would reject anything that wasn't using standard UI? Or, is there an exception for games.

    Read the article

  • jQuery tooltips on a dynamically generated page.

    - by Kyle Sevenoaks
    Him I'm trying to add a jQuery tooltip to a dynamically generated list, the text I want to display the tooltip on is in a table, so my CSS tooltip doesn't work: CSS tooltip. I tried to add this jQuery tooltip to the page, it works on my local test page, but I think the problem has something to do with uniqur ids, and I'm not sure how to implement the bind all function explained there: "To bind all of the targets to their corresponding content, it takes only one line: $(".tooltip-target").ezpz_tooltip(); Calling ezpz_tooltip() on a class will bind the hover event to each element, and because of the naming convention it will know which content to display." Can someone help me to understand what exactly I have to do to make this work on a dynamic page? The page is Euroworker's checkout product page. (You'll have to add some items to the basket, click the home button on the left of the bnav bar and click the little white button "kjøp" then the orange button "handlevogn".) Thanks.

    Read the article

  • Accomplishing boost::shared_from_this() in constructor via boost::shared_from_raw(this)

    - by Kyle
    Googling and poking around the boost code, it appears that it's now possible to construct a shared_ptr to this in a constructor, by inheriting from enable_shared_from_raw and calling shared_from_raw(this) Is there any documentation or examples of this? I'm finding nothing with google. Why am I not finding any useful buzz on this on google? I would have thought using shared_from_this in a constructor would be a hot/desirable item. Should I be inheriting from both enable_shared_from_raw and enable_shared_from_this, and restricting my usage of enable_shared_from_raw when I have to? If so, why? Is there a performance hit with shared_from_raw?

    Read the article

  • Updating and Editing Google Contacts - Ruby Gem

    - by Kyle
    I'm attempting to interact with the Google contacts API through Rails via and oauth-plugin. I need to retrieve and update Google contacts. I know that the portablecontacts gem will retrieve contacts, but does not allow for adding or updating. I was wondering if anyone knew of a gem that will handle this type of interaction. If not what would be the best method to implement a gem that would make it easier to handle the responses.

    Read the article

  • Trouble using genericra to integrate activemq and glassfish when using failover protocol

    - by Kyle
    Hi, I'm attempting to use activemq in glassfish using the genericra resource adapter provided with glassfish 2.1. I have found a few pages with helpful information including http://activemq.apache.org/sjsas-with-genericjmsra.html. I have actually had success and been able to get MDBs to use activemq as their JMS provider, but I'm running into an issue as I'm trying to do some more complicated configuration. I want to set up a master-slave configuration, which would require my clients to use a brokerURL of failover:(tcp://broker1:61616,tcp://broker2:61616). In order to do this, I set the following property when calling asadmin create-resource-adapter-config (I have to escape '=' and ':'): ConnectionFactoryProperties=brokerURL\=failover\:(tcp\://127.0.0.1\:61616,tcp://127.0.0.1\:61617) However, I am now getting a StringIndexOutOfBoundsException when my application starts up. I suspect the comma in between the two URLs is the culprit, since this works fine: brokerURL\=failover\:(tcp\://127.0.0.1\:61616) Just wondering if anyone has dealt with this issue before. Also wondering if there is a better way to integrate with glassfish than using the generic resource adapter.

    Read the article

  • capistrano put() and upload() both failing

    - by Kyle
    With capistrano, I am deploying a Rails application from Mac OS X 10.5 to CentOS 5.2 Note that deploy.rb and the server environment have not changed in over a year. There is a task within our deploy.rb file called upload: put(File.read( file ),"#{shared_path}/#{filename}", :via => :scp) This fails each and every time with the following exception: No such file or directory - /srv/ourapp/releases/20100104194410/config/database.yml My local copy of config/database.yml is failing to upload properly. I've verified it's not our internet connection, as this happens on three different connections and two different systems. I've also tried to swap out put() for upload() but get the same result; also, dropping :via = :scp, and/or trying to force :sftp instead similarly fails. Relevant info: $ cap -V Capistrano v2.5.10 $ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0]

    Read the article

  • Checkbox show error.

    - by Kyle Sevenoaks
    Hi, I need to make this show an error if the user tries to leave the page without checking this tickbox. It has no other use other than visual, is there a way to implement such a thing? <span> <input value="1" type="checkbox" name="salgsvilkar" ID="checkbox2" style="float:left;" onclick="document.getElementById('scrollwrap').style.cssText=' border-color:#85c222; background-color:#E5F7C7;';" /> <label for="checkbox2" class="akslabel"> Salgs og leveringsvilkår er lest og akseptert </label> </span> CSS is just for styling. Thanks.

    Read the article

  • awk/sed/bash to merge data

    - by Kyle
    Trying to merge some data that I have. The input would look like so: foo bar foo baz boo abc def abc ghi And I would like the output to look like: foo bar baz boo abc def ghi I have some ideas using some arrays in a shell script, but I was looking for a more elegant or quicker solution.

    Read the article

  • Java wysiwyg HTML Editor

    - by Kyle
    Hello, I'm working on a project and need a simple free java HTML wysiwyg editor can anyone point me in the right direction?. It only has a small space to fit into, so something fairly simple would be best. Thanks for the help!

    Read the article

  • Delete Amazon S3 buckets?

    - by Kyle Cronin
    I've been interacting with Amazon S3 through S3Fox and I can't seem to delete my buckets. I select a bucket, hit delete, confirm the delete in a popup, and... nothing happens. Is there another tool that I should use?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >