Problem in check exercises in atomic kotlin Course Could not find method compile() for arguments [org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20] - kotlin

I am trying to go ahead with the atomic kotlin book and do the exercises using the Edu Tools plugin. I will get this error after writing the exercise and hitting the check button. I could not solve this problem by searching please help.
Screenshot of settings and errors : https://imgur.com/a/2OaVeSn

I've found the solution here:
https://github.com/svtk/AtomicKotlinCourse/issues/64
Basically, what you have to do if to replace your buil.gradle with the buil.gradle from the repository.
That's all!

Related

Getting EduTool to work for Kotlin in Intellij

I am trying to learn Kotlin by following the tutorial. I managed to get the plugin installed in Intellij. But I am not able to get the first exercise to run. When I click on the little checkbok it tells me
Failed to launch checking. See idea.log for more details.
(I created another blank project and type the same simple exercise in a scratch file and it works.)
link to docs
Try to check the project's is linked to the right JDK. Open File/Project Structure/Project. Then select the correct Project SDK.
To me, this helped. But as others have pointed out, please, share your idea.log, which you can find at Help/Show log in [whatever text editor it's associated with].

Contributing Quick fix in eclipse

Is it possible to contribute quick fix in eclipse for non-java code (say xtend scripts or ant scripts ).
If yes, which extension should I use ?
Thanks,
Santhosh
IMHO no. You have to create a plug-in and write code in Java, If you have to extend/contribute to eclipse functionalities.
I got the solution.Thanks for your suggestions !!
I used the extension point org.eclipse.ui.ide.markerResolution as suggested.
The below link gives a detailed explanation
http://alvinalexander.com/java/jwarehouse/eclipse/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/MarkerResolutionGenerator.java.shtml
You can contribute quick fixes for anything as long as you know the marker type of the problem marker that you want to fix. Use the extension point:
org.eclipse.ui.ide.markerResolution
In there you specify the marker type (for example org.eclipse.ant.ui.buildFileProblem for ant build file markers) and a custom class to generate quick fix resolutions (IMarkerResolution instances). You can browse for the marker types if you're not sure of the right one.

Newbie gotchas in Sarah Mei's "Outside-In BDD: How?!" Cucumber tutorial

I'm trying to learn Cucumber. After poking around a bit on SO I found a link to this tutorial. It was very helpful (and I recommend it highly!), but, for a beginner like myself, a couple of the early steps were opaque. I thought I'd explain these two pitfalls here, to spare future Cucumber students the head-scratching they caused me.
The two problems both came up in this section:
Starting the fail-fix cycle
I run it using cucumber features, and it fails on the first line –
Given I go to the new book page – because cucumber doesn’t know where
the “new book page” is. So I add that to the cucumber paths helper.
when /the new book page/
new_book_path
I had trouble interpreting this section and running her code.
My first question was: where do I find the cucumber paths helper file?
Once I figured it out and ran cucumber features, I got a syntax error.
My second question was how do I debug the syntax error that her code raises? I've tried to answer these two questions below.
First Gotcha: where the heck is the `cucumber paths helper'?
First off, she talks about adding a step to the cucumber paths helper. I struggled for a while to figure out where this file was located. I couldn't find anything with a similar name in my app, and google searches didn't yield any useful results. What was going on?
It turns out that I couldn't find the file because it's not automatically generated -- you need to create it yourself. Furthermore, the name of the file is totally arbitrary: it doesn't need to be called cucumber_paths_helper. That's why my google searches were fruitless.
For her code snippet to be executed it just needs to be in some file living in the features/support folder. All of the code in this directory is executed before any cucumber tests are run. The solution? I put her code into a new file at features/support/manage_books_steps.rb.
Ok, one down...
Second Gotcha: syntax error, unexpected keyword_when
The next problem showed up when I tried to run cucumber features. I got this:
/Users/dB/myApp/features/support/manage_books_steps.rb:1: syntax error, unexpected keyword_when
when /the new book page/
^ (SyntaxError)
For some reason my system couldn't parse this code. I'm not sure why exactly, but I'm guessing that Sarah was using some gem or tool to preprocess her code that I didn't have installed, and she unfortunately didn't go into detail about her gemset in the article. (Maybe she wrote it before cucumber's training wheels came off?) In any case, after consulting some other cucumber tutorials I tried reformatting her snippet like so.
When /^I go to the new book page$/ do
visit new_book_path
end
This worked.
After getting past those two little obstacles, the rest of the tutorial was a synch.
Anyway, I hope this helps someone somewhere down the line. And thanks, Sarah, for a great tutorial.
Edits/comments/corrections are welcome.

API for Dictionary and Translator

Again. I've been searching for the best API for my Application. Dictionary and Translator. Can someone Recommend One. Please. i need it. I downloaded "microsoft-translator-jar" and I'm having an error in my line of code.
'com.memetix.mst.translate.Translate.execute(text, Language.ENGLISH, Language.ITALIAN);'
The error is at the (execute). the method execute(String,Language,Language)in the type Translate is not applicable for the arguments (String, Language, Language).
i've tried all the execute methods but No luck. Can someone help me how to solve it or refer a new API. Thanks.
You may be lost json-simple-1.x.jar.
Please go website http://code.google.com/p/json-simple/ to download that package.
I think your problem may be resolved.
Good-luck!

Getting Cocoa method completions in Sublime Text 2

I've been playing with Sublime Text 2 the last few days and was wondering if anyone out there has had any success getting Cocoa method completions working yet? Is there a plugin (or in-progress project to create one) out there?
Any general comments on using Objective-C in Chocolat or Sublime Text 2 would also be welcome.
There is an in-progress Sublime Text package that connects to clang to get autocomplete data called SublimeClang I've not managed to successfully get it to work totally with Cocoa/UIKit Dev, but here's a screenshot
and my options, that are a start
In MacVim I use a plugin called Cocoa.vim which haves useful python scripts that generates a classes and methods files for autocompletion. I didn't try so much with ST2, but may be is posible to create a sublime-package or sublime-completions file with all this data.
For the moment, I only create a sublime-completions file with some snippets. If I find a way to make this work, I will tell you.
I let my SublimeClang configuration options if helps anybody. I've already some of the autocompletions working:
"options":[
"-Wall",
"-isystem", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/",
"-isystem", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/c++/4.2.1/",
"-I/usr/lib/clang/3.1/include/**",
"-I", "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include/",
"-arch","armv7",
"-isysroot", "/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk",
"-D__IPHONE_OS_VERSION_MIN_REQUIRED=50000",
"-ferror-limit=0"
]
Answering my own question here. A quick visit to the Sublime forums didn't turn up any leads nor did Google. It looks as though method completions for Objective-C aren't currently part of the default install nor available via 3rd-party quite yet.
This user http://b.rthr.me/wp/?p=368 claims to have gotten SublimeClang working. I may report back myself once I try it...