This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The code below produces ClassNotFoundError. How to fix it? | |
import groovy.transform.ToString | |
@ToString | |
class P2ModuleSource implements Serializable { | |
private static final long serialVersionUID = 3526473395612776159L | |
List uris | |
P2ModuleSource(List uris) { | |
this.uris = uris |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Issue 1 | |
-------- | |
Requested project: /home/ahi/Projects/SampleProject | |
Stack trace: | |
org.gradle.tooling.BuildException: Could not run build action using Gradle installation '/home/ahi/.gvm/gradle/2.0-rc-2'. | |
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:53) | |
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57) | |
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is working gradle script for uploading artifacts of the given project | |
// to bintray/jcenter and to maven central (via bintray "sync to maven central" function). | |
// This script can be included from other scripts via `apply from: 'filename'` syntax. | |
apply plugin: 'signing' | |
apply plugin: 'maven-publish' | |
apply plugin: 'bintray' | |
import org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext { | |
springBootVersion = '1.1.0.RELEASE' | |
} | |
repositories { | |
mavenLocal() | |
jcenter() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab('org.jdom:jdom2:2.0.5') | |
@Grab('xerces:xercesImpl:2.11.0') | |
@Grab('xml-apis:xml-apis:1.4.01') | |
@Grab('jaxen:jaxen:1.1.4') | |
@GrabExclude(group='jdom', module='jdom') | |
@GrabExclude(group='org.jdom', module='jdom') | |
import org.jdom2.Document | |
import org.jdom2.Element | |
import org.jdom2.JDOMException |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am akhikhl on github. | |
* I am akhikhl (https://keybase.io/akhikhl) on keybase. | |
* I have a public key whose fingerprint is 3817 213B F592 2F04 4534 C0EC 125B 5BF8 F575 C5C0 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
learn triangle $x { | |
fw $x | |
tr 120 | |
fw $x | |
tr 120 | |
fw $x | |
tr 120 | |
} | |
learn serpinsky $x, $level { | |
triangle $x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Comparator; | |
import java.util.Map; | |
import java.util.LinkedHashMap; | |
import java.util.List; | |
class FloatEntryComparator implements Comparator<Map.Entry> { | |
public int compare(Map.Entry e1, Map.Entry e2) { | |
return ((Float)e2.getValue()).intValue() - ((Float)e1.getValue()).intValue(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.awt.Color; | |
import java.awt.event.*; | |
import java.awt.geom.*; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Rectangle; | |
public class Ball extends JComponent { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Map; | |
rand = new Random(); | |
float random(float minX, float maxX) { | |
rand.nextFloat() * (maxX - minX) + minX | |
} | |
// Note the HashMap's "key" is a String and "value" is an Integer | |
HashMap<Float,Float> hm = new HashMap<Float,Float>(); |
NewerOlder