[Lift] Pick n random elements from a list?

2009-07-08 Thread DFectuoso
Hi! I have a list, lets say its List.range(1,100) and i want to pick n random elements from it. Basicly I know that i can create n diferente randon numbers inside the limits and pick each element, but that would look something like this store List.range(1,100); store randonNumbers generated by

[Lift] Re: Scala job site written in Lift + a newcomer's experience

2009-07-08 Thread Spencer Uresk
Thanks! The hosting experience is quite good - since it just results in a WAR, I was able to drop it onto my dedicated server that runs a single Tomcat instance with a bunch of Grails and plain Java web apps. It only took a few minutes to setup and deploy. I really thought it would be fun to host

[Lift] Re: Scala resources

2009-07-08 Thread Kevin Wright
It's still a work in progress, but I've made the list publicly available http://spreadsheets.google.com/ccc?key=tLa2g0FWC454u2pC8O5FoJwhl=en# Do let me know anything that I've missed! --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread fbettag
*Any Lift Project, not Problem. Sorry ;) On 8 Jul., 10:47, fbettag fr...@bett.ag wrote: The Problem isn't in Scala nor in Lift nor in jQuery. It's a Firefox bug when it gets Content-Type application/xhtml+xml. Same for Safari. Just try $(myobject).load(/some/url/from/lift/with/html/output)

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread Viktor Klang
We want lift to work on those platforms. We need a work-around On Wed, Jul 8, 2009 at 11:19 AM, fbettag fr...@bett.ag wrote: *Any Lift Project, not Problem. Sorry ;) On 8 Jul., 10:47, fbettag fr...@bett.ag wrote: The Problem isn't in Scala nor in Lift nor in jQuery. It's a Firefox bug

[Lift] Re: Building from source - error importing _root_.org.specs

2009-07-08 Thread Calen Pennington
I looked at, and redownloaded specs-1.5.0.jar earlier in the process, with no avail. However, last night I ran the tests as root, and after downloading the world, they succeeded. So, I blew away my maven repository, and ran the tests again, and they compiled and run correctly. I don't know what

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread marius d.
Actually I had the same problem with with Javeline on FF. Once I changed the content-type in the HTTP response to text/html it worked just fine. Br's, Marius On Jul 8, 3:09 pm, Viktor Klang viktor.kl...@gmail.com wrote: We want lift to work on those platforms. We need a work-around On Wed,

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread Kevin Wright
Puts us in the rather interesting position of being a Java-based framework that only works on internet explorer... On Wed, Jul 8, 2009 at 1:27 PM, marius d. marius.dan...@gmail.com wrote: Actually I had the same problem with with Javeline on FF. Once I changed the content-type in the HTTP

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread marius d.
huh ? On Jul 8, 3:32 pm, Kevin Wright kev.lee.wri...@googlemail.com wrote: Puts us in the rather interesting position of being a Java-based framework that only works on internet explorer... On Wed, Jul 8, 2009 at 1:27 PM, marius d. marius.dan...@gmail.com wrote: Actually I had the same

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread Kevin Wright
If it's broken on firefox, and on safari, then I'm guessing that it's also broken on any other WebKit derived browser That leaves opera, chrome and IE, of which only IE has any serious market penetration... On Wed, Jul 8, 2009 at 1:34 PM, marius d. marius.dan...@gmail.com wrote: huh ? On Jul

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread marius d.
These are specific cases failing independent of Lift and perhaps even JQuery. There are numerous Lift apps out there working fine on all these browsers. From here making a statement that Lift is broken on FF or Safari or Java-based framework that only works on internet explorer .. is simply a

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread Matt Williams
I dont understand what you mean. Internet explorer is what is malfunctioning as its ignoring the (incorrectly set) content-type. Simply set the correct content-type for the type of content you are returning and you shouldn't have any problems. Kevin Wright wrote: Puts us in the rather

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread Timothy Perrett
Kevin, I've noticed a few issues with html entities, but other than that im fairly sure there are no crazy side effects. Have you tried it with your app? Does it fix the problem? Cheers, Tim On Jul 8, 2:12 pm, Kevin Wright kev.lee.wri...@googlemail.com wrote: Uh-oh, looks like I'm going to be

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread fbettag
This fixes the problem, indeed. There is only one side-effect, when you turn that on, all your in script-blocks (script type=text/ javascript) get translated to quot; maybe an exception should be made to not escape stuff in script- blocks ;) thanks! On Jul 8, 3:01 pm, Timothy Perrett

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread Kevin Wright
Interesting take... There definitely seems to be a growing need for working with css files as something beyond static text files. I know we already have some limited processing in place for handling root paths, and the idea has been raised before that we could maybe merge multiple files into a

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread marius d.
Actually I added a while ago a fixCss feature that deals with root relative paths where context path is pre-pended. Please see LiftRules.fixCss. Br's, Marius On Jul 8, 4:34 pm, Kevin Wright kev.lee.wri...@googlemail.com wrote: Interesting take... There definitely seems to be a growing need for

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread Kevin Wright
I've already used it :) On Wed, Jul 8, 2009 at 3:11 PM, marius d. marius.dan...@gmail.com wrote: Actually I added a while ago a fixCss feature that deals with root relative paths where context path is pre-pended. Please see LiftRules.fixCss. Br's, Marius On Jul 8, 4:34 pm, Kevin Wright

