I've got a problem when trying to use Slick... I've followed exactly this article at first. Everything is good until I add Bars.ddl.create in Global.scala. At this point it launches the excpetion bellow.
NoSuchMethodError: scala.Predef$ArrowAssoc$.extension$$minus$greater(Ljava/lang/Object;Ljava/lang/Object;)Lscala/Tuple2;
I suppose it's due to the method "def * = ..." but I can't change anything.
I've tried an sbt-reboot to as I've seen on a forum but it wouldn't change.
I have Scala-2.10.0, Play-2.1.0
Do you know what's the problem? (And eventually how to solve it =D)
Thanks
Related
Now I want to practice converting the code in Dart, but it gives me this error.
I just wanted to try the data conversion.
its just working fine you might have other error. clean the main function and write it again it might solve the problem.
check out this
https://dartpad.dev/?id=2784dae4ab1808b914799e2c0f59420e
I'm learning from breeze-zza-mongodb sample.
I get some problems when i try to use the saveChanges() function from breeze.
This is the error i get:
"TypeError: Cannot read property 'update' of null at... node_modules\breeze-mongodb\mongoSaveHandler.js : 229:20 at Array.forEach"
Any of you tried and got this error? I searched Google for a bit longer but i can't find this issue. And if i try to manager.getChanges() and put the changes in array, i get my entity with modified state.
The guys from breeze didn't covered this part and i'm completly blind in this. Thank you for your time guys.
I solved my problem. I included the modules in VS so i can debug and i noticed that breeze misnamed my collection name for some reason adding an s at the end.
Anyway.. for now i just removed that, and it works. I will dig deeper to see where and why is breeze adding an s at the end of my collection name because i want to treat the cause, not the effect. Thanks.
I have a routes file like this:
GET /getOf/:city/:fi/:state/:zipCode cont.Offer.getOf(city:String, fi:String, state:String, zipCode:String)
In my scala class, my code is like this:
def getOf(city:String, fi:String,state:String,zipCode:String) = Action(parse.anyContent) {request =>
val offer = Offer(city,fi,state,zipCode);
Ok(Json.toJson(offerService.getOffer(offer)));
}
But when I run I get this compilation error:
too many arguments for method apply: (name: String, constraint: String)play.core.DynamicPart in object DynamicPart
But same code works fine if I have only one argument. I even not understanding what's the problem. Yes, I have created Eclipse project with play clean-all and others. But still same problem persists.
Can anyone please guide me on this? As I am very new to Play framework and scala.
i got the same problem when i walk through from the below url http://scala-ide.org/docs/tutorials/play/index.html but the issue resolved by calling clean and then compile from play console solved the issue.
Note* i initially had the site at different folder.
I got this error only in eclipse IDE and if i make any changes to the views it compiled atonce whereas for controllers it check only when "RELOAD" works...till then you may see the error at eclipse ide but app works fine.
I have an issue with my ModX Evo site throwing this error:
Fatal error: Cannot redeclare insert_metka() (previously declared in /home/mysite/public_html/manager/includes/document.parser.class.inc.php(794) : eval()'d code:2) in /home/mysite/public_html/manager/includes/document.parser.class.inc.php(794) : eval()'d code on line 12'
I have searched and searched but cannot find where insert_metka() is declared. I even downloaded the entire site and ran a search to no avail. I also tried to updated the version to the latest, also to no avail.
Can anyone please tell me where to find this function?
Download a database dump and look for the this line in it. It seems that the fault one of the plugins, try disabling plugins until you find it. See ModX Evo: PHP error in document.parser.class.inc.php for more advices.
As you can see from your error-code, the function was declared in a snippet. This is because Modx has this way of caching snippets to speed up the performance. They make static files of your snippets wrapped as a function.
This may cause errors if the same function is called twice and you declared a function within it. I suspect that is what is going on here.
To solve this issue, simply wrap your entire function in function_exists like so:
if (!function_exists("insert_metka")) {
function insert_metka() {
// Stuff goes here
}
}
Sidenote: This is in addition to the answer given by Vasis. You should search your snippets, extras and plugins. It should be located somewhere in those files. It is not a function provided from the Modx core.
I'm trying to use smarttabs.el from https://gist.github.com/188961 in latest emacs-dev (bzr). When trying to compile or load it I get the error:
smarttabs.el:54:1:Error: Don't know how to make a localized variable an alias
which is completely new to me. How do I correct this?
Also see http://www.emacswiki.org/emacs/SmartTabs for package explanation.
The error message is trying to say that defvaralias (used in the smart-tabs-advice macro) doesn't do what jacius thinks it does. But I'm not quite sure what he thinks it does, so I'm not sure how to fix it. Try reporting the error to him.