Search Results

Search found 1517 results on 61 pages for 'ben tew'.

Page 44/61 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • jQuery selector for option tag value attribute returns null

    - by Ben
    Hello, I am trying to change the selected option in a select dropdown box with jQuery. I have it set so that it finds the hash tag at the end of the URL and based on that hash tag it changes the selected option in the select box. Most of my code is functional, it successfully finds the hash tag and executes the if statement that corresponds with it. However, when it goes to execute the "then" section of the statement when it goes to the selector for the option (which uses an attribute selector based on the value attribute of the option tag) it returns null. If figured this out with firebug, in the console it says that the selector is null. Here is my code: $(document).ready(function() { var $hash = window.location.hash if($hash == "#htmlcss") { $('option[value="HTML/CSS Coding"]').attr("selected","selected") } if($hash == "#php") { $('option[value="PHP Coding"]').attr("selected","selected") } if($hash == "#jscript") { $('option[value="Javascript and jQuery Coding"]').attr("selected","selected") } if($hash == "#improv") { $('option[value="General Website Improvements"]').attr("selected","selected") } if($hash == "#towp") { $('option[value="Website Conversion to Wordpress"]').attr("selected","selected") } if($hash == "#wptheme") { $('option[value="Wordpress Theme Design"]').attr("selected","selected") } if($hash == "#complete") { $('option[value="Complete Website Creation"]').attr("selected","selected") } if($hash == "#server") { $('option[value="Web Server Configuration"]').attr("selected","selected") } }); So to clarify, when I enter in a url that ends in the #php hash tag, for example, the desired action does not occur which would change the "PHP Coding" option to the selected one by using the "selected" html attribute however the selector for the particular option tag returns null. Is there a problem with my syntax or is my code not functioning in the way that I think it should? Thanks very much.

    Read the article

  • C++ Generate and store the co-ordinates of an n-cube

    - by Ben
    I want to write a function to generate and store the co-ordinates of an n-cube and I have no idea how to start. Specifically, I wish to generate the co-ordinates for an evenly or randomly distributed cloud of points for this n-cube and store them. What would be a good way to start with this or if possible, a quick solution?

    Read the article

  • Manually filling opcode cache for entire app using apc_compile_file, then switching to new release.

    - by Ben
    Does anyone have a great system, or any ideas, for doing as the title says? I want to switch production version of web app-- written in PHP and served by Apache-- from release 1234 to release 1235, but before that happens, have all files already in the opcode cache (APC). Then after the switch, remove the old cache entries for files from release 1234. As far as I can think of there are three easy ways of atomically switching from one version to the next. Have a symbolic link, for example /live, that is always the document root but is changed to point from one version to the next. Similarly, have a directory /live that is always the document root, but use mv live oldversion && mv newversion live to switch to new version. Edit apache configuration to change the document root to newversion, then restart apache. I think it is preferable not to have to do 3, but I can't think of anyway to precompile all php files AND use 1 or 2 to switch release. So can someone either convince me its okay to rely on option 3, or tell me how to work with 1 or 2, or reveal some other option I am not thinking of?

    Read the article

  • Is OpenGL required for my iPhone game?

    - by Ben X Tan
    On an iPhone: If I am writing a game that has multiple levels, with multiple animations (image sequences), jpg and png (transparent), some full screen and some not, some looped and some played once only. What is the best way of doing it? Each level might have up to 10MB of images. Add on to this music, and video (cut scenes). All 2D graphics, no 3D models. Is OpenGL required? Or can this be achieved with Quartz or Core Animation?

    Read the article

  • Problem storing an RSS feed in Flex 4

    - by ben
    Hey guys, I'm having some trouble storing the results of an RSS feed in my Flex 4 app. Here is the variables view, showing the result of the HTTPService which gets the feed: And here is the code I use to store the result: public var rssXML:XML; rssXML = event.result as XML; But after this code is run, rssXML is still null. What am I doing wrong? Thanks for reading.

    Read the article

  • Set Pivot Items from Cell Range? Excel 2007

    - by Ben
    I have developed code which identifies the multiple item selections from a Pivot field and writes the list of items to a table. I then wish to take this contents of the list and use it to populate a number of other Pivot Tables on other tabs. I currently have the ability to do this for single Pivot items selections, but I need to do this for multiple selections. If I select multiple items in the Pivot Table and attempt to pass these selections to the other Pivot Tables it creates an error because it sees only hte text "Multiple Items" instead of a list of each item that was checked in the upstream Pivot field. I need some VBA code that allows me to use the list to set another Pivot Field's selections. All the Pivot fields in question here are page fields. I am using Excel 2007. Any help is appreciated. Thanks!

    Read the article

  • Using netlink to obtain arp entries only returns stale entries

    - by Ben
    I'm currently trying to retrieve reachable neighbors from the arp table in a user space program written in c. I've looked through the source code to the "ip neigh" command (ipneigh.c) and it appears that I should use the flag NUD_REACHABLE. struct { struct nlmsghdr n; struct ndmsg r; } req; memset(&req, 0, sizeof(req)); req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ndmsg)); req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_ROOT; req.n.nlmsg_type = RTM_GETNEIGH; req.r.ndm_state = NUD_REACHABLE; However, when I look at the data returned from the kernel, I only have stale entries. In fact, no matter what I put for req.r.ndm_state it seems to return only entries marked as stale by ip neigh. The remainder of my code is modeled after this example: http://linux-hacks.blogspot.com/2009/01/sample-code-to-learn-netlink.html

    Read the article

  • LBA48 in Linux SCSI ATA Passthrough

    - by Ben Englert
    I am writing a custom disk monitoring/diagnostics app which, among other things, needs to do stuff to SATA disks behind a SAS PCI card under Linux. So far I am following this guide as well as the example code in sg_utils to pass ATA taskfiles through the SCSI layer. Seems to be working okay. However, in both cases, the CDB data structure (pointed to by the cmdp member of the sg_io argument to the ioctl) has only one unsigned char worth of space for the number of sectors. If you look at the ata_taskfile structure in linux\ata.h you'll see that it has an "nsect" and a "hob_nsect" field - high order bits for the sector count, to support LBA48. It turns out that in my application I need LBA48 support. So, anyone know how to set up an sg_io_hdr structure with an LBA48 sector count?

    Read the article

  • Valid signed Hex to long function

    - by Ben
    I am trying to convert a 24bit Hexadecimal string (6 characters) signed in two's complement to a long int in C. This is the function I have come up with: long int hex2li (char string[]) { char *pEnd; long int result = strtol (string, &pEnd, 16); if (strcmp (pEnd, "") == 0) { if (toupper (string[0]) == 'F') { return result - 16777216; } else { return result; } } return LONG_MIN; } Is it valid? Is there a better way of doing this?

    Read the article

  • Bypassing Javascript form handler

    - by Ben Aston
    We are writing an ASP.NET MVC application. By default, if the client browser has Javascript, the handler for every form on the page is set, by Javascript, to be one that sends the submission down an Ajax "pipe" (progressive enhancement). But, for one form (on a page of several), I'd like this handler to be bypassed/ignored. Is there a simple way to do this? Perhaps by overriding the handler by specifying my own onsubmit event directly in the DOM - or some other method? We use jQuery, so those libraries are available to me.

    Read the article

  • Can't mass-assign protected attributes: user

    - by Ben Aluan
    I'm working on a simple app that requires me to submit a form. I created two models. user.rb class User < ActiveRecord::Base attr_accessible :email has_many :item end item.rb class Item < ActiveRecord::Base attr_accessible :user_id belongs_to :user end Instead of creating a user using the user form view, I'm trying to create the user using the item form view. items/_form.html.haml = nested_form_for @item do |form| = form.fields_for :user do |builder| = builder.text_field :email = form.submit "Save" Did I miss something here? I'm using nested_form_for btw. Thank you.

    Read the article

  • JSF - Session Bean restart on logout and login

    - by Ben
    Hi, I have a web application with a backing bean which has the context of the current logged in user. It is implemented on JSF. When the user logs out he is forwarded to a login screen (in another JSP page). I would like the current session to be erased when that happens and a new one to be created the next time the user logs in and enters the application. My question is - how do you delete a session? (I guess the new session will be created automatically the next time the user enters the link) This is kinda newb i guess, but I couldn't find a solution for this. Thanks for the Help!

    Read the article

  • How do you write multiple lists from Matlab to the same excel file?

    - by Ben Fossen
    I have several lists in Matlab that I want to write to the same excel file. I have one list xordered and another list aspl. I do not know the length of the lists till after I run the Matlab program. I used data = xlswrite('edgar.xls',fliplr(sortedx'),'A2:A3000') for the first list but when I tried to write another list to the same file like this I ended up with two different excel files named edgar.xls asp_data = xlswrite('edagr.xls', fliplr(aspl'), 'B2:B3000') Is there a way I can write both of these lists into the same excel file? xordered in the A column and aspl in the B column?

    Read the article

  • finding process bottlenecks rails/ruby

    - by Ben
    I just got started with rails, and when I testing in development mode, I see in the logs that my Mailer action is taking 1175ms. Is there anyway to find out what exactly is the slow step? Also, there is a line that says (View:2, DB:1). I assume the DB means number of database lookups, but what about the view?

    Read the article

  • How do you pass in a value to a subfunction in Matlab I am getting output errors?

    - by Ben Fossen
    Below is my code in Matlab I am having trouble with the line sum = (h/2) * (f(a) + f(b)) + h; Matlab says I have to many outputs when I try to call the f(x) function. Is my problem with the f(x) function function Trapezoid_Uniform(a,b,n) h = (b - a)/n; sum = (h/2) * (f(a) + f(b)) + h; for i = 1:n-1 x = a + i*h; sum = sum + f(x); end sum = sum*h; disp(sum); end function f(z) f = exp(z); end

    Read the article

  • How do I format the contents of a DataGrid cell as a Date? as Currency?

    - by Ben McCormack
    I have a Silverlight DataGrid that's being populated with different types of data for each column. I'm trying to figure out how to format some of the contents of the DataGrid's cells, specifically for dates and formatting. I have a date column that's currently displaying like: 3/11/2010 12:00:00 AM. I would rather it display like 3/14/2010. I have a number column that's currently displaying like: 51.32. I'd rather it display as currency like $51.32. I'm not sure how I can go about doing this. I'd prefer to do it in XAML instead of C#, but both solutions are fine. For reference, here's my XAML so far: </data:DataGridTextColumn> <data:DataGridTextColumn Header="Payee" Binding="{Binding Payee}"/> <data:DataGridTextColumn Header="Category" Binding="{Binding Category}"/> <data:DataGridTextColumn Header="Memo" Binding="{Binding Memo}"/> <data:DataGridTextColumn Header="Inflow" Binding="{Binding Inflow}"/> <data:DataGridTextColumn Header="Outflow" Binding="{Binding Outflow}"/> </data:DataGrid.Columns>

    Read the article

  • using a 64-bit compiler in microsoft visual c++

    - by Ben
    this question is essentially identical to an earlier question i had that didn't receive any answers. hopefully someone can help me out this time. i am trying to compile a vc++ project as 64 bit using visual c++ express 2010. i know that the 64 bit compiler does not come with the default installation of vc++ express so i installed windows sdk for windows 7 as specified here (http://msdn.microsoft.com/en-us/library/9yb4317s.aspx) which includes the 64 bit compiler as i understand. however, there is still no 64 bit option in the configuration manager for vc++. after some searching i found and completed this tutorial (http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/) as well as the various links at the bottom of this page. despite all my efforts, i still cannot get the 64 bit compiler to show in vc++ (i.e. the 64 bit compiler won't show under "active solutions platform" in the configuration manager). if anyone has any experience/tips with getting this to work i would really appreciate it. fyi - i am running windows 7(x64).

    Read the article

  • Attaching user data to AXObserver

    - by Ben Packard
    I am using an AXObserver to monitor when a window is closed. In the callback, I am just raising an NSNotification. All working well. What is the correct syntax for attaching some user data as refcon? The working call looks like this: err6 = AXObserverAddNotification(observerTable, tableRef, kAXUIElementDestroyedNotification, nil); and the callback specified when I create the observer has the signature: static void cbTableClosed (AXObserverRef observer, AXUIElementRef element, CFStringRef notification, void *refcon) I want to replace refcon with an object of my own, but don't know how to change either line. The obvious objective-c type changes through up warnings.

    Read the article

  • How can I get started with PHPUnit, where my class construct requires a preconfigured db connection?

    - by Ben Dauphinee
    I have a class that uses a lot of database internally, so I built the constructor with a $db handle that I am supposed to pass to it. I am just getting started with PHPUnit, and I am not sure how I should go ahead and pass the database handle through setup. public function setUp(/*do I pass a database handle through here, using a reference? aka &$db*/){ $this->_acl = new acl; } public function __construct(Zend_Db_Adapter_Abstract $db, $config = array()){

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >