Does anyone know of a good way to calculate the "semantic distance" between two words?
Immediately an algorithm that counts the steps between words in a thesaurus springs to mind.
At work we have a C# solution with over 80 projects. Is it possible in VS 2010 to automatically stop compilation as soon as an error is encountered rather than the default behaviour which is to continue as far as possible and display a list of errors in the error window?
I'm happy for it to stop either as soon as an error is encountered…
I performed some modifications on a branch (A).
I then decided to create a brand new branch (B) based on the state of my existing working copy and commit and push to that.
There were a number of files that had been moved during my earlier refactoring, and hence were now not included in version control having been moved directly in the…
I am looking to split up multiple lines of text to single them out, for example:
Url/Host:ftp://server.com/1
Login:Admin1
Password:Password1
Url/Host:ftp://server.com/2
Login:Admin2
Password:Password2
Url/Host:ftp://server.com/3
Login:Admin3
Password:Password3
How can I split each section into a different textbox, so…
Trying to solve this at this hour has gotten my mind into a tail-spin: I want to rearrange a list l into a list of n lists, where n is the number of columns.
e.g.,
l = [1,2,3,4,5,6,7,8]
n = 5
==> [[1,6][2,7][3,8][4][5]]
another example:
l = [1,2,3,4,5,6,7,8,9,10]
n = 4
==> [[1,5,9],[2,6,10],[3,7][4,8]
Can someone…
I'm using omnifunc=pythoncomplete. When autocompleting a word (e.g., os.), I get the list of eligible class members and functions, as expected, as well as a scratch buffer preview window with documentation about the selected member or function. This is great, but after selecting the function I want, the preview window remains. I…
When I call the function, the dialog does work.
If I move the dialog construction into the showtimes_list function, everything works fine.
I thought that variables declared outside a function were global in context?
var dialog_list = $("<div></div>").dialog({
autoOpen: false,
modal: true,
height: 300,…
I have a simple function
function increase(percent, number)
low = number- number*percent;
end
I want to return low so I can use it as an argument for another function
mitoGen(asp, arg, increase(.2,234), glu)
Is there a way to do this?
I'm pretty new to C++ and was looking for a good way to pull the data out of this line.
A sample line that I might need to tokenise is
f 11/65/11 16/70/16 17/69/17
I have a tokenisation method that splits strings into a vector as delimited by a string which may be useful
static void Tokenise(const string& str,…
I'm using a Java wrapper for SQLite called SQLiteJDBC - this may have some bearing on any answers...
I have a table which I've displayed in a GUI, within that UI I have a button for the fields for an individual row of that table. When I save my changes I do this...
Statement stmt = connection.createStatement();…
I've been on a hunt for a while trying to find a solution to this but I cannot find anywhere that addresses this problem.
I'm running a SQL query through XSLT which will return three rows. Here is the query:
<query name="OrderedProductNames" rowElementName ="OrderedItem">
<sql>
…
I am new to building static libraries and would like to create 2(+) libraries each of which has some unique code and some shared code. My intention is that other projects will link one or more of these static libraries.
Util.h/m <-- Shared
ImplOne.h/m <-- Unique to 'ImplOne'
ImplTwo.h/m <--…
I have an anchor tag <a class="next">next</a> made into a "button". Sometimes, this tag needs to be hidden if there is nothing new to show. All works fine if I simply hide the button with .hide() and re-display it with .show(). But I wanted to uses .fadeIn() and .fadeOut() instead.
The…
I have a large class, which I have divided into several different class extension files for readability.
@protocol MyProtocol
@required
-(void)required;
@end
@interface MyClass : NSObject <MyProtocol>
@end
@interface MyClass (RequiredExtension)
-(void)required;
@end
Is there a better way…
Hi,
I have a feeling the answer to this is no, but using .Net 4.0's Parallelism, can you set the amount of cores on which to run i.e. if your running a Quad Core, can you set your Application to only use 2 of them?
Thanks
Hi all,
Someone came to me and asked me if I could add a form to their Joomla page. I figured this should be easy since Joomla is widely used and such thing should be supported.
I'm googling arround for 1,5h now, and I have given 4 formcreators a try but this is driving me crazy. The editors are…
I'm working from a question I posted earlier (here), and trying to convert the answer to a sub so I can use it multiple times. Not sure that it's done right though. Can anyone provide a better or cleaner sub?
sub search_for_key
{
my ($args) = @_;
foreach $row(@{$args->{search_ary}}){
…
A simple tableviewController, empty. A modal that can be launched from a button. No data in the data source for the tableview, and no rows displayed.
I open the modal, use it to add an item, and return to the tableview controller. The tableview updates itself automatically, and the new row is…
Ok,
so I am using (or trying to use) two primary mod_rewrite rules, and they seem to be conflicting with one another
RewriteRule ^/?help$ index.php?page=help [L]
and
RewriteRule ^/?([a-zA-Z0-9._-]+)$ index.php?user=$1 [L]
If I get rid of the period -. in the second rule, my help page is…
UPDATE: Perhaps this wasn't clear from my original post, but I'm mainly interested in knowing a best practice for how to structure javascript code while building a solution, not simply learning how to use APIs (though that is certainly important).
I need to add functionality to a web site and…
Hi,
I have a JSF application with several major components and a component tree under each.
On a certain event (Value change) I would like to reRender the entire component tree for one of those components.
For example: can I rerender components 1,2 and 3 in one shot here:
<h:panelgroup…
Hi
Im trying to set up TFS 2010 on a machine that is connected to a network, but not on the domain.
I am trying to connect this to a SQL Server that is also connected to the network and also not on the domain. When I run through the TFS configuration Wizard and try to connect to the SQL…
Hey guys, I'm trying to work out how to use states in my Flex app.
I've created two states, State1 and Stage 2. Both are based off the base state. I've created a few visual elements for State1, and given each of them includeIn="State1".
But when I'm in design mode and click on State2,…
I've got a site that provides blog-friendly widgets via JavaScript. These work fine in most circumstances, including self-hosted Wordpress blogs. With blogs hosted at Wordpress.com, however, JavaScript isn't allowed in sidebar text modules. Has anyone seen a workaround for this…
I'm trying to loop through the results from the Last.fm API but it's not working.
function get_url($url){
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,5);
$content =…