tags

in jQuery, how to remove an element that has only one whitespace?

Given the following HTML on a page: <div class='test'> <p><span id='id1' class='test1 test2 test3'>test text 1</span></p> <p><span id='id2' class='test1 test2'>test text 2</span></p> <span class='test2'> </span> <p><span id='id3' class='test1'>test text 3</span></p> <p><span id='id4' class='test1 test3 test2'>text4</span></p> </div> H...

Git subtree tags

I want to use subtree merges to pull a remote project into a directory in my own git tree. I followed the instructions here: using subtree merge But I'm not sure how to checkout a tag. I imagine this is a common request - you want to pull in an external project but get a safe tagged version of the source. The subtree merge solution wo...

Data structure, best practice to build true "related by tags" items list?

What I mean saying true "related by tags" list? Let's imagine that article have 3 tags: A, B, C. True "related by tags" articles for this item will be articles fistly having A, B, C tags, then (A, B), (A, C), (B, C) etc. table: tags tag_id tag_title tag_nicetitle table: tags2articles article_id tag_id Using this tables structure ...

Display posts from x cat and y tag

Is it possible to fetch posts matching categorie x "AND" tag y? Read the docs, it seems you can do: query_posts('tag=bread,baking'); or query_posts('cat=2,6,17,38'); ... is it possible to use both cat and tag simultaneously? ...

Is there a way (or a plugin) to make Vim generate a code outline for CSS?

I was trying to install taglist (but I couldn't install ctags), but I realized that it doesn't support css, is there another way or plugin to perform this job? PS: I checked the install file of ctags, but I couldn't find any steps which looked like an installation manual. it just says: Installation Notes ================== For non-Un...

Naming Tags (Wordpress)

Is it a good idea to name important tags with # prefix eg #reviews, #articles (somewhat like the twitter hashtag) to separate them from thousands of regular tags? What would be its effect on SEO and will the '#' be stripped when used in a URL? ...

replacing an undefined tags inside an xml string using a regex.

Hi! i need to replace an undefined tags inside an xml string. example: <abc> <>sdfsd <dfsdf></abc><def><movie></def> (only <abc> and <def> are defined) should result with: <abc> &lt;&gt;sdfsd &lt;dfsdf&gt;</abc><def>&lt;movie&gt;<def> <> and <dfsdf> are not predefined as and and does not have a closing tag. it must be done with a r...

PDO: check tags presence in db and then insert

Hi, I'm working with PDO connection for mysql and I'd like to have some opinion on a query I use to check if tags are present on the database, and to add it in the case it isn't. // the tags are allready processed in $tags array $check_stmt = $connection->prepare ("SELECT * FROM tags WHERE tag_name = :tag_name"); $save_stmt = $connect...

Saving "Tags" - Quickest Way

I want to save tags related to a discussion post. The same as the 'tags' that Stack Overflow uses. What is the best way to do this? I was thinking of saving them in the 'discussion' table as a single comma separated string, but I'm not sure if this is the 'fastest' way assuming there will be lots and lots of rows in the discussion tab...

Should I put paragraph tags around images?

Hey guys, I have a web page where I have text with images. I write some text (in a paragraph) then put an image, then another paragraph. Should I put p tags around the image too, or should I just leave it in between with just the img tag? The reason I ask this is because up until now I was just plopping images in between paragraphs, ...

Efficiency of using a function to output html tags in php

Trying to come up with a basic way to display code in a way that would be nicely maintainable, I thought of doing something like this: echo htmlfunction('a',array('href'=>'http://google.com'),'google'); to generate: <a href="http://google.com"&gt;google&lt;/a&gt; this would use as a global scale function to output all html tags. th...

PHP tags. How to minimize the tags usage in php script

I am using an ask answer script on a website and it converts the headline title words into the search query tags automatically. For example: "Who are you?" is converted into tags 'Who' 'are' and 'you' tags respectively. I want tags to be displayed only if the letters in the word are greater than 4. Is it possible? I am not into php but...

SVN view commits between tag and trunk

Hi, With SVN is there an easy way to get a list of all the commits between a tag (usually the most recent) and the current trunk, so you can see what (if anything) has changed? Likewise, can you do the same to compare the commits between two tags. Cheers, Jack ...

Strip specific tag from parent (jQuery)

HTML: <div class="featured"> <h4><a href="#">Title 1</a></h4> <a href="#"><img src="image.png" class="image"/></a> <p><a href="#"></a><br /> Description goes here</p> </div> <div class="featured"> <h4><a href="#">Title 2</a></h4> <a href="#"><img src="image.png" class="image"/></a> <p><a href="#"></a></p> ...

use HTML <video> tag if supported else use lightbox??? (script)

is it popular to have a page display video using the new HTML tag (as long as its supported by the browser), else fallback to using a lightbox??? [ & maybe even have another fallback??] i've never had to do anything like this so i don't know. would appreciate any suggestions ...

Indesign scripting create deeper structures by adding tags

I first set out to do this with XSLT, then with PHP. Now i'll have to have a go at it with Indesign scripting (javascript probably) My problem is that i have an indesign file without structure (nothing is tagged, but everything has a paragraph style) Wat i have to do is 1) ad tags to paragraphs based on their styles 2) deepen the stru...

Adding a cookie to the response in Java after the header has been flushed?

I have a custom tag that does some processing and then sets a cookie. However, the cookie wasn't being set, and I couldn't figure out why. Another developer pointed out that because we're using a template system, the point at which the tag evaluates, the response header has already been flushed as a part of an include. Since the header h...

how to disable autoclosing of tags in jquery

Hi, I want to break my <ul> into multiple <ul> tags, I have 10 <li> in my <ul> and I want to break into 2 <ul> (5 <li> each). To do the same, I am taking 5th <li> and appending </ul><ul> using $(this).after(). But Jquery automatically reverse the text and auto close the <ul>. Any Idea how to disable to auto close? Cheers, Felix ...

Any difference in xhtml between <img .... /> and <img ...></img> at all?

same as title, I'm pretty sure it has no difference, but just to be on the safe side with standard compliance. ...

Removing html tags from a text using Regular Expression in python

I'm trying to look at a html file and remove all the tags from it so that only the text is left but I'm having a problem with my regex. This is what I have so far. import urllib.request, re def test(url): html = str(urllib.request.urlopen(url).read()) print(re.findall('<[\w\/\.\w]*>',html)) The html is a simple page with a few links a...