Skip to content

Instantly share code, notes, and snippets.

using System;
using CoronaAPI.Data;
using CoronaAPI.Data.Repository;
using CoronaAPI.src.Data.UoW;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
public static void main(String[] args) throws Exception {
Object retorno;
Object[] operands = new Object[4];
//Cin
operands[0] = -8.055602; // lat x
operands[1] = -34.951265; // lon x
//Casa
operands[2] = -8.039507; // lat y
operands[3] = 34.949606; // lon y
AbstractNumericOperator geo = new GeographicDistance();
public static IQueryable<TEntity> OrderBy<TEntity>(IQueryable<TEntity> source, string orderByProperty, bool desc)
{
string command = desc ? "OrderByDescending" : "OrderBy";
var type = typeof(TEntity);
var property = type.GetProperty(orderByProperty);
var parameter = Expression.Parameter(type, "p");
var propertyAccess = Expression.MakeMemberAccess(parameter, property);
var orderByExpression = Expression.Lambda(propertyAccess, parameter);
var resultExpression = Expression.Call(typeof(Queryable), command, new Type[] { type, property.PropertyType },
source.Expression, Expression.Quote(orderByExpression));
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="SUAMASTERPAGE.master.cs" Inherits="SUAMASTERPAGE" %>
<!DOCTYPE html>
<html lang="en-US">
<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="Head" runat="server">
</asp:ContentPlaceHolder>
</head>
<%@ Page Language="C#" MasterPageFile="~/SUAMASTERPAGE.master" AutoEventWireup="true"
CodeFile="Teste.aspx.cs" Inherits="Teste" Title="Teste"
EnableEventValidation="false" %>
<%@ MasterType VirtualPath="~/SUAMASTERPAGE.master" %>
<asp:Content ID="Content" ContentPlaceHolderID="Head" runat="server">
// AQUI COLOCA OS CSS E JS
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Conteudo" runat="Server">
@thomascristanis
thomascristanis / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;