Does anyone know how to or have some code on counting the number of unique phrases in a document? (Single word, two word phrases, three word phrases).
Thanks
Has anyone seen this: ?? No jgem command works at all?? Though jruby -S gem list does work. I'm using jruby 1.3.1 and Sun Java6 jre
root@test:/usr/local: jgem --version
1.3.3
root@test:/usr/local: jgem update --system
JRuby limited openssl loaded. gem install jruby-openssl for full support.…
I have a jruby/rails app using:
jruby 1.4.0
Rails 2.3.5
ActiveMQ 5.3.0
Mule ESB 2.2.1
Currently in our environment.rb file we start up Mule in the initializer. This becomes a big pain when we go to do normal rake tasks that don't require JMS/Mule such as db:migrate as it takes a long time to…
I've just started working with GWT and I'm already recognizing the extraordinary power that it possesses. I'm coming from a frontend world so the Java is a big learning curve, but I think that will actually help me build a properly laid out app (html-wise) instead of just relying on the default…
Our website generates Word 2007 documents from database data by creating the xml, zipping it and sending it as a MIME attachment. Usually, this works fine. On occasion, the document will look fine on the screen, but not when printed. The letters end up scrunched together.
Here is an…
Say I have an anchor on a webpage like so:
<a name="comegetit"></a>
Is there a way of running a javascript if the page is arrived at by a link that lands on this anchor? (e.g. a link like <a href="http://myawesomewebpage.com/page#comegetit"></a>). I don't think…
We recently updated our solution to MVC 2, and this has updated the way that the AntiForgeryToken works. Unfortunately this does not fit with our AJAX framework any more.
The problem is that MVC 2 now uses symmetric encryption to encode some properties about the user, including the…
I want to be able to take a url and map it to a set of web parameters. For example:
www.web.com/1/2/3 would be interpreted as www.web.com/default.asp?x=1&y=2&z=3
I know I've seen it done, I just can't find it anymore. Any ideas?
What command line tool can I use to automatically insert mtimes into urls in my css files for the purposes of breaking the cache?
/* before */
.example { background: url(example.jpg); }
/* after */
.example { background: url(example.jpg?1271298451); }
Also, I would like this tool…
This code get's the currently logged in user, using the Spring Security Plugin (acegi):
def principalInfo = authenticateService.principal()
def person = null
if (principalInfo != "anonymousUser" && principalInfo.username) {
person =…
I need help optimizing the code to run faster, unless it is optimized the best.
I also want to alphabetize the list and I am unsure how to do that.
It should be alphabetized by $userinfo[0]["sn"][0]
I am using the adLDAP class:…
So I know how to override the default getters for attributes of an ActiveRecord object using
def custom_getter
return self[:custom_getter] || some_default_value
end
I'm trying to achieve the same thing however for a belongs…
I currently do it in code behind:
Slider.Value += slider.LargeChange
But I was wondering if I could increment/decrement the slider within xaml and then just monitor the slider for the value change.
Have a webpage that will be viewed by mainly IE users, so CSS3 is out of the question.
I want it to list like:
A D G
B E H
C F I
Here is the function that currently lists like:
A B C
D E F
G H I
function…
I'm trying to set up a date of birth helper in my Rails app (2.3.5). At present it is like so.
<%= f.date_select :date_of_birth, :start_year => Time.now.year - 110, :end_year => Time.now.year %>
This…
I am using jquery UI tabs and when I switch tabs any scrollable divs that I have inside that tab reset their position to the top of the screen when I tab away from it and back to it. Does anyone know how to…
Scenario
I would like to save images with alpha transparency as .png and images without alpha transparency as .jpg (even if their original format is .png or .gif). How can I detect whether or not an image…
I am using adldap http://adldap.sourceforge.net/
And I am passing the session from page to page, and checking to make sure the username within the session is a member of a certain member group, for this…
I am crafting an application and cannot decide whether to use the terms Login/out or Logon/off. Is there a more correct option between these two? Should I use something else entirely (like "Sign…
I am in the process of switching my development environment from sqlite3 to postgresql 8.4 and have one last hurdle.
In my original I had the following line in a helper method;
result =…
I'm embarking on a GUI Activity composed of a viewflipper, which I would like to contain 10 linearlayout layouts.
Is it advisable to put all of my layouts into the same XML…
I'm working with ActiveResource a lot so my service models are only using XML. Thus, I have no need for a respond_to block, I literally just render :xml => @model
I…
I have randomly created strings such as
H*P2[-%-3:5RW0j*;k52vedsSQ5{)ROkb]P/*DZTr*-UX4sp
What I want to do is get a count of all Caps, lower case, numeric and…
Yesterday we received OTA Android 2.1 on my wife's HTC Droid - HOORAY!!! I am finally able to load my carputer app on her phone.
Well we loaded it, but it…
In my application I have an VBox control on top of another VBox that contains an Image control that loads a jpg from a URL (you can't see the bottom panel…