Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 46/584 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • Need help on Coda slider tabs to move inside an overflow:hidden div

    - by Reden
    I'm not too good at javascript. and hope I can get a bit of help. I'm using Coda Slider 2.0, and have designed it to where the tabs are another slider to the right of the main slider, and each item. Basically like this mootools plugin http://landofcoder.com/demo/mootool/lofslidernews/index2.1.html Problem is the items will not scroll. How do I make the items (or tabs to the right) scroll down as the slider rotates? Otherwise the slider will show the 4th slide but not scroll to the 4th item on the right, but Thanks everyone. Here is the Coda-Slider plugin: // when the DOM is ready... $(document).ready(function () { var $panels = $('#slider .scrollContainer > div'); var $container = $('#slider .scrollContainer'); // if false, we'll float all the panels left and fix the width // of the container var horizontal = true; // float the panels left if we're going horizontal if (horizontal) { $panels.css({ 'float' : 'left', 'position' : 'relative' // IE fix to ensure overflow is hidden }); // calculate a new width for the container (so it holds all panels) $container.css('width', $panels[0].offsetWidth * $panels.length); } // collect the scroll object, at the same time apply the hidden overflow // to remove the default scrollbars that will appear var $scroll = $('#slider .scroll').css('overflow', 'hidden'); // apply our left + right buttons $scroll .before('<img class="scrollButtons left" src="images/scroll_left.png" />') .after('<img class="scrollButtons right" src="images/scroll_right.png" />'); // handle nav selection function selectNav() { $(this) .parents('ul:first') .find('a') .removeClass('selected') .end() .end() .addClass('selected'); } $('#slider .navigation').find('a').click(selectNav); // go find the navigation link that has this target and select the nav function trigger(data) { var el = $('#slider .navigation').find('a[href$="' + data.id + '"]').get(0); selectNav.call(el); } if (window.location.hash) { trigger({ id : window.location.hash.substr(1) }); } else { $('ul.navigation a:first').click(); } // offset is used to move to *exactly* the right place, since I'm using // padding on my example, I need to subtract the amount of padding to // the offset. Try removing this to get a good idea of the effect var offset = parseInt((horizontal ? $container.css('paddingTop') : $container.css('paddingLeft')) || 0) * -1; var scrollOptions = { target: $scroll, // the element that has the overflow // can be a selector which will be relative to the target items: $panels, navigation: '.navigation a', // selectors are NOT relative to document, i.e. make sure they're unique prev: 'img.left', next: 'img.right', // allow the scroll effect to run both directions axis: 'xy', onAfter: trigger, // our final callback offset: offset, // duration of the sliding effect duration: 500, // easing - can be used with the easing plugin: // http://gsgd.co.uk/sandbox/jquery/easing/ easing: 'swing' }; // apply serialScroll to the slider - we chose this plugin because it // supports// the indexed next and previous scroll along with hooking // in to our navigation. $('#slider').serialScroll(scrollOptions); // now apply localScroll to hook any other arbitrary links to trigger // the effect $.localScroll(scrollOptions); // finally, if the URL has a hash, move the slider in to position, // setting the duration to 1 because I don't want it to scroll in the // very first page load. We don't always need this, but it ensures // the positioning is absolutely spot on when the pages loads. scrollOptions.duration = 1; $.localScroll.hash(scrollOptions); /////////////////////////////////////////////// // autoscroll /////////////////////////////////////////////// // start to automatically cycle the tabs cycleTimer = setInterval(function () { $scroll.trigger('next'); }, 2000); // how many milliseconds, change this to whatever you like // select some trigger elements to stop the auto-cycle var $stopTriggers = $('#slider .navigation').find('a') // tab headers .add('.scroll') // panel itself .add('.stopscroll') // links to the stop class div .add('.navigation') // links to navigation id for tabs .add("a[href^='#']"); // links to a tab // this is the function that will stop the auto-cycle function stopCycle() { // remove the no longer needed stop triggers clearInterval(cycleTimer); // stop the auto-cycle itself $buttons.show(); // show the navigation buttons document.getElementById('stopscroll').style.display='none'; // hide the stop div document.getElementById('startscroll').style.display='block'; // block the start div } // bind stop cycle function to the click event using namespaces $stopTriggers.bind('click.cycle', stopCycle); /////////////////////////////////////////////// // end autoscroll /////////////////////////////////////////////// // edit to start again /////////////////////////////////////////////// // select some trigger elements to stop the auto-cycle var $startTriggers_start = $('#slider .navigation').find('a') // tab headers .add('.startscroll'); // links to the start class div // this is the function that will stop the auto-cycle function startCycle() { // remove the no longer needed stop triggers $buttons.hide(); // show the navigation buttons $scroll.trigger('next'); // directly to the next first cycleTimer = setInterval(function () { // now set timer again $scroll.trigger('next'); }, 5000); // how many milliseconds, change this to whatever you like document.getElementById('stopscroll').style.display='block'; // block the stop div document.getElementById('startscroll').style.display='none'; // hide the start div } // bind stop cycle function to the click event using namespaces $startTriggers_start.bind('click.cycle', startCycle); /////////////////////////////////////////////// // end edit to start /////////////////////////////////////////////// });

    Read the article

  • Stuck with Regular Expression code to apply HTML tag to text but exclude if inside <?> tag

    - by James Buckingham
    Hi there. I'm trying to write a bit of regex which would go through some text, written by our Editors, and apply an <acronym> tag to the first instance it finds of an abbreviation set we hold in our "Glossary of Terms". So for this example I've used the abbreviation ITS. 1st thing I thought I'd do is setup an example with a mix of scenerios I could test against, i.e. ITS sitting with punctuation, in HTML tags & ones that we've applied this to already (in other words the script has run through this before, so no need to do again). I'm almost there but just got stuck at the last point :-(. Here's the regex I've got so far - <[^<|]+?>?>ITS<[^<]+?>|ITS The Example - FROM ( EVERY ITS IN BOLD TO BE WRAPPED WITH ACRONYM ): I want you to tag thisITS, but not this wrapped one - <acronym title="ITS" id="thisIsATest">ITS</acronym> This is another test as I still want to update <p>ITS</p> that have other HTML tags wrapped around them.` ITS want ones that start sentences and ones that finish ITS. ITS, and ones which are wrapped in punctuation.` Test link: <a href="index.cfm>ITS</a> AND I WANT THIS CHANGE TO : I want you to tag this <acronym title="ITS">ITS</acronym>, but not this wrapped one - <acronym title="ITS">ITS</acronym> This is another test as I still want to update <acronym title="ITS">ITS</acronym> that have other HTML tags wrapped around them.` <acronym title="ITS">ITS</acronym> want ones that start sentences and ones that finish <acronym title="ITS">ITS</acronym>. <acronym title="ITS">ITS</acronym>, and ones which are wrapped in punctuation. Test link: <acronym title="ITS"><a href="index.cfm>ITS</a></acronym> Are there any Reg Ex experts out there that could help me finish this off? Any other hints tips would also be appreciated. Thanks a lot, James P.S. This is going to be placed in a ColdFusion application if that helps anyone in specific syntax.

    Read the article

  • Refresh a Div that has a Google ad inside it

    - by Abs
    Hello all, I have a div that holds a google ad. My website is mostly AJAX and there is no need for a browser refresh. That means my ads will not refresh either, which isnt ideal, a user staring at one ad all day. So I wanted a way to refresh a particular div on a page. I found many solutions but they didnt work. For example, using JQuery's html function: $("#ads").html("google ad script here"); This managed to refresh the whole page no idea how. I can also make an AJAX request to a HTML page that contains the google ad but I am guessing it will have the same effect as the above attempt. I do not want to use iFrames. Is there any other option open to me? My pea brain can not think of anymore. :) Thanks you for any help. EDIT: It is allowed since I will be initiating the refresh only when a user clicks a link. A prime example is Yahoo Mail - their new AJAX mailbox uses this same method, when a user clicks a link then a new ad is shown.

    Read the article

  • Saving images inside iPhone application without using database or server side saving technique

    - by bugs_bugs
    Hi Fellas, I am developing an application which requires saving images in the "saved folder" of iPhone Photo album after performing some animations on ImageViews. Is it possible to save the incomplete images temporarily in the iphone application without using database or server side saving technique, so that user can use it for future use and only completely changed ones should get saved in Photo Album? If yes then it would be a great help to get any code or suggestion. Thanks in advance :) !!!!

    Read the article

  • Slide div inside another div effect

    - by mariki
    I am trying to create sliding images effect: Online demolink text. The problem is when you click rapidly and randomly on the buttons and not wait for animation to finish causing unpredicted results and even stopping the functionality to work. (and once it stopped in the middle of 2 images...) How Can I make it work without bugs? I know that there are some other tools for that sliding like jquery and other approaches like changing the position attribute and not the scrollLeft attribute. But I want to do it as it is, with scrollLeft, if it possible of course. The Code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <style type="text/css"> body { padding:0px; margin:0px; } #imageContainer { width: 500px; position: relative; } #div { overflow: hidden; white-space: nowrap; } #div img { cursor: pointer; vertical-align: bottom; width: 500px; padding:0px; margin:0px; display:inline; } </style> <script type="text/javascript"> var scrollIntervalID; var currentIndex=0; function Scroll(ind){ var dir = ind ==currentIndex?0:ind<currentIndex?-1:1; var steps = Math.abs(ind-currentIndex); scrollIntervalID = setInterval(function(){ var i=(steps*10)-1; return function(){ if (i <= 0) clearInterval(scrollIntervalID); var elm = document.getElementById("div"); elm.scrollLeft +=dir * 50; i--; document.getElementById("span").innerHTML=elm.scrollLeft; } }(), 15); currentIndex=ind; } </script> </head> <body> <div id="imageContainer"> <div id="div"> <img id="image1" src="Images/pic1.jpg" width="500px"/><img id="image2" src="Images/pic2.jpg" width="500px"/><img id="image3" src="Images/pic3.jpg" width="500px"/><img id="image4" src="Images/pic4.jpg" width="500px"/> </div> </div> <div> <input type="button" value="1" onclick="Scroll(0);"/> <input type="button" value="2" onclick="Scroll(1);"/> <input type="button" value="3" onclick="Scroll(2);"/> <input type="button" value="4" onclick="Scroll(3);"/> </div> <span id="span"></span> </body> </html>

    Read the article

  • iPhone noob - setting NSMutableDictionary entry inside Singleton?

    - by codemonkey
    Yet another iPhone/Objective-C noob question. I'm using a singleton to store app state information. I'm including the singleton in a Utilities class that holds it (and eventually other stuff). This utilities class is in turn included and used from various view controllers, etc. The utilities class is set up like this: // Utilities.h #import <Foundation/Foundation.h> @interface Utilities : NSObject { } + (id)GetAppState; - (id)GetAppDelegate; @end // Utilities.m #import "Utilities.h" #import "CHAPPAppDelegate.h" #import "AppState.h" @implementation Utilities CHAPPAppDelegate* GetAppDelegate() { return (CHAPPAppDelegate *)[UIApplication sharedApplication].delegate; } AppState* GetAppState() { return [GetAppDelegate() appState]; } @end ... and the AppState singleton looks like this: // AppState.h #import <Foundation/Foundation.h> @interface AppState : NSObject { NSMutableDictionary *challenge; NSString *challengeID; } @property (nonatomic, retain) NSMutableDictionary *challenge; @property (nonatomic, retain) NSString *challengeID; + (id)appState; @end // AppState.m #import "AppState.h" static AppState *neoAppState = nil; @implementation AppState @synthesize challengeID; @synthesize challenge; # pragma mark Singleton methods + (id)appState { @synchronized(self) { if (neoAppState == nil) [[self alloc] init]; } return neoAppState; } + (id)allocWithZone:(NSZone *)zone { @synchronized(self) { if (neoAppState == nil) { neoAppState = [super allocWithZone:zone]; return neoAppState; } } return nil; } - (id)copyWithZone:(NSZone *)zone { return self; } - (id)retain { return self; } - (unsigned)retainCount { return UINT_MAX; //denotes an object that cannot be released } - (void)release { // never release } - (id)init { if (self = [super init]) { challengeID = [[NSString alloc] initWithString:@"0"]; challenge = [NSMutableDictionary dictionary]; } return self; } - (void)dealloc { // should never be called, but just here for clarity [super dealloc]; } @end ... then, from a view controller I'm able to set the singleton's "challengeID" property like this: [GetAppState() setValue:@"wassup" forKey:@"challengeID"]; ... but when I try to set one of the "challenge" dictionary entry values like this: [[GetAppState() challenge] setObject:@"wassup" forKey:@"wassup"]; ... it fails giving me an "unrecognized selector sent..." error. I'm probably doing something really obviously dumb? Any insights/suggestions will be appreciated.

    Read the article

  • loops and conditionals inside triggers

    - by Ying
    I have this piece of logic I would like to implement as a trigger, but I have no idea how to do it! I want to create a trigger that, when a row is deleted, it checks to see if the value of one of its columns exists in another table, and if it does, it should also perform a delete on another table based on another column. So say we had a table Foo that has columns Bar, Baz. This is what id be doing if i did not use a trigger: function deleteFromFooTable(FooId) { SELECT (Bar,Baz) FROM FooTable WHERE id=FooId if not-empty(SELECT * FROM BazTable WHERE id=BazId) DELETE FROM BarTable WHERE id=BarId DELETE FROM FooTable WHERE id=FooId } I jumped some hoops in that pseudo code, but i hope you all get where im going. It seems what i would need is a way to do conditionals and to loop(in case of multiple row deletes?) in the trigger statement. So far, I haven't been able to find anything. Is this not possible, or is this bad practice? Thanks!

    Read the article

  • MouseMotionListener inside JTable

    - by Harish
    I am trying to add MouseMotion event to the label and move it based on the dragging of the mouse and make it move along with my mouse.However the mousemotion is very difficult to control making this action not usable. Here is the code import java.awt.Color; import java.awt.Component; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; import javax.swing.BorderFactory; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableModel; public class TableTest { public TableTest() { String[] columnNames = { "FileName", "Integer" }; Object[][] data = { { new FileName("AAA.jpg", Color.YELLOW), new Integer(2) }, { new FileName("BBB.png", Color.GREEN), new FileName("BBB.png", Color.GREEN) }, { new FileName("CCC.jpg", Color.RED), new Integer(-1) }, }; DefaultTableModel model = new DefaultTableModel(data, columnNames) { public Class getColumnClass(int column) { System.out.println("column is" + column); return getValueAt(0, column).getClass(); } }; JTable table = new JTable(model); //JTable table = new JTable(data, columnNames); table.setDefaultRenderer(FileName.class, new FileNameCellRenderer()); final JLabel label = new JLabel("TESTING", SwingConstants.CENTER); label.setBackground(java.awt.Color.RED); label.setBounds(450, 100, 90, 20); label.setOpaque(true); label.setVisible(true); label.addMouseMotionListener(new MouseMotionListener() { public void mouseDragged(MouseEvent arg0) { label.setBounds(arg0.getX(), arg0.getY(), 90, 20); } public void mouseMoved(MouseEvent arg0) { // TODO Auto-generated method stub } }); table.add(label); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(table); frame.setSize(800, 600); frame.setLocationRelativeTo(null); frame.setVisible(true); } static class FileNameCellRenderer extends DefaultTableCellRenderer { public Component getTableCellRendererComponent(JTable table, Object v, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, v, isSelected, hasFocus, row, column); FileName fn = (FileName) v; setBorder(BorderFactory.createMatteBorder(0, 60, 0, 0, new java.awt.Color(143, 188, 143))); return this; } } static class FileName { public final Color color; public final String label; FileName(String l, Color c) { this.label = l; this.color = c; } public String toString() { return label; } } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { new TableTest(); } }); } } I just want to make the label follow the label follow my mouse and the label should be attached to the table.Is there an easy way than this.

    Read the article

  • Form Validation using Java inside PHP

    - by Mikey1980
    I have a simple problem but no matter what I try I can't see to get it to work. I have a form on a php page and I need to validate the qty value on my form so that it doesn't exceed $qty (value pulled from mySQL) and is not less than zero. Sounds easy--hmm wish it were..lol! I had it checking if the value was numeric and in my attempts to make this work I even broke that--not a good morning..lol! Here's a snip of my Java Fn: <script type='text/javascript'> function checkQty(elem){ var numericExpression = /^[0-9]+$/; if(elem.value.match(numericExpression)){ return true; }else{ alert("Quantity for RMA must be greater than zero and less than original order!"); elem.focus(); return false; } } </script> The function is called from the submit button, onClick: <input type="submit" name="submit" onclick="checkQty(document.getElementById('qty')";"> I've tried: var numericExpression = /^[0-9]+$/; if(elem.value.match(numericExpression) || elem.value < 0 || elem.value > <? int($qty) ?>){ No dice....HELP!?!

    Read the article

  • Unpacking an assembly inside of a war

    - by Walter White
    Hi all, I have another project which contains static content (css, images, JS, etc.), and I need that to be copied to the web root directory of jetty for testing. In that project, I output a zip file packaging up all of the images, CSS, etc. I have several of those virtualhost projects for different clients and my question is, how do I unpack the zip file that was already installed into the maven repository to the jetty web root? Walter

    Read the article

  • executing a script from maven inside a multi module project

    - by Roman
    Hi everyone. I have this multi-module project. In the beginning of each build I would like to run some bat file. So i did the following: <profile> <id>deploy-db</id> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1.1</version> </plugin> </plugins> <pluginManagement> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1.1</version> <executions> <execution> <phase>validate</phase> <goals> <goal>exec</goal> </goals> <inherited>false</inherited> </execution> </executions> <configuration> <executable>../database/schemas/import_databases.bat</executable> </configuration> </plugin> </plugins> </pluginManagement> </build> </profile> when i run the mvn verify -Pdeploy-db from the root I get this script executed over and over again in each of my modules. I want it to be executed only once, in the root module. What is there that I am missing ? Thanks

    Read the article

  • ibatis/Oracle - SELECT query inside INSERT is failing

    - by whoopy_whale
    Hi, I'm trying to do an Insert operation using iBatis. INSERT INTO SCHEMA.TABLE (FIELD1, FIELD2, FIELD3) VALUES (#field1#, (SELECT ANOTHER_FIELD FROM SCHEMA.TABLE WHERE FIELD4= #field2#), #field2#) The inner select query always fails and returns NULL. But if I substitute #field2# with the actual value only in the inner query, it works fine. Why is iBatis not substituting fieldvalues in the innerqueries? Any ideas?

    Read the article

  • Unable to find reference to std library math function inside library

    - by Alex Marshall
    Hello, I've got several programs that use shared libraries. Those shared libraries in turn use various standard C libraries. ie Program A and Program B both use Shared Library S. Shared Library S uses std C math. I want to be able to statically link Shared Library S against the standard library, and then statically link Programs A and B against S so that I don't have to be dragging around the library files, because these programs are going to be running on an embedded system running BusyBox 0.61. However, when I try to statically link the programs against Shared Library S, I get an error message from GCC stating : ../lib/libgainscalecalc.a(gainscalecalc.): In function 'float2gs': [path to my C file].c:73: undefined reference to 'log' Can somebody please help me out ? The make commands I'm using are below : CFLAGS += -Wall -g -W INCFLAGS = -I$(CROSS_INCLUDE)/usr/include LIBFLAGS += -L$(CROSS_LIB)/usr/lib -lm gainscalecalc_static.o: gainscalecalc.c $(CC) $(CFLAGS) -c $< -I. $(INCFLAGS) -o $@ gainscalecalc_dynamic.o: gainscalecalc.c $(CC) $(CFLAGS) -fPIC -c $< -o $@ all: staticlib dynamiclib static_driver dynamic_driver clean: $(RM) *.o *.a *.so *~ driver core $(OBJDIR) static_driver: driver.c staticlib $(CC) $(CFLAGS) -static driver.c $(INCFLAGS) $(LIBFLAGS) -I. -L. -lgainscalecalc -o $@ dynamic_driver: driver.c dynamiclib $(CC) $(CFLAGS) driver.c -o $@ -L. -lgainscalecalc staticlib: gainscalecalc_static.o $(AR) $(ARFLAGS) libgainscalecalc.a gainscalecalc_static.o $(RANLIB) libgainscalecalc.a chmod 777 libgainscalecalc.a dynamiclib: gainscalecalc_dynamic.o $(CC) -shared -o libgainscalecalc.so gainscalecalc_dynamic.o chmod 777 libgainscalecalc.so Edit: Linking against the shared libraries compiles fine, I just haven't tested them out yet

    Read the article

  • Many DIVs inside parent DIV, CSS height issue

    - by Benjamin
    Hi everyone, I am putting together a dynamic photo gallery and getting stuck trying to place thumbnails. Basically I am trying to place each thumbnail and caption in its own DIV, floated to the left. The thumbnails are working just as I want them to but for some reason the parent DIV refuses to cover the height of the thumbnail area. Here is the CSS I am using.. #galleryBox { width: 650px; background: #fff; margin: auto; padding: 5px; text-align: center; } .item { display: block; margin: 10px; padding: 10px; float: left; background: #353535; min-width: 120px; } .label { display: block; color: #fff; } I have tried height: auto and that hasn't done anything. Here is what I am trying to style: <div id="galleryBox" class="ui-corner-all"> <div class="item ui-corner-all"> <img src="http://tapp-essexvfd.org/images/ajax-loader.gif" alt="test"/><br/> <p><span class="label">Testing</span></p> </div> <div class="item ui-corner-all"> <img src="http://tapp-essexvfd.org/images/ajax-loader.gif" alt="test"/><br/> <p><span class="label">Testing</span></p> </div> <div class="item ui-corner-all"> <img src="http://tapp-essexvfd.org/images/ajax-loader.gif" alt="test"/><br/> <p><span class="label">Testing</span></p> </div> <div class="item ui-corner-all"> <img src="http://tapp-essexvfd.org/images/ajax-loader.gif" alt="test"/><br/> <p><span class="label">Testing</span></p> </div> <div class="item ui-corner-all"> <img src="http://tapp-essexvfd.org/images/ajax-loader.gif" alt="test"/><br/> <p><span class="label">Testing</span></p> </div> <div class="item ui-corner-all"> <img src="http://tapp-essexvfd.org/images/ajax-loader.gif" alt="test"/><br/> <p><span class="label">Testing</span></p> </div> <div class="item ui-corner-all"> <img src="http://tapp-essexvfd.org/images/ajax-loader.gif" alt="test"/><br/> <p><span class="label">Testing</span></p> </div> </div> Thanks!

    Read the article

  • Getting the highlighted text inside selected element only.

    - by ashays
    My goal is to be able to get the highlighted text within a document, but only if that text is within a given section, and then apply a certain style to that selected text after clicking a div tag. I'll explain what I mean: So, having looked at window.getSelection() and document.selection.createRange().text, I attempted to use elmnt.getSelection() or elmnt.selection.createRange().text for some HTML element, elmnt. However, it doesn't seem to work, so that idea seems pretty null. This means I can't use this idea to determine the text that is highlighted within a given location. In case this doesn't make sense, essentially, I want html code that looks like this: <body> <div id="content">Stuff here will not be effected</div> <div id="highlightable">Stuff here can be effected when highlighted</div> <div id="morecontent">Stuff here will also not be effected</div> </body> So that whenever I've highlighted text, clicking on a specified div will apply the proper CSS. Now, on to the div tags. Basically, here's what I've got on that: $('.colorpicker').click( function(e) { console.log(getSelectedText()); } Eventually, all I want this to highlight the selected text and have the div tag change the color of the selected text to that of the respective div tag that I've selected. Neither of these seems to be working right now, and my only guess for the reason of the div tag is that it unhighlights whatever I've got selected whenever I click on the div tag. Fallbacks: If there is more than one time that 'abc' is found on the page and I highlight to color 'abc', I would like that only that copy of 'abc' be highlighted. I know this is a lot in one question, but even if I could get a little head start on this idea, my next personal project would be going a lot more smoothly. Thanks. :)

    Read the article

  • STL map inside map C++

    - by Prasanth Madhavan
    In c++ STL map, i have a definition like map<string, map<int, string> >; and i iterate it using the following code. for( map<string, map<int, string> >::iterator ii=info.begin(); ii!=info.end(); ++ii){ for(map<int, string>::iterator j=ii->second.begin(); j!=ii->second.end();++j){ cout << (*ii).first << " : " << (*j).first << " : "<< (*j).second << endl; } } My doubt is is this the correct way to iterate or is there a better way to do so? The above code works for me. But m looking for a more elegant solution.

    Read the article

  • Controller inside MVC architechture

    - by Vinay
    Hi All, I want to know about the controller in struts MVC architecture. Does struts-conf.xml file is a controller. I know that it is a part of controller, but someone is saying that it is a controller and at what extend it is true. Please explain it. Thanks Vinay

    Read the article

  • How to download file from inside Seam PDF

    - by Shervin
    Hello. In out project we are creating a pdf by using seam pdf and storing that pdf in the database. The user can then search up the pdf and view it in their pdf viewer. This is a small portion of the code that is generated to pdf: <p:html> <a:repeat var="file" value="#{attachment.files}" rowKeyVar="row"> <s:link action="#{fileHandler.downloadById()}" value="#{file.name}" > <f:param name="fileId" value="#{file.id}"/> </s:link> </a:repeat> When the pdf is rendered, a link is generated that points to: /project/skjenkebevilling/status/status_pdf.seam?fileId=42&actionMethod=skjenkebevilling%2Fstatus%2Fstatus_pdf.xhtml%3AfileHandler.downloadById()&cid=16 As you can see this link doesnt say much, and the servletpath seems to be missing. If I change /project with the servletpath localhost:8080/saksapp/skjenkebevilling/status/status_pdf.seam?fileId=42&actionMethod=skjenkebevilling%2Fstatus%2Fstatus_pdf.xhtml%3AfileHandler.downloadById%28%29&cid=16 Than the download file dialog appears. So my question is, does anyone know how I can input the correct link? And why this s:link doesnt seem to work? If I cannot do that, then I will need to somehow do search replace and edit the pdf, but that seems like a bit of a hack. (This is running under JBoss) Thank you for your time....

    Read the article

  • How to use an UpdatePanel inside a Reapeater ItemTemplate with a HTML Table

    - by vanslly
    I want to allow the user to edit by data by row, so only need content updated by row. I managed to achieve this by using a Repeater with a UpdatePanel in the ItemTemplate. Using a div <asp:ScriptManager ID="ctlScriptManager" runat="server" /> <asp:Repeater ID="ctlMyRepeater" runat="server"> <ItemTemplate> <div> <asp:UpdatePanel ID="ctlUpdatePanel" runat="server"> <ContentTemplate> <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' /> <asp:LinkButton ID="btnRename" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Rename">Rename...</asp:LinkButton> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnRename" EventName="Click" /> </Triggers> </asp:UpdatePanel> </div> </ItemTemplate> </asp:Repeater> But, I want to use a table to ensure structure and spacing and CSS styling wasn't doing it for me, but when I use a table everything goes whacky. Using a Table <asp:ScriptManager ID="ctlScriptManager" runat="server" /> <table> <asp:Repeater ID="ctlMyRepeater" runat="server"> <ItemTemplate> <asp:UpdatePanel ID="ctlUpdatePanel" runat="server"> <ContentTemplate> <tr> <td> <asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' /> </td> <td> <asp:LinkButton ID="btnRename" runat="server" CommandArgument='<%# Eval("ID") %>' CommandName="Rename">Rename...</asp:LinkButton> </td> </tr> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnRename" EventName="Click" /> </Triggers> </asp:UpdatePanel> </ItemTemplate> </asp:Repeater> </table> What's the best way to solve this problem? I prefer using a table, because I really want to enfore structure without reliance on CSS. Thanks in advance.

    Read the article

  • Can't get focus on a TextBox inside a ListBox using Silverlight

    - by Steve Temple
    I'm having a little trouble in silverlight with a listBox containing databound textBox elements. The items display correctly in the list and the textBox is populated correctly but I can't get focus on the text box in the list. If I hover over the edges of the textBox it highlights but it won't let me click into it to edit the text. Any ideas? My XAML looks like this: <ListBox x:Name="listImages"> <ListBox.ItemTemplate> <DataTemplate> <Grid x:Name="LayoutRoot" Background="White"> <Image Height="102" HorizontalAlignment="Left" Name="imgThumb" Stretch="UniformToFill" VerticalAlignment="Top" Width="155" Source="{Binding ImageFilename, Converter={StaticResource ImageConverter}}" /> <TextBox Height="23" HorizontalAlignment="Left" Margin="154,25,0,0" Name="txtAltText" VerticalAlignment="Top" Width="239" Text="{Binding Alt}" /> <dataInput:Label Height="19" HorizontalAlignment="Left" Margin="154,6,0,0" Name="lblAltText" VerticalAlignment="Top" Width="239" Content="Alt Text" /> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox>

    Read the article

  • Can we have ExtJs components inside a Flex driven page

    - by shafi
    Hi, I am working on a page which mainly consists of Charts and Grids. Thought that Flex would be the best fit with some cool effects. But however, I now feel that ExtJs grid looks better than Flex data grid. My question is whether there is any possibility / mechanism to embed Ext JS grid into a Flex page. Lets say my main page has a Flex tab panel. In first tab, I would like to see 'Flex Chart' and in second tab I would want to see 'ExtJS grid'. I would also want to know of any Flex Data grid plugin (if exists), which looks/works just like Ext Js grid. Thanks & Regards Shafi

    Read the article

  • structure inside structure - c++ Error

    - by gamadeus
    First of all the error I am getting is of the type: Request for member 's' of struct1.struct1::struct2, which is of non class type '__u32' where: struct struct1 { struct x struct2; struct x struct3; struct x struct4; }; The usage is of the form: struct struct1 st1; st1.struct2.s = Value; Now my struct1 is: struct ip_mreq_source { struct in_addr imr_multiaddr; struct in_addr imr_sourceaddr; struct in_addr imr_interface; }; struct 'x' is in_addr Where: typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; }; element 's' is the element s_addr in in_addr. My detailed error coming out of g++ (GCC 4.4.3) from the Android based compiler: arm-linux-androideabi-g++ -MMD -MP -MF groupsock/GroupsockHelper.o.d.org -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fno-exceptions -fno-rtti -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline- limit=64 -Igroupsock/include -Igroupsock/../UsageEnvironment/include -Iandroid- ndk-r5b/sources/cxx-stl/system/include -Igroupsock -DANDROID -Wa,--noexecstack -DANDROID_NDK -Wall -fexceptions -O2 -DNDEBUG -g -Iandroid-8/arch-arm/usr/include -c groupsock/GroupsockHelper.cpp -o groupsock/GroupsockHelper.o && rm -f groupsock/GroupsockHelper.o.d && mv groupsock/GroupsockHelper.o.d.org groupsock/GroupsockHelper.o.d groupsock/GroupsockHelper.cpp: In function 'Boolean socketJoinGroupSSM(UsageEnvironment&, int, netAddressBits, netAddressBits)': groupsock/GroupsockHelper.cpp:427: error: request for member 's_addr' in 'imr.ip_mreq_source::imr_multiaddr', which is of non-class type '__u32' groupsock/GroupsockHelper.cpp:428: error: request for member 's_addr' in 'imr.ip_mreq_source::imr_sourceaddr', which is of non-class type '__u32' groupsock/GroupsockHelper.cpp:429: error: request for member 's_addr' in 'imr.ip_mreq_source::imr_interface', which is of non-class type '__u32' I am not sure what is causing the error. Any pointers would be great - no pun intended. Thanks

    Read the article

  • jQuery How do I move an element inside of another element

    - by TripWired
    Hi I'm using grails navigation plugin and when it generates menus it put the sub navigation underneath the main menu, but i'm making my menu a vertical menu so i don't want the sub menu under the whole menu i want it under the active element. Example: this is how it generate the menu and sub menu <ul class="mainmenu"> <li>item1</li> <li>item2</li> <li>item3</li> </ul> <ul class="submenu"> <li>item1</li> <li>item2</li> <li>item3</li> </ul> What i want is: <ul class="mainmenu"> <li>item1 <ul class="submenu"> <li>item1</li> <li>item2</li> <li>item3</li> </ul> </li> <li>item2</li> <li>item3</li> </ul> Since i don't know of a way to make grails nav plugin do this i guess i'll have to make jquery do it after it's generated. Any ideas?

    Read the article

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