tags

Perl: Global substition within tag delimited string

My previous post got the tags partially stripped, so here it is again: My goal is to replace all instances of a trailing - to a trailing + within tag brackets. Lets assume the line to be replaced looks like this: <h> aa- aa- </h> <h> ba- ba- </h> and should afterwards look like <h> aa+ aa+ </h> <h> ba+ ba+ </h>. First I tried th...

How do I specify associations in Rails that pass through several models

I'm writing some tricky polymorphic relationships to handle tagging. I have a Tag model, and a Tagging model which belongs_to a polymorphic taggable. I have an Item model, which has_many :taggings, :as => :taggable, and has_many :tags, :through => :taggings, so that I can call @item.tags. This is all working ok. I want to bring anoth...

Using tags to filter search

I am looking for a good tutorial/pattern for implementing tags on my data to assist searching. ...

AS3/Flash Builder: Conditional Metadata Tags?

I'd like to be able to have my SWF compile to different sizes based on whether I'm debugging or creating a final build. Is there a way to accomplish this in Flash Builder? I'm using the [SWF] metadata tag to format my SWF. My initial impulse is to create some sort of logic around said tag, but I've a feeling that won't work. Thanks in...

Use c# expression to define server tag property value

Hi, Is it possible to set the property of a server tag from a c# expression, i.e. something like <asp:TextBox Width='<%= [some c# expression] %>'/> ? I though this would be pretty straightforward, but I can't get such an expression to run. Thanks for any help Ryan ...

Getting image attributes via Hpricot

Hi all: I'm trying to get the largest image off a page I parse with Hpricot and am not having any luck. How do I access the width and height attributes of an img tag with it? Thanks...Chris ...

hpricot add attribute to a HTML tag?

Can someone please explain how to add a custom attribute to an HTML tag using Ruby with Hpricot gem? I have a tag that looks like this: <div class="test" id="tag1" style=""> and I want to add a custom integer attribute called 'Readable=0' so it looks like this: <div class="test" id="tag1" style="" readable=0> Is this possible? ...

What is the purpose of <order phase="..."/> in an Axis2 handler tag?

In axis2.xml, why do you need to specify the phase again in the handler tag? Why this: <phaseOrder type="InFlow"> <phase name="Transport"> <handler name="RequestURIBasedDispatcher" class="org.apache.axis2.engine.RequestURIBasedDispatcher"> <order phase="Transport"/> </handler> <handler name="SOAPAction...

Closing <script>

This is a stupid question, and I am aware that it is; but never the less, here it comes: Is it possible to close a <script>-tag within itself, so to speak? I mean if you are using an external javascript-document can you close the tag like this: <script type="text/javascript" src="xxx.js" /> ...

Android : Tagging a certain frame in Video?

Hi, I want to tag certain frames in the video with data in Android. Is there any way to accomplish this in Android? ...

jQuery: using .text() to retrieve only text not nested in child tags

Hi all, If I have html like this: <li id="listItem"> This is some text <span id="firstSpan">First span text</span> <span id="secondSpan">Second span text</span> </li> I'm trying to use .text() to retrieve just the string "This is some text", but if I were to say $('#listItem').text(), I get "This is some textFirst span te...

Compare group of tags to find similarity/score with PHP/MySQL

My Question is, how do I compare a group of tags to another posts tags in my database to get related posts? To start off, I've searched the internet and stackoverflow to find out how to do this. My closest find was this post http://stackoverflow.com/questions/2153062/how-to-find-related-items-in-php. But it actually doesn't solve much f...

Any PHP tagging libraries extended for multiple object types?

I have used freetag in other applications. (And I'm satisfied with it in those applications.) But like other tag libraries I have seen, it assumes a singular object type in the tagged objects table. create table tagged_objects ( tag_id int unsigned, object_id int unsigned ); (This is not the table definition from freetag.) ...

UIButton Tag overwrittened

How do you make sure that the UIButton tag is not overwritten by the previous tag? for example: (IBAction)addButton:(id)sender { if (buttoncount == 2) return buttoncount++ UIButton *newButton ... // Should I change this to setTag? newButton.tag = buttoncount; // This line doesn't seem to work newbutton.tag = newButtonCount NSInteg...

drupal user interested terms

hi i'm using drupal 6. In my user page i want to show latest activities related to user interest. interest means terms that user participated (forum topics, articles, polls..). Can any one know the best way to do it. For ex : stackoverflow shows questions related user participated tags. ...

Wordpress: Removing the last comma for tag list

I've created a custom foreach output that helps give me a tag id per post. I'm using commas to separate each tag. However, the last tag outputs a comma too, like this: kittens, dogs, parrots, (<-- last comma) How should I go about revising the foreach output so that the last comma is removed so it displays like this: kittens, dogs, pa...

Spooky Custom Template Filter?

Hi Folks, I was having trouble trying to iterate on a template on two dimensions at the same time. The basic situation is explained here: http://www.djangobook.com/en/2.0/chapter04/ ( in the apples, bananas indices example ) >>> from django.template import Template, Context >>> t = Template('Item 2 is {{ items.2 }}.') >>> c = Contex...

Dynamic tags generation from sql server database using full text search

Hi, Is there any solution to generate list of tags (common phrases/words) from sql server full text index. I store some data in xml data type column. I would like to generate common words from that column (performance is on the first place). data changes frequently. ...

Identifying an object name by appending a generic name with a changeable value. Is this possible?

Say I have 5 UIImageViews, named image1 image2 image3 image4 and image5. And I have 5 buttons, which have their tag values set to the corresponding images that overlay them, so 1 - 5. If button 1 is pressed, I get the tag value like so NSNumber buttonNumber = [sender tag]; I then want to perform some methods on the corresponding...

moving text div tags individually

I am trying to move text next to my header, but it is not working using margins - when i try to move it all the text boxes move, even though each text box is a seperate div tag. Here is my code for this part <body> <div id="wrapper"> <div id="header"> <h4><strong>Qtek Australia</strong></h4> <div id="home">Home</div> <div...