Skip to content

Instantly share code, notes, and snippets.

View jpolvora's full-sized avatar

Jone jpolvora

View GitHub Profile
@jpolvora
jpolvora / linq.cs
Last active December 14, 2015 00:29 — forked from anonymous/linq.cs
var dados = (from p in db.t0010_bairro
where p.t0001_cod_cidade == pCodCidade
select (int?)p.t0010_cod_bairro).Max() ?? 1;
#include <stdio.h>
int main (void)
{
int num,cont;
scanf("%d", &num);
for(cont = 2;(cont < num) && (num%cont!=0); cont++){
if(num==cont)
printf("primo\n");
/*
* read-only date display with momentjs
* use like this: data-bind="moment: dateVar, format: 'YYYY-MM-DD'"
* The "format" is optional and will default to "MM/DD/YYYY"
*/
ko.bindingHandlers.moment = {
update: function (element, valueAccessor, allBindingsAccessor, viewModel) {
var val = valueAccessor();
var date = moment(ko.utils.unwrapObservable(val));
<!-- Custom caching policy for on HTTP POST for Azure API Management:
1. Policy looks in the Request body - 'cacheKey' property which then used as cache key.
Expected values are: <null>, ALL or NOEXPIRED
Defaults to ALL in case <null>
2. Cache expiration set to 60 seconds/1 minute
!-->
<policies>
<inbound>
<base />