Skip to content

Instantly share code, notes, and snippets.

View promontis's full-sized avatar
💭
:octocat:

Michel van den Berg promontis

💭
:octocat:
View GitHub Profile
return sparqlResultSet
.GroupBy(r => r.Value("Mid"))
.Select(r => new SchemaType
{
Mid = ((UriNode) r.Key).WithoutNamespace(),
Keys = r.Where(k => k.HasValue("Key")).Select(k => ((UriNode)k.Value("Key")).WithoutNamespace()).Distinct().ToList(),
Name = r.Where(k => k.HasValue("Name")).Select(n => ((LiteralNode)n.Value("Name")).Value).Distinct().SingleOrDefault(),
Type = r.Where(k => k.HasValue("Type")).Select(t => ((UriNode)t.Value("Type")).WithoutNamespace()).Distinct().SingleOrDefault()
});
The following query (just a sample), uses a named graph and a subquery to filter.
The subquery is created via a custom build linq-provider, as the linq expression is expressed in a subquery as well.
I originally had a FROM clause in the subquery as well, but then I get an exception, that this is not allowed.
Removing the FROM clause in the subquery works, but the name node now belong to the empty default graph (as it has no graphuri or graph)
SELECT ?id ?name
FROM <http://sample.com>
WHERE {
{
?id <http://sample.com/thename> ?name
public class FacebookConnectAssertionGrantValidator : IAssertionGrantValidator
{
private const string XmlSchemaString = "http://www.w3.org/2001/XMLSchema#string";
private const string GraphApiEndpoint = "https://graph.facebook.com/me";
private readonly static ILog Logger = LogProvider.GetCurrentClassLogger();
private readonly IExternalClaimsFilter _externalClaimsFilter;
public FacebookConnectOptions Options { get; set; }
public FacebookConnectAssertionGrantValidator(FacebookConnectOptions options)
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.Owin.Security.Facebook;
using Newtonsoft.Json.Linq;
using Thinktecture.IdentityServer.Core.Logging;
using Thinktecture.IdentityServer.Core.Models;
using Thinktecture.IdentityServer.Core.Services;
# Timeline
### Events
- StylePosted
- QuestionPosted
- CommentPosted
- StyleCommentPosted (to differentiate between a normal comment and one with a style)
- QuestionMarkedAnswered
- PostLiked
- PostUnliked
- PostShared

Timeline

Events

  • StylePosted
  • QuestionPosted
  • CommentPosted
  • StyleCommentPosted (to differentiate between a normal comment and one with a style)
  • QuestionMarkedAnswered
  • PostLiked
  • PostUnliked
  • PostShared
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using SharpGLTF.Geometry;
using SharpGLTF.Geometry.VertexTypes;
using SharpGLTF.Materials;
using VERTEX = SharpGLTF.Geometry.VertexBuilder<
SharpGLTF.Geometry.VertexTypes.VertexPositionNormal,
SharpGLTF.Geometry.VertexTypes.VertexTexture1,
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using EventFlow.Aggregates;
using EventFlow.Core;
using EventFlow.Exceptions;
using EventFlow.Logs;
directive @cost(
complexity: Int! = 1
multipliers: [MultiplierPath!]
) on FIELD_DEFINITION
type Address implements IComponent {
city: String
country: String
housenumber: String
id: String
postalCode: String
public class GroupSubscriber : IHostedService
{
private readonly StreamsDBClient _client;
private readonly IDispatchToEventSubscribers _dispatchToEventSubscribers;
private readonly IDispatchToSagas _dispatchToSagas;
private readonly IEventJsonSerializer _serializer;
private readonly ISagaDefinitionService _sagaDefinitionService;
private readonly ILoadedVersionedTypes _loadedVersionedTypes;
private readonly IEventDefinitionService _eventDefinitionService;