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...
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...
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...
Are there any specific libraries for asp.net that are promising?
...
I want a concise description (2 or 4 lines) of each of the following Semantic Search Algorithms:
* thesauri expansion
* graph traversal
* RDFS/OWL reasoning
...
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>
...
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...
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...
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...
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...
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)?
...
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?
...
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">...
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...
...
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 - ?
...
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...
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...
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...
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?
...
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 ...