This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import servidor_caseiro, json | |
produtos = [ | |
"Banana", | |
"Maçã", | |
"Laranja", | |
] | |
def ler_carrinho(method, path, request_body): | |
return "<h1>Carrinho de compras</h1>", "200 OK" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GNU LESSER GENERAL PUBLIC LICENSE | |
Version 2.1, February 1999 | |
Copyright (C) 1991, 1999 Free Software Foundation, Inc. | |
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
Everyone is permitted to copy and distribute verbatim copies | |
of this license document, but changing it is not allowed. | |
[This is the first released version of the Lesser GPL. It also counts | |
as the successor of the GNU Library Public License, version 2, hence |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.6; | |
// cofre, que o dono define quem é a pessoa que pode sacar, e em qual data | |
contract Inventario { | |
uint256 public dataSaque; | |
address payable public herdeiro; | |
address public dono; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Test do | |
def in_range?(<<min, "-", max>>, <<value>>) do | |
min <= value && value <= max | |
end | |
def in_range?(_range, _value), do: false | |
end | |
Test.in_range?("1-5", "3") # true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" add this to your .vimrc and have some highlights when viewing log files | |
" originally made for Android logs; just change the regex for other kinds of logs | |
" the negative number (which is the priority arg) prevents these rules to | |
" override the Search Highlight, since it has priority equal to 0 | |
" not extensively tested; may need additional .vimrc settings | |
" (worked with this settings: https://github.com/geonnave/dotfiles/blob/master/.vimrc) | |
" color codes taken from http://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim | |
" error lines have red text | |
highlight log_error ctermfg=203 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PhylteSolver | |
def initialize(params) | |
@bpsy = params[:bpsy] | |
@bandwidth = params[:bandwidth] | |
@guard_band = params[:guard_band] | |
@deltaf = 15000 | |
@n_reference_symbols = 4 | |
@ofdm_symbols = {:normal => 7, :extended => 6} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = 17 #number of food items | |
i = 1 #food items pica-pau will get | |
j = 0 #food items zeca urubu will get | |
k = 0 #pica-pau food items plus zeca urubu food items | |
while k < n #k cannot be greater than n | |
print i.to_s + " pra voce;\n" | |
j = 1 | |
while j <= i and k < n | |
print j.to_s + ", " | |
j += 1 |