Search Results

Search found 7519 results on 301 pages for 'anchor tag'.

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

  • getting at a UIButton with the tag property IPhone

    - by dubbeat
    Hey There, I'm having a little trouble using the tag property to access a UIButton UIButton *randomButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect ]retain]; randomButton.frame = CGRectMake(205, 145, 90, 22); // size and position of button [randomButton setTitle:@"Random" forState:UIControlStateNormal]; randomButton.backgroundColor = [UIColor clearColor]; randomButton.adjustsImageWhenHighlighted = YES; [randomButton addTarget:self action:@selector(getrandom:) forControlEvents:UIControlEventTouchUpInside]; randomButton.reversesTitleShadowWhenHighlighted=YES; randomButton.toggleButton [self.view addSubview:randomButton]; [randomButton release]; randomButton.tag=333; Then later on in code I try to get at the button in the following manner which gives me an error saying Incompatible Objective-C types initializing 'struct UIView *', expected 'struct UIButton *' UIButton *random = [self.view viewWithTag:333]; random.highlighted=NO;

    Read the article

  • jQuery: Insert html from "title" tag into a "span" of a H2 tag

    - by lorenzium
    Hey guys, Say I had the following HTML: <h2>Heading <span></span></h2> <ul> <li><a href="#" title="I am wanting to be in H2!">Something</a></li> <li><a href="#" title="I too am wanting to be in H2!">Something else</a></li> </ul> I want to be able to take the title tag from the and place it inside the span of the h2. How can I do so? Cheers.

    Read the article

  • datagridview winform tag only brings back the first row value

    - by jvcoach23
    I'm using visual studio 2008. I have a datagridview in a winform. I've bound to it using an object Private Sub LoadAllCampers() Dim Os As List(Of LE.Camper) = Nothing Dim Oc As New LE.Camper_Controller Os = Oc.GetCamperData(0) With Me.dgResults .DataSource = Os End With CamperBindingSource.DataSource = Os End Sub I have a tag setup on the ID property within the Camper class. when i double click on a row in teh datagridview, i do a me.dgResults.tag and it always shows the first rows ID value. If i change the ordering within the class, it will display a different value, but it's always the first value in the datagridview. I'm missing something simple to get this working.. just don't know what it is. Hopefully someone can spare a minute.

    Read the article

  • Tag Cloud Data Backend

    - by Waldron
    I want to be able to generate tag clouds from free text that comes from any number of different sources. For clarity, I'm not talking about how to display a tag cloud once the critical tags/phrases are already discovered, I'm hoping to be able to discover the meaningful phrases themselves... preferable on a PHP/MySQL stack. If I had to do this myself, I'd start by establishing some kind of index for words/phrases that gives a "normal" frequency for any word/phrase. eg "Constantinople" occurs once in every 1,000,000 words on average (normal frequency "0.000001"). Then as I analyze a body of text, I'd find the individual words/phrases (another challenge!), find frequencies of each within the input, and measure against the expected freqeuncy. Words that have the highest ratio against expected frequency get boosted priority in the cloud. I'd like to believe someone else has already done this, WAY better than I could hope to, but I'll be damned if I can find it. Any recommendations??

    Read the article

  • Tag suggestion (not tag autocomplete)

    - by takeshin
    AJAX autocomplete is fairly simple to implement. However, I wonder how to handle smart tag suggestion like this on SO. To clarify the difference between autocomplete and suggestion: autocomplete: foo [foobar, foobaz] suggestion: foo [barfoo, foobar, foobaz], or even better, with 'did you mean' feature: [barfoo, foobar, foobaz, fobar, fobaz] I suppose I need some full text search in tags (all letters indexed, not just words). There would be no problem to do it witch regex or other patterns for limited number of tags (even client side). But how to implement this feature for big number of tags? Is there any particular reason (besides URL) the tags on SO are dash separated? What about Unicode characters in tags? I store the tags in the table with the following columns: id, tagname. My SQL query returns objects with following fields: id, tagname, count

    Read the article

  • Django Template tag, generating template block tag

    - by Issy
    Hi Guys, Currently a bit stuck, wondering if anyone can assist. I am using django-adminfiles. Which is a near little application. I want to use it to insert images into posts/articles/pages for a site i am building. How django-adminfiles works is it inserts a placeholder i.e <<< ImageFile and this gets rendered using a django template. It also has the feature of inserting custom options i.e (Insert Medium Image) , i figured i would used this to automatically resize images and include it in the post (similar to how WP does it). Django-adminfiles makes use of sorl.thumbnail app to generate thumbnails. So i have tried testing generating thumbnails: The current template that is used to render the inserted image is: {% spaceless %} <img src="{{ upload.upload.url }}" width="{{ upload.width }}" height="{{ upload.height }}" class="{{ options.class }}" class="{{ options.size }}" alt="{% if options.alt %}{{ options.alt }}{% else %}{{ upload.title }}{% endif %}" /> {% endspaceless %} I tried modifying this to: {% load thumbnail %} {% spaceless %} <img src="{% thumbnail upload.upload.url 200x50 %}" width="{{ upload.width }}" height="{{ upload.height }}" class="{{ options.class }}" class="{{ options.size }}" alt="{% if options.alt %}{{ options.alt }}{% else %}{{ upload.title }}{% endif %}" /> {% endspaceless %} I get the error: Exception Value: Caught an exception while rendering: Source file: '/media/uploads/DSC_0014.jpg' does not exist. I figured the thumbnail needs the absolute path so tried putting that in the template, and that works. i.e this works: {% thumbnail '/Users/me/media/uploads/DSC_0014.jpg' 200x50 %} So basically i need to generate the absolute path to the file give the relative path (to web root). You could do this by passing the MEDIA_ROOT setting to the template, but the reason i want to do a template tag is to programmatically set the image size.

    Read the article

  • jquery click on anchor element forces scroll to top?

    - by Dan.StackOverflow
    http://stackoverflow.com/questions/720970/jquery-hyperlinks-href-value[link text][1] I am running in to a problem using jquery and a click event attached to an anchor element. [1]: http://stackoverflow.com/questions/720970/jquery-hyperlinks-href-value "This" SO question seems to be a duplicate, and the accepted answer doesn't seem to solve the problem. Sorry if this is bad SO etiquette. In my .ready() function I have: jQuery("#id_of_anchor").click(function(event) { //start function when any update link is clicked Function_that_does_ajax(); }); and my anchor looks like this: <a href="#" id="id_of_anchor"> link text </a> but when the link is clicked, the ajax function is performed as desired, but the browser scrolls to the top of the page. not good. I've tried adding: event.preventDefault(); before calling my function that does the ajax, but that doesn't help. What am I missing? Clarification I've used every combination of return false; event.preventDefault(); event.stopPropagation(); before and after my call to my js ajax function. It still scrolls to the top.

    Read the article

  • problem in accessing the path involving pagination using display tag

    - by sarah
    Hi All, I am using display tag for pagiantion and display of the data in table format the code is like <display:column title="Select" style="width: 90px;"> <input type="checkbox" name="optionSelected" value="<c:out value='${userList.loginName}'/>"/> </display:column> <display:column property="loginName" sortable="false" title="UserName" paramId="loginName" style="width: 150px; text-align:center" href="./editUser.do?method=editUser"/> the pagesize is one it will display one in a page and eidt page will be dispaly on click of login name,but when i go to the second page i get an error saying /views/editUser path not found.How exactly should i define the path ? the struts-config is like <!-- action for edit user --> <action path="/editUser" name="editUserForm" type="com.actions.UserManagementAction" parameter="method" input="/EditUser.jsp" scope="request"> <forward name="success" path="/views/EditUser.jsp" /> <forward name="failure" path="/views/failure.jsp" /> </action> Pleas tell me how should i define the access path for display tag as on click of edit link the first page works but not the second edit

    Read the article

  • Building Tag Cloud Declarative ADF Component

    - by Arunkumar Ramamoorthy
    When building a website, there could a requirement to add a tag cloud to let the users know the popular tags (or terms) used in the site. In this blog, we would build a simple declarative component to be used as tag cloud in the page. To start with, we would first create the declarative component, which could display the tag cloud. We will do that by creating a new custom application from the new gallery. Give a name for the app and the project and from the new gallery, let us create a new ADF Declarative Component We need to specify the name for the declarative component, attributes in it etc. as follows For displaying the tags as cloud, we need to pass the content to this component. So, we will create an attribute to hold the values for the tag. Let us name it as "value" and make it as java.lang.String  type. Once after this, to hold the component, we need to create a tag library. This can be done by clicking on the Add Tag Library button. Clicking on OK buttons in all the open dialogs would create a declarative component for us. Now, we need to display the tag cloud based on the value passed to the component. To do that, we assume that the value is a Tree Binding and has two attributes in it, say "Name" and "Weight". To make a tag cloud, we would put together the "Name" in a loop and set it's font size based on the "Weight". After putting our logic to work, here is how the source look Attributes added to the declarative components can be retrieved by using #{attrs.<attribute_name>}. Now, we need to deploy this project as ADF Library Jar file, so that this can be distributed to the consuming applications. We'll select ADF Library Jar as type and create the profile. We would be getting the jar file after deployment. To test the functionality, we could create a simple Fusion Web Application. To add our custom component to the consuming application, we can create a file system connection pointing to the location where the jar file is and add it or, add through the project properties of the ViewController project. Now, our custom component has been added to the consuming application. We could test that by creating a VO in the model project with a query like, select 'Faces' as Name,25 as Weight from dual union all select 'ADF', 15 from dual  union all select 'ADFdi', 30 from dual union all select 'BC4J', 20 from dual union all select 'EJB', 40 from dual union all select 'WS', 35 from dual Add this VO to the AppModule, so that it would be exposed to the data control. Then, we could create a jspx page, and add a tree binding to the VO created. We can now see our Tag Cloud declarative component is available in the component palette.  It can be inserted from the component palette to our page and set it's value property to CollectionModel of the tree binding created. Now that we've created the Declarative component and added that to our page successfully, we can run the page to see how it looks. As per the query, the Tags are displayed in different fonts, based on their weight.

    Read the article

  • SAXException: bad envelope tag

    - by David Guzman
    I'm trying to connect to a webservice https protected through a webservice client. Eclipse generated a stub based webservice client and looks nice to me. The problem comes when I try to call a method from the webservice: String a = (String)webservice.userProfileServices(xml); I'm also using the following SOAP headers: esgGatewayPort = (new EsgGatewayLocator()).getesgGatewayPort(); //setting the authentication header PrefixedQName name = new PrefixedQName("http://schemas.xmlsoap.org/ws/2002/07/secext","Security","wsse"); System.out.println("Setting headers for authentication"); org.apache.axis.message.SOAPHeaderElement sh = new org.apache.axis.message.SOAPHeaderElement(name); SOAPElement sub; try { String clntUserName="myUser"; String clntPassword="myPassword"; sub = sh.addChildElement("UsernameToken"); SOAPElement element = sub.addChildElement("Username"); element.addTextNode(clntUserName); element = sub.addChildElement("Password"); element.addTextNode(clntPassword); ((org.apache.axis.client.Stub) esgGatewayPort).setHeader(sh); } catch (SOAPException e) { e.printStackTrace(); } I receive the following: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: Bad envelope tag: HTML faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: Bad envelope tag: HTML at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:71) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:133) at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:153) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) Any help will be truly appreciated David

    Read the article

  • Tag, comment, rating, etc. database design

    - by Efe Kaptan
    I want to implement modules such as comment, rating, tag, etc. to my entities. What I thought was: comments_table - comment_id, comment_text entity1 - entitity1_id, entity1_text entity2 - entitity2_id, entity2_text entity1_comments - entity1_id, comment_id entity2_comments - entity2_id, comment_id .... Is this approach correct?

    Read the article

  • MYSQL and Array with PHP for create Tag Cloud

    - by asilloo
    Hi, I'm trying to make a Tag cloud for every user in own page, I'm using PHP5 and Mysql, My table named "tags" and I want to make a array but in short way. The table like below, The array can be like for user1 array={[car,1],[cat,null],[pen,1],[dvd,1],[cd,null]} Username totaltag tag1 tag2 tag3 tag4 tag5 admin 5 car cat pen dvd cd user1 1 1 1 user2 1 2 12 1 user3 3 2 10 1

    Read the article

  • How to display lyrics that are stored in MP3-Tag?

    - by Der_Techniker
    How can I achieve that goal? I tried many players - banshee, rhythmbox, amarok, exaile... none of them displays lyrics that are already stored in the mp3. They always try to fetch lyrics from the internet. Interestingly, banshee supports STORING lyrics into the mp3 but not READING - I find that annoying... One player though does it properly - gmusicbrowser. But this piece of software has a so confusing user interface - I don't wanna use it. Any ideas?

    Read the article

  • Assigning outcome of another JSTL tag as value of one JSTL tag

    - by NoozNooz42
    I've got this, which is working: <c:choose> <c:when test="${sometest}"> Hello, world! </c:when> <c:otherwise> <fmt:message key="${page.title}" /> </c:otherwise> </c:choose> And I want to change it to this: <c:choose> <c:when test="${sometest}"> <c:set var="somevar" scope="page" value="Hello, world!"/> </c:when> <c:otherwise> <c:set var="somevar" scope="page" value="<fmt:message key="${page.title}">" </c:otherwise> </c:choose But of course the following line ain't correct: <c:set var="somevar" scope="page" value="<fmt:message key="${page.title}">" How can I assign to the somevar variable the string resulting from a call to fmt:message?

    Read the article

  • RegEx to extract all HTML tag attributes including inline JavaScript

    - by Mike
    I found this useful regex code here while looking to parse HTML tag attributes: (\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|[>"']))+.)["']? It works great, but it's missing one key element that I need. Some attributes are event triggers that have inline Javascript code in them like this: onclick="doSomething(this, 'foo', 'bar');return false;" Or: onclick='doSomething(this, "foo", "bar");return false;' I can't figure out how to get the original expression to not count the quotes from the JS (single or double) while it's nested inside the set of quotes that contain the attribute's value.

    Read the article

  • Set tag and hidden for objects on custom UITableViewCell

    - by Rob
    I am re-using Apple's AdvancedTableViewCells example to create a custom, fast-scrolling tableview. Specifically, I am using their CompositeSubviewBasedApplicationCell method which draws the content on the tableviewcell with drawRect Everything works, but how do you hide a label or set the tag for a label or image using their method? Doing it this way is pretty new to me (without IB), so I apologize ahead of time if it's something easy. The code that sets the cell content is: - (void)drawRect:(CGRect)rect { [_cell.animalIcon drawAtPoint:CGPointMake(5.0, 5.0)]; [_cell.animalName drawAtPoint:CGPointMake(93.0, 25.0)]; _highlighted ? [[UIColor whiteColor] set] : [[UIColor colorWithWhite:0.23 alpha:1.0] set]; [_cell.animalDescription drawAtPoint:CGPointMake(100.0, 54.0) withFont:[UIFont boldSystemFontOfSize:13.0]]; [_cell.animalNameString drawAtPoint:CGPointMake(93.0, 5.0) withFont:[UIFont boldSystemFontOfSize:13.0]]; }

    Read the article

  • Fake "user initiated" <audio> tag on iPad

    - by Alex Ford
    I know that Apple's docs say that an mp3 within an <audio tag on iPhone OS can't be played without user intervention (they cite bandwidth concerns, totally reasonable). However, has anyone succeeded in faking a user action to play the audio? Perhaps faking events to off screen native audio controls with JavaScript? I'm using jPlayer right now which works great on desktop Safari, but is silent on my iPad. I'm prototyping a touch interface using WebKit on the iPad, and audio is an integral part of the experience, so yes, I do have a good reason to want to override this convention. I'd appreciate any help. Thanks.

    Read the article

  • Validation error while putting <h> tag inside <a> tag(document type does not allow element "h2")

    - by makmour
    when using this code: <div class="menu"> <ul id="mainnav"> <li><h2><a href="dir1/" >AAAAA</a></h2> <ul> <li><a href="dir1/xxx.php"><h3>xxx</h3></a></li> <li><a href="dir1/xxx2.php"><h3>xxx2</h3></a></li> <li><a href="dir1/hxxx3.php"><h3>hxxx3</h3></a></li> </ul> </li> I get an error while validating saying that I should put <h2> outside of <a>. document type does not allow element <h2> When I do this validation passes without any problems but my styling breaks. Is there a way to keep both validation and styling? This is styling for menu and <h2> .menu li a{ font: 100% Helvetica, Arial, sans-serif; display:inline-block; color: #fff; } .menu li a:hover{ color: #014661; background: url('../images/menu1.png') center left no-repeat; } .menu li a h2{ font-size: 92%; padding: 8px 18px; font-weight: bold; text-transform: uppercase; } .menu h3{ font-size: 87%; font-weight: bold; text-transform: uppercase; } .menu li a h2:hover{ background: url('../images/menu2.png') center right no-repeat; }

    Read the article

  • Zend Framework decorator subform add a class tag to DD wrapper tag

    - by Samuele
    I have this form: class Request_Form_Prova extends Zend_Form { public function init() { $this->setMethod('post'); $SubForm_Step = new Zend_Form_SubForm(); $SubForm_Step->setAttrib('class','Step'); $this->addSubform($SubForm_Step, 'Chicco'); $PrivacyCheck = $SubForm_Step->createElement('CheckBox', 'PrivacyCheck'); $PrivacyCheck->setLabel('I have read and I agre bla bla...') ->setRequired(true) ->setUncheckedValue(''); $PrivacyCheck->getDecorator('Label')->setOption('class', 'inline'); $SubForm_Step->addElement($PrivacyCheck); $SubForm_Step->addElement('submit', 'submit', array( 'ignore' => true, 'label' => 'OK', )); } } That generate this HTML: <form enctype="application/x-www-form-urlencoded" method="post" action=""> <dl class="zend_form"> <dt id="Chicco-label">&nbsp;</dt> <dd id="Chicco-element"> <fieldset id="fieldset-Chicco" class="Step"> <dl> <dt id="Chicco-PrivacyCheck-label"><label for="Chicco-PrivacyCheck" class="inline required">I have read and I agre bla bla...</label></dt> <dd id="Chicco-PrivacyCheck-element"> <input type="hidden" name="Chicco[PrivacyCheck]" value=""><input type="checkbox" name="Chicco[PrivacyCheck]" id="Chicco-PrivacyCheck" value="1"> </dd> <dt id="submit-label">&nbsp;</dt> <dd id="submit-element"> <input type="submit" name="Chicco[submit]" id="Chicco-submit" value="OK"> </dd> </dl> </fieldset> </dd> </dl> </form> How can I add a class="Test" to the <dd id="Chicco-element"> elemnt? In order to have it like that: <dd id="Chicco-element" class="Test"> I thought something like that but it don't work: $SubForm_Step->getDecorator('DdWrapper')->setOption('class', 'Test'); OR $SubForm_Step->getDecorator('DtDdWrapper')->setOption('class', 'Test'); How can I do it? And last question: How can I wrap that DD and DT element of a SubForm in another DL element? Like that: ( second line ) <dl class="zend_form"> <dl> <dt id="Chicco-label">&nbsp;</dt> <dd id="Chicco-element"> <fieldset id="fieldset-Chicco" class="Step"> <dl> .......

    Read the article

  • Custom Django tag & jQuery

    - by pocoa
    I'm new to Django. Today I created some Django custom tags which is not that hard. But now I wonder what is the best way to include some jQuery or some Javascript code packed into my custom tag definition. What is the regular way to include a custom library into my code? For example: {% faceboxify item %} So assume that it'll create a specific HTML output for Facebox plugin. I just want to learn some elegant way to import this plugin into my code. I want the above definition to be enough for all functionality. Is there any way to do it? I couldn't find any example. Maybe I'm missing something.. Thank you.

    Read the article

  • django url tag performance

    - by zxygentoo
    I was trying to integrate django-voting into my project following the RedditStyleVoting instruction. In my urls.py, i did something like this: url(r'^sections/(?P<object_id>\d+)/(?P<direction>up|down|clear)vote/?$', vote_on_object, dict( model=Section, template_object_name='section', template_name='script/section_confirm_vote.html', allow_xmlhttprequest=True ), name="section_vote", then, in my template: {% vote_by_user user on section as vote %} {% score_for_object section as score %} {% vote_by_user user on section as vote %} {% score_for_object section as score %} {{ score.score|default:0 }} It takes over 1.3s to load the page, but by hard coding it like this: {% vote_by_user user on section as vote %} {% score_for_object section as score %} {{ score.score|default:0 }} I got 50ms. Just avoid the url tag resolving stuff I got a 20+ times performance improvement. Is there something I did wrong? If not, then what's the best practice here, should we do things the right way or the fast way?

    Read the article

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