Skip to content

Instantly share code, notes, and snippets.

View crssnky's full-sized avatar
🏍️
ブンブン

crssnky crssnky

🏍️
ブンブン
View GitHub Profile
@crssnky
crssnky / a.cpp
Created September 19, 2021 18:42
// crssnky
#include "MyBlueprintFunctionLibrary.h"
#include <cmath>
float UMyBlueprintFunctionLibrary::GetEarthRadius()noexcept {
return m_earthRadius;
}
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT (sample(?o) as ?date) (sample(?n) as ?name)
WHERE {
?sub schema:birthDate ?o;
rdfs:label ?n;
bind("--xx-xx"^^xsd:gMonthDay as ?3ago)
bind("--xx-xx"^^xsd:gMonthDay as ?3later)
FILTER(?o>=?3ago && ?o<=?3later).
@crssnky
crssnky / UBlueprintSelectBox.cpp
Last active November 13, 2020 17:56
SObjectPropertyEntryBoxでActorアセットを選択する話のやつ
// crssnky
#include "BlueprintSelectBox.h"
#include "PropertyCustomizationHelpers.h"
UBlueprintSelectBox::UBlueprintSelectBox(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{}
@crssnky
crssnky / makeUnitList.sparql
Last active June 1, 2019 13:57
アイドルごとに所属ユニットを取得する
PREFIX schema: <http://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX imas: <https://sparql.crssnky.xyz/imasrdf/URIs/imas-schema.ttl#>
SELECT ?m (group_concat(?s;separator=",,,,,")as ?u)
WHERE {
?s rdf:type imas:Unit;
schema:member ?m.
}group by (?m) order by (?m)
PREFIX imas: <https://sparql.crssnky.xyz/imasrdf/URIs/imas-schema.ttl#>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT (SUM(?得票数) as ?総得票数) (Sample(?nm) as ?名前)
WHERE {
?s schema:member ?o;
imas:VoteNumber ?得票数.
?o rdfs:label ?nm
}group by(?o) order by(?総得票数)
PREFIX schema: <http://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX imas: <https://sparql.crssnky.xyz/imasrdf/URIs/imas-schema.ttl#>
PREFIX imasrdf: <https://sparql.crssnky.xyz/imasrdf/RDFs/detail/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX math: <http://www.w3.org/2005/xpath-functions/math#>
PREFIX xsd: <https://www.w3.org/TR/xmlschema11-2/#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT (sample(?n)as ?公演名) (sample(?sD)as ?公演日) (group_concat(?a)as ?出演者)
const URL = "https://sparql.crssnky.xyz/spql/imas/query?query=";
const Query = ['PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX schema: <http://schema.org/>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>SELECT (sample(?o) as ?date) (sample(?n) as ?name)WHERE {?sub schema:birthDate ?o;rdfs:label ?n;bind("', '"^^xsd:gMonthDay as ?3ago)bind("', '"^^xsd:gMonthDay as ?3later)FILTER(?o>=?3ago && ?o<=?3later).}group by(?sub) order by(?o)'];
const date = new Date();
var strings = [];
date.setDate(date.getDate() - 3)
for (var i = 0; i < 7; i++) {
const month = date.getMonth() + 1;
const day = date.getDate();
strings.push("--" + (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day));
@crssnky
crssnky / BirthDate.js
Last active May 8, 2019 14:18
im@sparql BirthDate
onload = function () {
var Query = ["PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX schema: <http://schema.org/>SELECT (sample(?o) as ?date) (sample(?n) as ?name) WHERE { ?sub schema:birthDate ?o; rdfs:label ?n;FILTER(regex(str(?o), \"", "\" )).}group by(?n)order by(?name)"];
var date = new Date();
var month = date.getMonth() + 1;
var day = date.getDate();
var now = (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day);
var url = 'https://sparql.crssnky.xyz/spql/imas/query?query=' + encodeURIComponent(Query[0] + now + Query[1]);
d3.json(url, function (error, data) {
var jsons = data["results"]["bindings"];
if (jsons.length == 0) {
PREFIX schema: <http://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX imas: <https://sparql.crssnky.xyz/imasrdf/URIs/imas-schema.ttl#>
SELECT ?ユニット名 (group_concat(?名前;separator=", ")as ?メンバー)
WHERE {
?s rdf:type imas:Unit;
schema:name ?ユニット名;
schema:member/schema:name ?名前.
}group by (?ユニット名) order by(?ユニット名)
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT *
WHERE {
?主語 ?述語 "島村卯月"^^rdf:langString
}