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
/** | |
* b64 | |
* @description - converte texto ou objeto para base64 | |
* | |
* @param {Object[]} - objeto DOM de entrada | |
* | |
* @return base64 do grafico | |
*/ | |
var b64 = function(obj){ |
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
require 'net/http' | |
port = 8080 | |
Net::HTTP.start("domain", port) do |http| | |
resp = http.get("/img/cam.jpg") | |
open("file_name.jpg", "wb") do |file| | |
file.write(resp.body) | |
end | |
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
#include <bits/stdc++.h> | |
using namespace std; | |
typedef struct { | |
double nota; | |
int falta; | |
string nome; | |
}aluno; |
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
require 'open-uri' | |
open('file_name_uri.png', 'wb') do |file| | |
file << open('https://uva.onlinejudge.org/templates/hm_yaml_2_5/img/onlinejudgelogo2.png').read | |
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
""" | |
Extract PDF text using PDFMiner. Adapted from | |
http://stackoverflow.com/questions/5725278/python-help-using-pdfminer-as-a-library | |
""" | |
# nao esqueca de instalar a biblioteca Pedro | |
# modificado de acordo com a doc == https://github.com/euske/pdfminer/ | |
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter#process_pdf | |
from pdfminer.pdfpage import PDFPage | |
from pdfminer.converter import TextConverter |
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
#include <bits/stdc++.h> | |
using namespace std; | |
#define maxn 100010 | |
const int inf = 0x3f3f3f3f; | |
int main () { | |
int n; | |
int nova; | |
vector<int> numeros; |
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
#include <bits/stdc++.h> | |
using namespace std; | |
#define maxn 200010 | |
vector <int> pesos,valores; | |
int c = 0; | |
int pd[1000100][200100]; |
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
{ | |
"brands": [ | |
{ | |
"name":"Adriatica" | |
}, | |
{ | |
"name":"Antarctica" | |
}, | |
{ | |
"name":"Antarctica Sub Zero" |
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
/** | |
* Regex credit card numbers test | |
* | |
* author <gusanthiagodv@gmail> | |
*/ | |
const cardCompanies = [ | |
{name: 'visa', pattern: /^4[0-9]{15}$/}, | |
{name: 'master', pattern: /^5[0-5][0-9]{14}$|2[2-6][0-9]{14}$|271[0-9]{13}$|2720[0-9]{12}/}, | |
{name: 'american_express', pattern: /^3[47][0-9]{13}$/}, | |
{name: 'diners_club', pattern: /^3(0[0-5]|[68]\d)\d{11}$/}, |
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
#include <bits/stdc++.h> | |
using namespace std; | |
#define huge unsigned long long | |
huge mulmod(huge a, huge b, huge c) | |
{ | |
huge x = 0, y = a%c; | |
while(b>0) | |
{ |
OlderNewer