Search Results

Search found 657 results on 27 pages for 'kyle'.

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

  • Removing active class and adding it to a sibling

    - by Kyle
    Currently, I have a jQuery Cycle plugin that allows the image to scroll. With it's callback I am calling this function function onAfterVideoScroll() { $('.myRemote.active').removeClass("active").next().addClass("active"); } This SHOULD be removing the current class from another set of links, and adding the class to the it's next sibling. This is to keep whichever image is showing it's button predecessor will be active so the user can tell which button is currently showing on the slideshow. If this makes sense, please let me know why it will remove the active class but it never gives the sibling the active class. Thanks!

    Read the article

  • sharing web user controls across projects.

    - by Kyle
    I've done this using a regular .cs file that just extends System.Web.UI.UserControl and then included the assembly of the project that contains the control into other projects. I've also created .ascx files in one project then copied all ascx files from a specified folder in the properties-Build Events-Pre-build event. Now what I want to do is a combination of those two: I want to be able to use ascx files that I build in one project, in all of my other projects but I want to include them just using assembly references rather than having to copy them to my "secondary" projects as that seems a ghetto way to accomplish what I want to do. It works yes, but it's not very elegant. Can anyone let me know if this even possible, and if so, what the best way to approach this is?

    Read the article

  • CSS Negative margins for positioning.

    - by Kyle Sevenoaks
    Is it ok to use negative margins for positioning? I have a lot in my current site and feel like it's not such a stable way to position things. I usually suggest to use them too. For example I have a checkout page with three divs on top of each other <div class="A"> header </div> <div class="B"> content </div> <div class="C"> footer </div> (A, B and C), which are meant to sit on top of each other, to appear attached. I did this using: .B { margin-top: -20px; } On div B, to meet the bottom of div A. Is this good practice or shall I re-code using top and left?

    Read the article

  • Writing a factory for classes that have required arguments

    - by Kyle Adams
    I understand the concept of factory pattern such that you give it something it spits out something of the same template back so if I gave a factory class apple, I expect to get many apples back with out having to instantiate a new apple ever time. what if that apple has a required argument of seed, or multiple required arguments of seed, step and leaf? how do you use factory pattern here? that is how do I use factory pattern to instantiate this: $apple = new Apple($seed, $stem, $leaf);

    Read the article

  • Accessing the stringValue from NSTextFields on different NIBs

    - by Kyle Zaragoza
    I'm having an extremely difficult time trying to access information from an object (e.g. an NSTextField) that is located on a NIB other than my "MainMenu.nib". My current setup: I have a MainMenu.xib that contains only a toolbar at the top and an NSView. I have four other .xib files containing custom NSViews and each of their File Owner's are assigned to a NSViewController subclass which I have created for each. My MainMenu.xib contains an object that is set to my WindowController subclass that takes care of swapping the fours views into the NSView on my MainMenu.xib. All of this works fantastic. Where I have a problem: I have another class that acts as the brains to my application which sends and receives data from an online server, all of the methods I have created rely on inputs from the user that are located on the individual .xibs that swap into my MainMenu.xib's NSview. Unfortunately I have no idea on how to grab the information from the NSTextFields, textViews, etc. that are located on my individual .xib files. What I've tried: I have tried setting the File Owner's of the four individual .xibs to my "brains" class and connecting outlets defined in my "brains".h, but when I call [textField stringValue] I receive a NULL response. I'm thinking this is because I'm creating multiple instances of my "brains" class but not totally sure. Any help on accessing information from textFields from other nibs would be a great benefit, thanks in advance.

    Read the article

  • Texture allocations being doubled in iPhone OpenGL ES

    - by Kyle
    The below couple lines are called 15 times during initialization. The tx-size is reported at 512 everytime, so this will allocate a 1mb image in memory 15 times, for a total of 15mb used.. However, I noticed instruments is reporting a total of 31 allocations! (15*2)+1 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, tx-size, tx-size, 0, GL_RGBA, GL_UNSIGNED_BYTE, spriteData); free(spriteData); Likewise in another area of my program that allocates 6 256x256x4 (256kB) textures.. I see 13 sitting there. (6*2)+1 Anyone know what's going on here? It seems like awful memory management, and I really hope it's my fault. Just to let everyone know, I'm on the simulator.

    Read the article

  • Firefox conditional comments CSS

    - by Kyle Sevenoaks
    Hi, the time has come to apply a targeted CSS hack to Firefox, first time for everything. Since Chrome, Safari and even IE are reading the thing perfectly fine, how would I apply the hack to this code? #cart2Salg { visibility: visible; position: absolute; left: 509px; top: 5px; z-index: 4; width: 66px; } Thanks

    Read the article

  • How do I fix this NameError?

    - by Kyle Kaitan
    I want to use the value v inside of an instance method on the metaclass of a particular object: v = ParserMap[kind][:validation] # We want to use this value later. s = ParserMap[kind][:specs] const_set(name, lambda { p = Parser.new(&s) # This line starts a new scope... class << p define_method :validate do |opts| v.call(self, opts) # => NameError! The `class` keyword above # has started a new scope and we lost # old `v`. end end p }) Unfortunately, the class keyword starts a new scope, so I lose the old scope and I get a NameError. How do I fix this?

    Read the article

  • Anyone familiar with CurvyCorners JS?

    - by Kyle Sevenoaks
    I am trying to implement the CurvyCorners script onto the site: euroworker.no. It reports back that certain CSS values don't exist on the page, how I can I turn off this alert? Found the alert code: if (j === null) curvyCorners.alert("No object with ID " + arg + " exists yet.\nCall curvyCorners(settings, obj) when it is created.");

    Read the article

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

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