semantic

semantic markup for Python's difflib.HtmlDiff

It appears Python's difflib.HtmlDiff, rather than using INS and DEL, uses SPAN elements with custom classes: python -c 'import difflib; txt1 = "lorem ipsum\ndolor sit amet".splitlines(); txt2 = "lorem foo isum\ndolor amet".splitlines(); d = difflib.HtmlDiff(); print d.make_table(txt1, txt2)' Before I go about fixing this myself, has a...

<cite> as part of semantic markup

One of the sites I develop has lots of information linked between each other; we have companies, we have products for those companies. The company page links to the page listing the products for that company, and vice versa. From the HTML spec: CITE: Contains a citation or a reference to other sources. Does this imply that I...

How can a custom type loaded through XAML obtain a reference to the root object

I am attempting to use XAML to represent and load a graph of custom types that form a semantic model for a business domain. One thing I would like to do is to be able to obtain a reference to the "root object" of the graph from an object deeper in the tree. I cannot find any straightforward way of doing this other than resorting to ba...

How is semantic web relevant to ASP.NET MVC Web Development?

Are there any specific libraries for asp.net that are promising? ...

What is thesauri expansion , graph traversal and RDFS/OWL reasoning in the context of Semantic Search?

I want a concise description (2 or 4 lines) of each of the following Semantic Search Algorithms: * thesauri expansion * graph traversal * RDFS/OWL reasoning ...

Should I put input tag inside label tag?

I was just wondering if there is a best practice concerning label and input tag : classic way: <label for="myinput">My Text</label> <input type="text" id="myinput" /> or <label for="myinput">My Text <input type="text" id="myinput" /> </label> ...

python method to extract content (excluding navigation) from an HTML page

Of course an HTML page can be parsed using any number of python parsers, but I'm surprised that there don't seem to be any public parsing scripts to extract meaningful content (excluding sidebars, navigation, etc.) from a given HTML doc. I'm guessing it's something like collecting DIV and P elements and then checking them for a minimum...

Auto Categorization of Content

Hi all I'm developing a script that extracts the messages from the message archive of a particular meetup.com group of which I'm a member - http://www.meetup.com/opencoffee/messages/archive/ The idea is to dynamically add these to a wordpress site and allow people to search messages, auto tag messages etc. The issue I have is how best...

can JSON serialize an array that uses *functions* as keys?

I'm dabbling with a linguistics Javascript project. I'd like to build it using objects to represent Nouns and functions to store Verbs as this makes conceptualizing my project less difficult. I'm using functions as keys to an object (I've written an example below). Will it be possible to serialize this with JSON when it comes time to sav...

Semantics of F# let statement with comma

I'm learning F#. I started by looking over the F# samples from Microsoft. I ran across this statement: let line1,line2 = use sr = System.IO.File.OpenText @"test.txt" let line1 = sr.ReadLine() let line2 = sr.ReadLine() (line1,line2) Can anyone explain this statement to me? What type is being defined here? A functio...

Semantics of ">>" operator in F#

In Microsoft's F# samples, they use the ">>" operator as follows: test |> Seq.iter (any_to_string >> printfn "line %s"); What does the ">>" operator do in this context? Is each item of the sequence (an array in this case) get passed to any_to_string implicitly? Is this similar to (fun item -> printfn "line %A" item)? ...

Semantics of F# statement

Can someone describe this F# expression to me? val augment: GameGrid -> points -> unit What does the val keyword mean? Is it true that usually type -> type indicates a function that returns the specified type? So does type -> type -> type indicate a function that returns a function that returns the specified type? ...

p vs. ol or ul for form styling

Typically I style forms with the unordered list tag e.g. <fieldset> <ul> <li> <label for="txtName">Name</label> <input type="text" id="txtName" /> </li> </ul> </fieldset> However, often I see markup that uses the <p> tag instead, like so: <fieldset> <p> <label for="txtName">...

Open Source Comparison Engines

A long time ago, Lycos had a comparison engine that is now defunct. I would like to find an open source equivalent of this offering... ...

Proper way to emphasize html submit button?

If you absolutely have to style your html buttons, what is the correct way to emphasize some of them? e.g. "Add to cart" is usually emphasized visually to make it stand out. Option 1 - wrap submit in em or strong + css Option 2 - class + css Option 3 - ? ...

Semantic Search help needed urgently..

Hi, Im trying to create a semantic search using java as a base programming language. My task is to create a search prototype which contains triples namely patients, visits and doctors. If i search with a patient name the result should be the patients name and the the time of visit and the corresponding doctors name. Im going to use trip...

Representing Partial Dates in a JSON API

I am managing a RESTful JSON data API, which is growing in scope. Currently, we are returning all dates over the wire as strings "YYYY-MM-DD", but we also need to represent the concept of partial dates. What I mean by a partial date is a date value that has unknown components, either a Year-Month, or just a Year. In our presentation lay...

Is it OK to group form elements into "p"?

Let's say I have this code <form action="#" method="get"> <p> <label for="name">Name:</label> <input type="text" name="name" /> </p> <p> <input type="submit" /> </p> </form> Is it semanticaly fine to group elements with p? Because my teacher (again.. I know ..:P) told me that p should be used on...

Why do programmers confuse the term "assembler" with "assembly"?

As programmers we need to be precise with our verbal and written communication. Why do so many programmers confuse the term "assembler" (the object code generator) with "assembly" (the language you program in)? The distinction is unambiguous. Could there be historical explanation? ...

Can website have multiple meta keywords?

Are these two equivalent? <meta name="keywords" content="first" /> <meta name="keywords" content="second, third" /> and <meta name="keywords" content="first, second, third" /> I have keywords that are applied for all the pages and then I want to have separate set of keywords for each page. Is there any problem with having multiple ...