tags

How to properly create a svn tag from trunk?

I am creating my first project in subversion. So far I have branches tags trunk I think I immediately need to make branches singular and start over. Update branches is the norm. I have been doing work in trunk and moving the contents to tags as follows mkdir tags/1.0 cp -rf trunk/* tags/1.0 svn add tags/1.0 ...

Populate an NSTokenField with tokens from a container of objects

I have an NSTableView and an NSTokenField in a window. I have implemented the following delegate methods: tokenField:completionsForSubstring:indexOfToken:indexOfSelectedItem: tokenField:representedObjectForEditingString: tokenField:displayStringForRepresentedObject: I want to make it so that when a row is selected in it, the NSTokenF...

How can I change the tag given when using git describe?

I want to use "git describe" to get the "revision number" of the application. Unfortunately, the git repository was created using cvs-import and has an ugly old tag, so I would like to change it. How can I change the tag given when using "git describe"? Note: I asked this on IRC today and found the answer myself in the end. Thought it ...

What are these called <% ... %>? And what ways can they be used in a page.

In a .Net web form... What are these special tags called? I know of 2: <%-- comment --%> for comments and <%# used with Eval and Bind #> So what does the # signify? Are there more? I know you can put some basic logic and function calls in there but I've never found anything that really describes how that can be used and should be...

RegEx: Find quotes within a tag

Hi, I have a string like this: This <span class="highlight">is</span> a very "nice" day! How should my RegEx-pattern in VB look like, to find the quotes within the tag? I want to replace it with something... This <span class=^highlight^>is</span> a very "nice" day! Something like <(")[^>]+> doesn't work :( Thanks ...

Selective strip tags in TextMate

Is there a way to strip HTML tags selectively in TextMate - you can easily do this in Dreamweaver. TextMate allows you to strip all HTML tags but I would like to get rid of only, let's say all the <span>'s and <font>'s. On a similar topic, is there a way to get rid of all the inline css styles? ...

Struts2: Adding parameters from a map to a URL tag

I want to add a variable list of parameters to a Struts2 URL tag. I have a map of the parameters (name value pairs) in an object in the session. I'm struggling to find a good approach to this. Here is the relevant JSP code: <s:iterator value="%{#session['com.strutsschool.interceptors.breadcrumbs']}" status="status"> <s:if test=...

Django -- Python -- How to have a global templatetags shared among all my apps in one project

Hi, Let say that I have: proj1/app1 proj1/app1/templatetags/my_shared_tags.py proj1/app2 proj1/templates proj1/templates/app1/index.html proj1/templates/app2/index.html Now, how can I reuse a tag from my_shared_tag.py from app1 in my app2. ...

XSLT self-closing tags issue

Hi, I am using xslt to transform an xml file to html. The .net xslt engine keeps serving me self-closing tags for empty tags. Example: <div class="test"></div> becomes <div class="test" /> The former is valid html, while the latter is illegal html and renders badly. My question is : How do I tell the xslt engine (XslCompiledTrans...

Django -- How to have a project wide templatetags shared among all my apps in that project

Second time asking more details ... I'd like to have a project wide templagetags directory to have the common tags used by all Apps, then each app can have their own tags if need so. Let say that I have: proj1/app1 proj1/app1/templatetags/app1_tags.py proj1/app2 proj1/app2/templatetags/app2_tags.py proj1/templatetags/proj1_tags.py ...

Django -- how to templatetags filter with multiple arguments

I have a few values that I would like to pass into a filter and get a URL out of it. In my template I have: {% if names %} {% for name in names %} <a href='{{name|slugify|add_args:"custid=name.id, sortid=2"}}'>{{name}}</a> {%if not forloop.last %} | {% endif %} {% endfor %} {% endif %} In my templatetags I have: @registe...

Why Can't JSP 2.0 Tag Files Have Body-Content of "JSP"?

The "new" JSP 2.0 tag file tags are incredibly useful, and for most cases (at least that I've seen) they provide a far more readable format than a Java class. However, while tag files can do almost everything a Java class tag can do, there is one giant thing they can't do: have "scripting" body content (ie. "<%" stuff between the start ...

Best DB (MySQL) structure: Articles which contain favored tags

Hello! I've built a news site: - The articles are shown on the front page ordered by date. The newest one first. - The news are in the table "news" with the fields "id", "title", "text" and some other ones. - All articles are tagged with 1-5 relevant tags. - The tags are in the table "tags" with the fields "id", "tag", "article" and...

Django Templates — passing value of a variable in a template to templatetags filter

name class an id, a first & a last attributes In my view.py, I fetch a name object from the database and pass it into the index.html template. In my templagetags/my_tags.py, I have a filter my_private_tag(value, arg) that takes value and an arg. It appends the arg to the value and returns the result. def my_private_tag(value, arg): ...

Django url template tage and variable values with dot (.)

why doesn't {% url myVar %} where myVar = 'jack.johnson' doesn't work ? The view is fine, the urls.py is: url(r'^(?P[A-Za-z0-9-._]+)/$', overview, name='user_profile'), ...

Add <pre></pre> tags to ItemTemplate in GridView

My item template in gridview is marked up like this. Where do I add the tags? <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<% Eval("datacol") %>' </asp:Label> </ItemTemplate> ...

Which EXIF tag to store keyword/tag for a photo?

I am developing a photo gallery which will read/write EXIF tags. I will put photo title in the EXIF tag DocumentName and description in EXIF tag ImageDescription. I also plan to use the geo-tags. But what about photo tags/categories? I want to store a space-separated string of the tags a photo is tagged with in my system. Is there any EX...

tag search library (ASP).NET

I seen some awful forums with horrible searching. Its highly important to be able to find things in my db/app. I am considering writing my own but before i do what do you guys think are good tag search libraries? C# .NET or possibly ASP.NET NOTE: I do not want text searching, only tags. ...

Trending topics: 1-word terms vs composed terms

Hello! With your perfect help here I've already found out how to compute trending topics (standard score + floating average). My next problem: I have the terms (consisting of 1-3 words) in my database connected with the time they were mentioned. But the trending topics are always only 1-word terms since one part of a term is ALWAYS men...

Why can't I nest a block tag inside an if tag?

I have a master template file called base.html, in it I have the following code: {% ifequal environment "dev" %} {% block stylesheets %}{% endblock %} {% endifequal %} I inherit this in other templates and do the following: {% block stylesheets %} <link ... > {% endblock %} The problem is, the stylesheet I link never gets a...