Search Results

Search found 904 results on 37 pages for 'jonathan kushner'.

Page 4/37 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Animate background image change with jQuery

    - by Jonathan Lyon
    Hi I finally have this working now but would like to know how I can use JQuery's animate function to make the background image changes fade in nicely when you hover over the list items on the homepage:- http://www.thebalancedbody.ca/ The Code to make this happen so far is:- $("ul#frontpage li#277 a").hover( function () { $('#homepage_container').css('background-image', 'url(http://www.thebalancedbody.ca/wp-content/themes/balancedbody_V1/images/nutrition_background.jpg)'); },function () { $('#homepage_container').css('background-image', 'url(http://www.thebalancedbody.ca/wp-content/themes/balancedbody_V1/images/default_background.jpg)'); } ); $("ul#frontpage li#297 a").hover( function () { $('#homepage_container').css('background-image', 'url(http://www.thebalancedbody.ca/wp-content/themes/balancedbody_V1/images/vibration_training.jpg)'); },function () { $('#homepage_container').css('background-image', 'url(http://www.thebalancedbody.ca/wp-content/themes/balancedbody_V1/images/default_background.jpg)'); } ); etc etc How would I add the ANIMATE function to this please - thanks!!! Thanks Jonathan

    Read the article

  • Insert rows into MySQL table while changing one value

    - by Jonathan
    Hey all- I have a MySQL table that defines values for a specific customer type. | CustomerType | Key Field 1 | Key Field 2 | Value | Each customer type has 10 values associated with it (based on the other two key fields). I am creating a new customer type (TypeB) that is exactly the same as another customer type (TypeA). I want to insert "TypeB" as the CustomerType but then just copy the values from TypeA's rows for the other three fields. Is there an SQL insert statement to make this happen? Somthing like: insert into customers(customer_type, key1, key2, value) values "TypeB" union select key1, key2, value from customers where customer_type = "TypeA" Thanks- Jonathan

    Read the article

  • Rails route rewriting quesiton

    - by Jonathan
    Hi guys, I think this is an easy question. I am using this useful Flash Document Reader called FlexPaper. I have it embeded in one of my Show pages. But when I click the a link on their tool bar to show the document in a new browser, it points to the following link ... http://0.0.0.0:3000/intels/FlexPaperViewer.swf?ZoomTime=0.5&FitPageOnLoad=false&PrintEnabled=false&SwfFile=%2FPaper.swf which doesn't work, but if I remove the "intels" from the path so the url looks like: http://0.0.0.0:3000/FlexPaperViewer.swf?ZoomTime=0.5&FitPageOnLoad=false&PrintEnabled=false&SwfFile=%2FPaper.swf It works fine. My question is what is the best way to handle this. Can you write a route that rewrites a url that starts with intels/FlexPaperViewer.swf and removes the intels prefix? What would that look like? Is there a better option? Thanks! Jonathan

    Read the article

  • UITableView and keyboard scrolling problem

    - by Jonathan
    after a lot of trial and error, I'm giving up and asking the question. I've seen a lot of people with similar problems but can't get all the answers to work right. I have a UITableView which is composed of custom cells. The cells are made of 5 text fields next to each other (sort of like a grid). When I try to scroll and edit the cells at the bottom of the UITableView, I can't manage to get my cells properly positioned above the keyboard. I have seen many answers talking about changing view sizes,etc... but none of them has worked nicely so far. Could anybody clarify the "right" way to do this with a concrete code example? Thanks in advance, Jonathan

    Read the article

  • google search as an rss feed

    - by Jonathan
    Hi guys, Is there a way to have treat google serach results as an rss feed? For example say I worked for stackoverflow and wanted to montior how if the results from the following search url: http://www.google.com/search?hl=en&q=stackoverflow changes from day today. It would be cool if I could append &output=rss to the url and get back a feed like with google news. But that does not seem to be supported. Anyone have ideas? (Note I am programing with Ruby and Rails, if that matters) Thanks! Jonathan

    Read the article

  • Python: create a function to modify a list by reference not value

    - by Jonathan
    Hey all- I'm doing some performance-critical Python work and want to create a function that removes a few elements from a list if they meet certain criteria. I'd rather not create any copies of the list because it's filled with a lot of really large objects. Functionality I want to implement: def listCleanup(listOfElements): i = 0 for element in listOfElements: if(element.meetsCriteria()): del(listOfElements[i]) i += 1 return listOfElements myList = range(10000) myList = listCleanup(listOfElements) I'm not familiar with the low-level workings of Python. Is myList being passed by value or by reference? How can I make this faster? Is it possible to somehow extend the list class and implement listCleanup() within that? myList = range(10000) myList.listCleanup() Thanks- Jonathan

    Read the article

  • Identifying which value of a multi-row inserts fails foreign key constraint

    - by Jonathan
    I have a multi-row insert that looks something like: insert into table VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9); Assume the first attribute (1, 4, 7) is a foreign key to another table and assume that this referenced table does not have the value '4'. A MySQLExeption is thrown with error code 1452. EXCEPTION: Cannot add or update a child row: a foreign key constraint fails (dbName/tableName, CONSTRAINT id FOREIGN KEY (customer_id) REFERENCES referencedTable (customer_id)) Is there a way to identify which value caused the error? I would love to give my user an error message that said something like: Error: '4' does not exist in the referenced table. I am using the .NET mysql connector to execute the insert. Thanks- Jonathan

    Read the article

  • Applet User-agent

    - by Jonathan Barbero
    Hello! This is a simple question, but I didn´t found any documentation about this. When an applet makes a request, how is the user agent of the request. I want to know the applet user-agent expression to detect if a request comes from an applet. I make two test, with IE7 and Firefox 3.0.5 with JDK 1.6.0_03 and the user agent was "Mozilla/4.0 (Windows 2003 5.2) Java/1.6.0_03" in both, but I can´t generalize from two test. Thanks in advance, Jonathan.

    Read the article

  • Different kinds of doubles in vb.net?

    - by Jonathan
    Hey all- I'm using QBFC to generate invoices in a Quickbooks integrating app. I'm getting an exception thrown for lineItem.Amount.SetValue(val as Double) when I try to enter a programmatically generated double. The following does not work: lineItem = invoice.ORInvoiceLineAddList.Append.InvoiceLineAdd Dim amount as Double amount = summary.dailySold * summary.dailyRate loggingTxtBox.AppendText("Amount is " & amount & vbNewLine) lineItem.Amount.SetValue(amount) The exception I receive is System.Runtime.InteropServices.COMException (0x80040305): Invalid Amount format. at Interop.QBFC8.IQBAmountType.SetValue(Double val) The following works: lineItem.Amount.SetValue(20.3) Any suggestions? Is .NET interpretting a hard-coded double differently than a programmatically calculated one? Thanks- Jonathan

    Read the article

  • Multiple things at once (Threads?)

    - by Jonathan
    All, What is a really simple way of having a program do more than one thing at once, even if the computer does not necessarily have multiple 'cores'. Can I do this by creating more than one Thread? My goal is to be able to have two computers networked (through Sockets) to respond to each-other's requests, while my program will at the same time be able to be managing a UI. I want the server to potentially handle more than one client at the same time as well. My understanding is that the communication is done with BufferedReader.readLine() and PrintWriter.println(). My problem is that I want the server to be waiting on multiple readLine() requests, and also be doing other things. How do I handle this? Many thanks, Jonathan

    Read the article

  • NetBackup with VSS and Instant Recovery - Failing to delete old snapshots

    - by Jonathan Bourke
    We are attempting to implement Microsoft VSS for snap-shotting in our NetBackup 6.5.3.1 environment. The clients are both 32 & 64 bit Windows 2003 Server. Snapshot parameters are: Instant recovery is enabled Maximum snapshots = 1 Provider type = 1 (System) Snapshot attribute = 1 (Differential) All backups successfully complete, and VSS shadows are successfully created both for the snapshot backup and for the open files (shadow copy components). The Issue: NetBackup is not clearing or overwriting old snapshots with each successive backup. When we list shadows, and shadow storage, it is increasing and increasing. IT is not honouring the Maximum Snapshot setting. The Logs: The bpfis log doesn’t really appear to show any errors other than for methods which we are not employing (VxVM, Flashsnap, etc.). A section is as follows: 11:54:10.744 [348.4724] <2> logparams: D:\Program Files\Veritas\NetBackup\bin\bpfis.exe delete -nbu -id htpststr001.san.mgmt.det_1248918143 -bpstart_to 300 -bpend_to 300 -clnt htpststr001.san.mgmt.det 11:54:10.744 [348.4724] <4> bpfis: INF - BACKUP START 348 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: VfMS error 10; see following messages: 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: Non-fatal method error was reported 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: vfm_configure_fi_one: method: FlashSnap, type: FIM, function: FlashSnap_init 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: VfMS method error 3; see following message: 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: FlashSnap_init: Veritas Volume Manager not installed. 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: VfMS error 10; see following messages: 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: Non-fatal method error was reported 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: vfm_configure_fi_one: method: vxvm, type: FIM, function: vxvm_init 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: VfMS method error 3; see following message: 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: vxvm_init: Veritas Volume Manager not installed. 11:54:11.713 [348.4724] <4> onlfi_thaw: Thawing C:\ using snapshot method VSS. 11:54:11.713 [348.4724] <2> onlfi_vfms_logf: vfm_thaw: delete snapshot ... 11:54:11.744 [348.4724] <2> onlfi_vfms_logf: snapshot services: emcclariionfi:Thu Jul 30 2009 11:54:11.744000 <Thread id - 4724> Unable to import any login credentials for any appliances. 11:54:11.760 [348.4724] <2> onlfi_vfms_logf: snapshot services: hpevafi:Thu Jul 30 2009 11:54:11.760000 <Thread id - 4724> CHpEvaPlugin::init: CLI tool is not installed. 11:54:11.760 [348.4724] <2> onlfi_vfms_logf: snapshot services: hpmsafi:Thu Jul 30 2009 11:54:11.760000 <Thread id - 4724> No array mangement credentials are available in configuration file. 11:54:13.806 [348.4724] <4> onlfi_thaw: do_thaw return value: 0 11:54:13.806 [348.4724] <4> onlfi_thaw: Thawing D:\ using snapshot method VSS. 11:54:15.806 [348.4724] <4> onlfi_thaw: do_thaw return value: 0 11:54:19.806 [348.4724] <2> fis_delete_id: removing D:\Program Files\Veritas\NetBackup\online_util\fi_cntl\bpfis.fim.htpststr001.san.mgmt.det_1248918143.0 11:54:19.806 [348.4724] <2> fis_delete_id: removing D:\Program Files\Veritas\NetBackup\online_util\fi_cntl\bpfis.fim.htpststr001.san.mgmt.det_1248918143.0.fiid 11:54:19.853 [348.4724] <4> bpfis: INF - EXIT STATUS 0: the requested operation was successfully completed The Question: Has anyone any experience of NetBackup / VSS not clearing snapshots after backups? We will ultimately be using a HP EVA for the snapshots, but we want to ensure correct functioning at a VSS level before we go further. Regards, Jonathan (PS: Question previously posted by my colleague on entsupport.symantec.com)

    Read the article

  • How to extend an 'unloadable' Rails plugin?

    - by Vitaly Kushner
    I'm trying to write a plugin that will extend InheritedResources. Specifically I want to rewrite some default helpers. And I'd like it to "just work" once installed, w/o any changes to application code. The functionality is provided in a module which needs to be included in a right place. The question is where? :) The first attempt was to do it in my plugin's init.rb: InheritedResources::Base.send :include, MyModule It works in production, but fails miserably in development since InheritedResource::Base declared as unloadable and so its code is reloaded on each request. So my module is there for the first request, and then its gone. InheritedResource::Base is 'pulled' in again by any controller that uses it: Class SomeController < InheritedResource::Base But no code is 'pulling in' my extension module since it is not referenced anywhere except init.rb which is not re-loaded on each request So right now I'm just including the module manually in every controller that needs it which sucks. I can't even include it once in ApplicationController because InheritedResources inherites from it and so it will override any changes back. update I'm not looking for advice on how to 'monkey patch'. The extension is working in production just great. my problem is how to catch moment exactly after InheritedResources loaded to stick my extension into it :) update2 another attempt at clarification: the sequence of events is a) rails loads plugins. my plugin loads after inherited_resources and patches it. b) a development mode request is served and works c) rails unloads all the 'unloadable' code which includes all application code and also inherited_resources d) another request comes in e) rails loads controller, which inherites from inherited resources f) rails loads inherited resources which inherit from application_controller g) rails loads application_contrller (or may be its already loaded at this stage, not sure) g) request fails as no-one loaded my plugin to patch inherited_resources. plugin init.rb files are not reloaded I need to catch the point in time between g and h

    Read the article

  • How to extend an 'unloadable' Rails plugin?

    - by Vitaly Kushner
    I'm trying to write a plugin that will extend InheritedResources. Specifically I want to rewrite some default helpers. And I'd like it to "just work" once installed, w/o any changes to application code. The functionality is provided in a module which needs to be included in a right place. The question is where? :) The first attempt was to do it in my plugin's init.rb: InheritedResources::Base.send :include, MyModule It works in production, but fails miserably in development since InheritedResource::Base declared as unloadable and so its code is reloaded on each request. So my module is there for the first request, and then its gone. InheritedResource::Base is 'pulled' in again by any controller that uses it: Class SomeController < InheritedResource::Base But no code is 'pulling in' my extension module since it is not referenced anywhere except init.rb which is not re-loaded on each request So right now I'm just including the module manually in every controller that needs it which sucks. I can't even include it once in ApplicationController because InheritedResources inherites from it and so it will override any changes back.

    Read the article

  • OS X firewall popup about growlnotify keeps popping up

    - by Vitaly Kushner
    I have autotest setup with growlnotify using growl_glue (version 1.0.7): require 'growl_glue' GrowlGlue::Autotest.initialize do |config| config.notification :use_network_notifications => true end growl version is 1.2 each time autotest runs and displays the notification growl popup I also get an OS X firewall popup asking Do you want the application "growlnotify" to accept incoming network connections? I tried answering deny and allow but it still keeps popping up. the deny/allow choice is properly reflected in System Preferences - Security - Firewall - 'application access list', but it still asks every time. update I ended up using autotest-growl gem instead of the growl_glue. it fixed the problem, it was probably related to how growl_glue was calling growlnotify.

    Read the article

  • NetBackup with VSS and Instant Recovery - Failing to delete old snapshots

    - by Jonathan Bourke
    We are attempting to implement Microsoft VSS for snap-shotting in our NetBackup 6.5.3.1 environment. The clients are both 32 & 64 bit Windows 2003 Server. Snapshot parameters are: Instant recovery is enabled Maximum snapshots = 1 Provider type = 1 (System) Snapshot attribute = 1 (Differential) All backups successfully complete, and VSS shadows are successfully created both for the snapshot backup and for the open files (shadow copy components). The Issue: NetBackup is not clearing or overwriting old snapshots with each successive backup. When we list shadows, and shadow storage, it is increasing and increasing. IT is not honouring the Maximum Snapshot setting. The Logs: The bpfis log doesn’t really appear to show any errors other than for methods which we are not employing (VxVM, Flashsnap, etc.). A section is as follows: 11:54:10.744 [348.4724] <2> logparams: D:\Program Files\Veritas\NetBackup\bin\bpfis.exe delete -nbu -id htpststr001.san.mgmt.det_1248918143 -bpstart_to 300 -bpend_to 300 -clnt htpststr001.san.mgmt.det 11:54:10.744 [348.4724] <4> bpfis: INF - BACKUP START 348 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: VfMS error 10; see following messages: 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: Non-fatal method error was reported 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: vfm_configure_fi_one: method: FlashSnap, type: FIM, function: FlashSnap_init 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: VfMS method error 3; see following message: 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: FlashSnap_init: Veritas Volume Manager not installed. 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: VfMS error 10; see following messages: 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: Non-fatal method error was reported 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: vfm_configure_fi_one: method: vxvm, type: FIM, function: vxvm_init 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: VfMS method error 3; see following message: 11:54:11.713 [348.4724] <8> onlfi_initialize_vfms: vxvm_init: Veritas Volume Manager not installed. 11:54:11.713 [348.4724] <4> onlfi_thaw: Thawing C:\ using snapshot method VSS. 11:54:11.713 [348.4724] <2> onlfi_vfms_logf: vfm_thaw: delete snapshot ... 11:54:11.744 [348.4724] <2> onlfi_vfms_logf: snapshot services: emcclariionfi:Thu Jul 30 2009 11:54:11.744000 <Thread id - 4724> Unable to import any login credentials for any appliances. 11:54:11.760 [348.4724] <2> onlfi_vfms_logf: snapshot services: hpevafi:Thu Jul 30 2009 11:54:11.760000 <Thread id - 4724> CHpEvaPlugin::init: CLI tool is not installed. 11:54:11.760 [348.4724] <2> onlfi_vfms_logf: snapshot services: hpmsafi:Thu Jul 30 2009 11:54:11.760000 <Thread id - 4724> No array mangement credentials are available in configuration file. 11:54:13.806 [348.4724] <4> onlfi_thaw: do_thaw return value: 0 11:54:13.806 [348.4724] <4> onlfi_thaw: Thawing D:\ using snapshot method VSS. 11:54:15.806 [348.4724] <4> onlfi_thaw: do_thaw return value: 0 11:54:19.806 [348.4724] <2> fis_delete_id: removing D:\Program Files\Veritas\NetBackup\online_util\fi_cntl\bpfis.fim.htpststr001.san.mgmt.det_1248918143.0 11:54:19.806 [348.4724] <2> fis_delete_id: removing D:\Program Files\Veritas\NetBackup\online_util\fi_cntl\bpfis.fim.htpststr001.san.mgmt.det_1248918143.0.fiid 11:54:19.853 [348.4724] <4> bpfis: INF - EXIT STATUS 0: the requested operation was successfully completed The Question: Has anyone any experience of NetBackup / VSS not clearing snapshots after backups? We will ultimately be using a HP EVA for the snapshots, but we want to ensure correct functioning at a VSS level before we go further. Regards, Jonathan (PS: Question previously posted by my colleague on entsupport.symantec.com)

    Read the article

  • uninitialized constant Test::Unit::TestResult::TestResultFailureSupport

    - by Vitaly Kushner
    I get the error in subj when I'm trying to run specs or generators in a fresh rails project. This happens when I add shoulda to the mix. I added the following in the config/environment.rb: config.gem 'rspec', :version => '1.2.6', :lib => false config.gem 'rspec-rails', :version => '1.2.6', :lib => false config.gem "thoughtbot-shoulda", :version => "2.10.2", :lib => 'shoulda', :source => "http://gems.github.com" I'm on OSX. ruby 1.8.6 (2008-08-11 patchlevel 287) gems 1.3.5 rails 2.3.4 rspec - 1.2.6 shoulda - 2.10.2 test-unit - 2.0.3 I'm aware of this and adding config.gem 'test-unit', :lib => 'test/unit' indeed solves the genrator problem as it doesn't throw an exception, but it prints 0 tests, 0 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications at the end of the run so I suppose it tries to run tests which is unexpected and undesired, also the specs stop to run at all, seems like rspec is not running at all, when running rake spec I get the test-unit output again (with 0 tests as there are only specs, no tests defined)

    Read the article

  • how to have separate keys per record in mongo_mapper + Rails

    - by Vitaly Kushner
    When I'm adding a record in mongodb I can specify whatever keys I want and it will store it in the db. The problem is that it will remember those keys for the next time I insert another record. so for example if I do the following: Product.create :foo => 123 and then Product.create :bar => 456 I get :foo => nil field in the 2nd record. This is definitely not a limitation of mongodb itself, since if I restart the rails console and create yet another record with different set of columns, it will not add the columns from the 1st 2 records. So it seems like mongomapper remembers all the keys used and inserts them all into all records, even if values are not provided. The question is obviously: how do I disable this crazy attributes explosion? Basically I want only the 'permanent' keys that I specify in the model to be in every record, but all the 'extra' attributes to be specified per record and not to mess the consequent records.

    Read the article

  • how to loop through menu and remove class and then add class to current menu item

    - by Jonathan Lyon
    Hi all I have this menu structure that is used to navigate through content slider panels. <div id="menu"> <ul> <li><a href="#1" class="cross-link highlight">Bliss Fine Foods</a></li> <li><a href="#2" class="cross-link">Menus</a></li> <li><a href="#3" class="cross-link">Wines</a></li> <li><a href="#4" class="cross-link">News</a></li> <li><a href="#5" class="cross-link">Contact Us</a></li> </ul> </div> I would like to loop through these elements and remove the highlight class and then add the highlight class to the current / last clicked menu item. Any ideas? Any help would be greatly appreciated. Thanks Jonathan

    Read the article

  • problems with scrolling a java TextArea

    - by Jonathan
    All, I am running into an issue using JTextArea and JScrollPane. For some reason the scroll pane appears to not recognize the last line in the document, and will only scroll down to the line before it. The scroll bar does not even change to a state where I can slide it until the lines in the document are two greater than the number of lines the textArea shows (it should happen as soon as it is one greater). Has anyone run into this before? What would be a good solution (I want to avoid having to add an extra 'blank' line to the end of the document, which I would have to remove every time I add a new line)? Here is how I instantiate the TextArea and ScrollPane: JFrame frame = new JFrame("Java Chat Program"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Container pane = frame.getContentPane(); if (!(pane.getLayout() instanceof BorderLayout)) { System.err.println("Error: UI Container does not implement BorderLayout."); System.exit(-1); } textArea = new JTextArea(); textArea.setPreferredSize(new Dimension(500, 100)); textArea.setEditable(false); textArea.setLineWrap(true); textArea.setWrapStyleWord(true); JScrollPane scroller = new JScrollPane(textArea); scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); pane.add(scroller, BorderLayout.CENTER); Here is the method I use to add a new line to textArea: public void println(String a) { textArea.append(" "+a+"\n"); textArea.setCaretPosition(textArea.getDocument().getLength()); } Thanks for your help, Jonathan EDIT: Also, as a side note, with the current code I have to manually scroll down. I assumed that setCaretPosition(doc.getLength()) in the println(line) method would automatically set the page to the bottom after a line is entered... Should that be the case, or do I need to do something differently?

    Read the article

  • Shared value in parallel python

    - by Jonathan
    Hey all- I'm using ParallelPython to develop a performance-critical script. I'd like to share one value between the 8 processes running on the system. Please excuse the trivial example but this illustrates my question. def findMin(listOfElements): for el in listOfElements: if el < min: min = el import pp min = 0 myList = range(100000) job_server = pp.Server() f1 = job_server.submit(findMin, myList[0:25000]) f2 = job_server.submit(findMin, myList[25000:50000]) f3 = job_server.submit(findMin, myList[50000:75000]) f4 = job_server.submit(findMin, myList[75000:100000]) The pp docs don't seem to describe a way to share data across processes. Is it possible? If so, is there a standard locking mechanism (like in the threading module) to confirm that only one update is done at a time? l = Lock() if(el < min): l.acquire if(el < min): min = el l.release I understand I could keep a local min and compare the 4 in the main thread once returned, but by sharing the value I can do some better pruning of my BFS binary tree and potentially save a lot of loop iterations. Thanks- Jonathan

    Read the article

  • what is the jquery selector syntax to select this LI item

    - by Jonathan Lyon
    hi all I need to select each list item and change the background image of the parent div homepagecontainer but I can't even select the li element in my script. Here is the code: <div class="transparent" id="programmesbox"> <ul id="frontpage"> <?php query_posts('showposts=20&post_parent=7&post_type=page'); if (have_posts()) : while (have_posts()) : the_post(); ?> <li id="<?php the_id() ?>" ><a class="sprite" href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li> <?php endwhile; endif; ?> </ul> </div> I need to do something like this <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $('#frontpage li a').hover(function() { alert('here'); //CHANGE BACKGROUND IMAGE OF 'homepage_container' to different image depending on which list item is hovered over } ); </script> This is the URL of the site:- http://www.thebalancedbody.ca/ Thanks so much!! Jonathan

    Read the article

  • How does Java handle ArrayList refrerences and assignments?

    - by Jonathan
    Hey all- I mostly write in C but am using Java for this project. I want to know what Java is doing here under the hood. ArrayList<Integer> prevRow, currRow; currRow = new ArrayList<Integer>(); for(i =0; i < numRows; i++){ prevRow = currRow; currRow.clear(); currRow.addAll(aBunchOfItems); } Is the prevRow = currRow line copying the list or does prevRow now point to the same list as currRow? If prevRow points to the same list as currRow, I should create a new ArrayList instead of clearing.... private ArrayList<Integer> someFunction(ArrayList<Integer> l){ Collections.sort(l); return l; } main(){ ArrayList<Integer> list = new ArrayList<Integer>(Integer(3), Integer(2), Integer(1)); list = someFunction(list); //Option 1 someFunction(list); //Option 2 } In a similar question, do Option 1 and Option 2 do the same thing in the above code? Thanks- Jonathan

    Read the article

  • Rolling Back a Transaction with MySQL Connector in VB.net

    - by Jonathan
    Hey all- I have one multi-row INSERT statement (300 or so sets of values) that I would like to commit to the MySQL database in an all-or-nothing fashion. insert into table VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9); In some cases, a set of values in the command will not meet the criteria of the table (duplicate key, for example). When that happens I do not want any of the previous sets added to the database. I've implemented this with the following code, however, my rollback command doesn't appear to be making a difference. I've used this documentation: http://dev.mysql.com/doc/refman/5.0/es/connector-net-examples-mysqltransaction.html Dim transaction As MySqlTransaction = sqlConnection.BeginTransaction() sqlCommand = New MySqlCommand(insertStr, sqlConnection, transaction) Try sqlCommand.ExecuteNonQuery() Catch ex As Exception writeToLog("EXCEPTION: " & ex.Message & vbNewLine) writeToLog("Could not execute " & sqlCmd & vbNewLine) Try transaction.Rollback() writeToLog("All statements were rolled back." & vbNewLine) Return False Catch rollbackEx As Exception writeToLog("EXCEPTION: " & rollbackEx.Message & vbNewLine) writeToLog("All statements were not rolled back." & vbNewLine) Return False End Try End Try transaction.commit() I get the DUPLICATE KEY exception thrown, no Rollback Exception thrown, and every set of values up to duplicate key committed to the database. What am I doing wrong? Thanks- Jonathan

    Read the article

  • Position Div using Javascript on page refresh

    - by Jonathan Lyon
    Hi all I have a div that I would like to reposition each time the page is refreshed. It is currently set in the css using top and left. I wold like to pass the top and left values on page refresh. #inneriframe { position:absolute; top:-170px; left:-5px; width:1280px; height:1200px; } The content is from another site and contained in an iframe and I want the viewport of the div to change(within certain limits) each time the page is refreshed. The original page is here http://labs.ideeinc.com/multicolr#colors=8438AD; I have iFramed part of it here http://www.weninja.com/what-we-do Full code <style type="text/css"> #outerdiv { width:280px; height:150px; overflow:hidden; position:relative; } #inneriframe { position:absolute; top:-170px; left:-5px; width:1280px; height:1200px; } </style> <div id='outerdiv'> <iframe src="http://labs.ideeinc.com/multicolr#colors=8438AD;" id='inneriframe' scrolling=no></iframe> </div> <h5>Multicolr Search Lab &copy; 2008 Idee Inc</h5> So basically I just need to change the TOP and LEFT values for the div #inneriframe to have different images show - is this possible? Thanks Jonathan

    Read the article

  • How does a client find the port number of a server?

    - by Jonathan
    Hello all, I am currently learning about basic networking in java. I have been playing around with the server and client relationship between two of my computers. However, I cannot figure out how distributed programs (say, a videogame), can not only find the 'host' computer, but also the port number on which the server is running in order to create a Socket between the two computers. The only way I really see to create a Socket is with an already known IP Address, and with a known port number. How do you search a LAN network for another computer (host) searching for clients? How do you determine what port the server is located on without 'pinging' all available ports for a response (which, I understand, is bad form... Something about 'server attack'...)? In such a situation as a video game, there can be any number of computers on the same network, and any number of them might be attempting to host, or otherwise running the application. Any other important information, or perhaps reference to a more detailed tutorial than the one I am using, regarding making connections on so very little information on the client side would be appreciated. Many thanks, Jonathan

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >