Skip to content

Instantly share code, notes, and snippets.

View ahojukka5's full-sized avatar

Jukka Aho ahojukka5

View GitHub Profile
public class Data {
private String name;
public Data(String name) { this.name = name; }
public String getData() { return name; }
}
public class AbstractInterfaceForAnotherData extends AbstractData {
private AnotherData data;
public AbstractInterfaceForAnotherData(AnotherData data) {
this.data = data;
}
@Override
public int getData() {
#include <iostream>
class Data {
private:
int data;
public:
Data(int data) {
this->data = data;
}
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class HelloFX extends Application {
@Override
public void start(Stage stage) {
#include <iostream>
#include <string>
using namespace std;
/**
* Generic accumulator class.
*/
template <class T> class Accumulator {
private:
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Tehtava4 {
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class WordCount {
public static String removeTags(String content) {
Pattern p = Pattern.compile("<.+?>");
Matcher m = p.matcher(content);
return m.replaceAll("");
}
@ahojukka5
ahojukka5 / composition.jl
Created January 3, 2020 06:18
Functional programming using Julia
‎‎​
@ahojukka5
ahojukka5 / hello.jl
Last active January 2, 2020 22:21
Hello world from Julia in VSCode + GistPad
println("Hello, world!")
@ahojukka5
ahojukka5 / hello.py
Last active January 2, 2020 22:17
Hello world from Python in VSCode + GistPad
import numpy as np
import matplotlib.pylab as plt
print("Hello, world!")
x = np.linspace(0, np.pi)
y = np.sin(x)
plt.plot(x, y)