Skip to content

Instantly share code, notes, and snippets.

View jonataa's full-sized avatar

Jonata Weber jonataa

  • Feira de Santana - Bahia
View GitHub Profile
if ($_GET['acao'] == 'add') {
$id = intval($_GET['id']);
if (!isset($_SESSION['ticket'][$id])) {
$_SESSION['ticket'][$id] = array(
'qtd' => 1,
'item' => "X-frango",
'preco' => 10.00,
'subtotal' => 10.00 * 1
);
@jonataa
jonataa / requirements.txt
Last active January 12, 2016 21:24
PUT method for unexisting document is not working on the Python-EVE
eve==0.6.1
[
{"lat": "37.782551", "long": "-122.445368"},
{"lat": "37.782745", "long": "-122.444586"},
{"lat": "37.782842", "long": "-122.443688"},
{"lat": "37.782919", "long": "-122.442815"},
{"lat": "37.782992", "long": "-122.442112"},
{"lat": "37.783100", "long": "-122.441461"},
{"lat": "37.783206", "long": "-122.440829"},
{"lat": "37.783273", "long": "-122.440324"},
{"lat": "37.783316", "long": "-122.440023"},
const assert = require('assert');
function getFizzBuzzRules() {
return [
{ label: () => 'fizzbuzz', rule: n => n % 15 === 0 },
{ label: () => 'buzz', rule: n => n % 5 === 0 },
{ label: () => 'fizz', rule: n => n % 3 === 0 },
{ label: (n) => n, rule: n => n === n },
];
}
*{
padding: 0;
margin: 0;
font-family: Arial, Helvetica, Sans-serif;
font-size: 14px;
}
.logo{
display: flex;
flex-direction: row;
function isBeatifulNumber(n, has = '4', hasnot = '9') {
const numberAsString = n.toString();
const hasFour = numberAsString.includes(has) === true;
const hasNine = numberAsString.includes(hasnot) === false;
return hasFour && hasNine;
}
const isBeatifulNumberHasThreeAndHasNotTwo = function (n) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>WeberSchool - DOM</title>
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>XHR</title>
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>XHR</title>
</head>
<body>
articles: [
{id: 1, created_at: "..."},
{id: 2, created_at: "..."}
],
articles_events: [
{id: 1, article_id: 1, type: "created", data: {title: "hello", category_id: 3}, created_at: "..."},
{id: 2, article_id: 1, type: "title_updated", data: {title: "hello, world"}, created_at: "..."},
{id: 3, article_id: 1, type: "published", data: {}, created_at: "..."},