semantic

Semantic Diff Utilities

I'm trying to find some good examples of semantic diff/merge utilities. The traditional paradigm of comparing source code files works by comparing lines and characters.. but are there any utilities out there (for any language) that actually consider the structure of code when comparing files? For example, existing diff programs will re...

graceful css degradation

I am working on a personal website. On the front page, I have a listing of all the articles, and their date published. This data would be a perfect use for a table tag. The table would only be used to display this tabular data. I worked on it again, and was able to achieve the same layout using unordered lists and a little bit of c...

Finding the id of a parent div using Jquery

I have some html like this: <div id="1"> <p> Volume = <input type="text" /> <button rel="3.93e-6" class="1" type="button">Check answer</button> </p> <div></div> </div> and some JS like this: $("button").click(function () { var buttonNo = $(this).attr('class'); var correct = Number($(this).attr('rel')); ...

How to correctly format PHP 'IF ELSE' statements?

It's been a long running issue that I've come across in many-a-hot-and-steamy coding sessions. One person codes this way another codes that way. So after much push and pull I'm curious... Is there any correct way of phrasing a PHP 'IF ELSE' statement? Personally I use the: if ($variable == 'setvalue') { $variable = executefunction...

What's the difference between an Algorithm and a Design Pattern

I was searching for "Undo/Redo algorithms" and found something marked as a duplicate, but the duplicate was a request for a "Undo Design Pattern". I'd really like an algorithm for this. I don't think I necessarily need a design pattern. Is there a fundamental difference between "Design Pattern" and "Algorithm" or is it OK that someon...

Building or Finding a "relevant terms" suggestion feature.

Given a few words of input, I want to have a utility that will return a diverse set of relevant terms, phrases, or concepts. A caveat is that it would need to have a large graph of terms to begin with, or else the feature would not be very useful. For example, submitting "baseball" would return ["shortstop", "Babe Ruth", "foul ball",...

Is the semantic of the data integral part of REST?

This is a follow up on a question asking for an explanation of REST. As you can see from the comments to my answer, we've had a small argument with Darrel Miller on the best media representation of the resources. We've had a further email discussion that resulted in this question. The main difference between Darrel's and mine understan...

How can I implement a semantic ontology in Ruby on Rails?

I'm working on a "twitter filter" - more to learn ruby on rails than anything else. The idea is that I use a semantic ontology to lookup a users interests. So if a user says they're interested in "sports" that means flag any tweets that discuss "sports" "golf" "football" and so on. I'd like to be able to expand it to any hierachial of t...

Finding related words (specifically physical objects) to a specific word

I am trying to find words (specifically physical objects) related to a single word. For example: Tennis: tennis racket, tennis ball, tennis shoe Snooker: snooker cue, snooker ball, chalk Chess: chessboard, chess piece Bookcase: book I have tried to use WordNet, specifically the meronym semantic relationship; however, this method is...

"Widget" or "Gadget"?

This question is about semantics. I have a client who says that the term "widget" should only be used when referring to a dynamic object that syndicates your own content on to a third party site. I believe widget can be used to refer to any self-contained dynamic object on a site (your own or a third party). However, my client says tha...

TV guide listing semantics. Isn't it a table?

I need to build a web based TV guide listing. When I started I thought all I need is to build a table since it is a tabular data. date 00:00 00:30 01:00 etc... channel 1 show 1 show 2 show 3 etc... channel 2 show 3 show 4 show 5 etc... but alas this is not the situation. While the <th> are for every 30 min. the sh...

Toggle Jena Reasoner

I have a Jena ontology model (OntModel) which I'm modifying programatically. This model was initially created using the default ModelFactory method to create an Ontology model (with no parameters). The problem was, as the program ran and the model was changed, the default Jena Reasoner would run (and run and run and run). The process ...

Is OO design's strength in semantics or encapsulation?

Object-oriented design (OOD) combines data and its methods. This, as far as I can see, achieves two great things: it provides encapsulation (so I don't care what data there is, only how I get values I want) and semantics (it relates the data together with names, and its methods consistently use the data as originally intended). So where...

What is the best language for text processing?

Duplicate: Best Language for String Manipulation? I have to parse hundreds of text files per second, each file containing multi subject text (consider, for example, it's email text). I need to find various patterns (keywords, sentences, most important words and stuff like that). I need to know what is the fastest programming langua...

GET vs POST in Ajax

What is the between GET and POST for Ajax requests? I don't see any difference between those two, except that when I use GET, the parameters are send in URL, which for me don't really make any difference, since all requests are made on background and user doesn't find any difference. edit: What are PUT and DELETE methods used for? ...

What is the semantic web?

I've heard a lot about the semantic web but I'm still not exactly sure what it is. How will it be different to the web we know now? ...

What's the best semantic way of having a break in a ul-based navbar?

I'm making a ul-based horizontal navbar, but I want to have two levels heading in each item, a bit like this: Nav item1 Nav item2 Nav item3 Nav item1 subtitle Nav item2 subtitle Nav item3 subtitle The subtitle has to be in a different style to the main nav item. I did this first (naively?) by using a ...

Which is it Perl or perl, TIF or TIFF, ant or Ant, ClearCase or Clear Case?

In one sentence I have manage to create 16 possible variations on how I present information. Does it matter as long as the context is clear? Do any common mistakes irritate you? ...

[PHP] How to combine words of a sentence to composed terms?

Hello! I have a sentence, for example John Doe moved to New York last year. Now I split the sentence into the single words and I get: array('John', 'Doe', 'moved', 'to', 'New', 'York', 'last', 'year') That's quite easy. But then I want to combine the single words to get all the composed terms. It doesn't if the composed term...

Shorten a text and only keep important sentences

Hello! The German website nandoo.net offers the possibility to shorten a news article. If you change the percentage value with a slider, the text changes and some sentences are left out. You can see that in action here: http://www.nandoo.net/read/article/299925/ The news article is on the left side and tags are marked. The slider...