[Lift] Re: Building from source - error importing _root_.org.specs

2009-07-08 Thread David Pollak
On Wed, Jul 8, 2009 at 4:51 AM, Calen Pennington calen.penning...@gmail.com wrote: I looked at, and redownloaded specs-1.5.0.jar earlier in the process, with no avail. However, last night I ran the tests as root, and after downloading the world, they succeeded. So, I blew away my maven

[Lift] Re: Problem with jQuery/JavaScript and Liftweb because of Doctype

2009-07-08 Thread David Pollak
Folks, This thread troubles me a lot. There are a lot of English words being thrown around. A few accusations (joking or no) thrown around about Lift's incompatibility. But there has been no solid reproducible examples of an actual failure of Lift, jQuery, Firefox/Safari, etc. Lift uses XHTML

[Lift] Re: Overriding a lazy val and super?

2009-07-08 Thread David Pollak
trait Foo { def bar: String } trait MegaFoo extends Foo { lazy val bar = Hello } trait SuperMegaFoo extends MegaFoo { override lazy val bar = Super Duper } println((new SuperMegaFoo{}).bar) // Super Duper On Tue, Jul 7, 2009 at 11:46 PM, DFectuoso santiago1...@gmail.com wrote: I'm

[Lift] Re: Unique constraint

2009-07-08 Thread Naftoli Gugenhem
Anyone? Why isn't IdPK telling Schemifier to create the id column as a unique primary key, and how can I get it to? - Naftoli Gugenhemnaftoli...@gmail.com wrote: I just found the INFORMATION_SCHEMA.INDEXES table. It clearly says that all my id's are

[Lift] license expired

2009-07-08 Thread satish gunnu
I am trying the getting started guide, when I try to run the following command I get the license expired. Am I looking at old guide or is it something that is going to be changed? Help/comments are appreciated. mvn archetype:generate -U \ -DarchetypeGroupId=net.liftweb \

[Lift] Web service with DB access - Lift required?

2009-07-08 Thread Raphael
Hey, I'd like to build a simple web service that makes conference schedules and session data accessible to an iPhone client. The data is supposed to be stored in a MySQL db on the server. So at the moment, I am not planning on creating any form of web app / web site for that. However, that would

[Lift] Badly documented validation of MetaMapper records

2009-07-08 Thread fbettag
Heyho folks, i've been running into troubles when trying to validate records. In the liftbook it says the following: import _root_.java.util.Date def noFutureDates (time : Date) = { if (time.getTime System.currentTimeMillis) { List(FieldError(this, You cannot make

[Lift] Re: Badly documented validation of MetaMapper records

2009-07-08 Thread Naftoli Gugenhem
Helpers has an implicit from String to Node. Also, the list of validators should contain functions that take a mapper IIRC. So if the function needs more specifics, put the other arguments in a parameter list before. For examples see the built in validators name valXXX in various mapped field

[Lift] Re: Web service with DB access - Lift required?

2009-07-08 Thread DFectuoso
Since i (personally) have no background in java, and have no idea how to get a request in a container(such as tomcat or jetty) to call me code inside a war file... if I where you i would set up a very simple lift app(it will take care many things like the db connection and other stuff). Keep in

[Lift] Re: license expired

2009-07-08 Thread DFectuoso
The license of javaRebel packed with lift expired a couple of days ago, there's already a couple of solutions (you can read all about it http://groups.google.com/group/liftweb/browse_thread/thread/f78ccc29771e7a6a/6786c9be242b6f06?lnk=gstq=license#6786c9be242b6f06 here) The best solution, for

[Lift] Re: Unique constraint

2009-07-08 Thread Calen Pennington
I looked into this a little bit. The relevant chunks of code seem to be Schemifier.scala, lines 163 and 207, where connection.driverType.pkDefinedByIndexColumn_? is checked before using an ALTER TABLE to set a primary key, and Driver.scala, line 131, where the H2Driver has

[Lift] Re: Overriding a lazy val and super?

2009-07-08 Thread DFectuoso
But I want to override... and add something (adding something to the original sitemap, ) Allright, with your example I can express my question perfectly! If you have trait Foo { def bar: String } trait MegaFoo extends Foo { lazy val bar = Hello } And then want to create a trait that