This file contains hidden or 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
Boot into Live CD and run: | |
(sda1 is linux partition) | |
sudo mount /dev/sda1 /mnt | |
sudo grub-install --root-directory=/mnt /dev/sda |
This file contains hidden or 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
package com.cavoirom.java.recursion.example; | |
public class IntLinkedList { | |
private Node first; | |
public IntLinkedList() {} | |
public void add(int data) { | |
Node newNode = new Node(data); | |
if (first == null) { |
This file contains hidden or 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
/* Plain Java */ | |
JUnitCore junit = new JUnitCore(); | |
TestResultListener testResultListener = new TestResultListener(); | |
junit.addListener(testResultListener); | |
junit.run(testClass); | |
return testResultListener.getTestResult(); | |
/* Java Reflection */ | |
ClassLoader testClassLoader = testClass.getClassLoader(); | |
Class<Object> junitClass = (Class<Object>) getClass("org.junit.runner.JUnitCore", testClassLoader); |