Skip to content

Instantly share code, notes, and snippets.

View ahojukka5's full-sized avatar

Jukka Aho ahojukka5

View GitHub Profile
CREATE TABLE Kayttajat (id INTEGER PRIMARY KEY, tunnus TEXT);
INSERT INTO Kayttajat (tunnus) VALUES ("uolevi"), ("maija"), ("kaaleppi"), ("liisa");
CREATE TABLE Ryhmat (id INTEGER PRIMARY KEY, nimi TEXT);
INSERT INTO Ryhmat (nimi) VALUES ("puput"), ("kilit");
CREATE TABLE Oikeudet (kayttaja_id INTEGER, ryhma_id INTEGER);
INSERT INTO Oikeudet (kayttaja_id, ryhma_id)
VALUES (1, 1), (1, 2), (2, 1), (4, 2);
SELECT
nimi AS `Elokuvan nimi`
FROM
Elokuvat
WHERE
(
vuosi % 100 != 0
AND
vuosi % 4 == 0
)
using BenchmarkTools
using Test
using LinearAlgebra
using Random
Random.seed!(1)
"""
hessfact!(H, Q, A)
Calculate Hessenberg factorization H = Q' * A * Q using Householder
@ahojukka5
ahojukka5 / hessfact1.jl
Created May 21, 2020 04:46
Hessenberg factorizations using Householder transformations
using BenchmarkTools
using Test
using LinearAlgebra
"""
hessfact!(H, Q, A)
Calculate Hessenberg factorization H = Q' * A * Q using Householder
transformations.
"""

Tehtävä 1

Hae kaikkien elokuvien nimet.

Asiasanat: SELECT, FROM

Taulukot

#include <chrono>
#include <iostream>
#include <vector>
template <typename T> std::vector<T> primes(T n) {
bool *is_prime = new bool[n + 1];
for (T i = 2; i <= n; i++) {
is_prime[i] = true;
}
#include <iostream>
// https://stackoverflow.com/questions/23979785/can-unnamed-structures-inherit
class Data1 {
private:
int data = 5;
public:
int get_data() {
class Main4 {
static class Data1 {
int data = 5;
int getData() {
return data;
}
void setData(int data) {
this.data = data;
public class Main3 {
private static class Data1 {
private int data = 5;
public int getData() {
return data;
}
}
private static class Data2 {
public class AnotherData {
private final int data;
AnotherData(int data) {
this.data = data;
}
public int acquireData() {
return data;
}