Skip to content

Instantly share code, notes, and snippets.

View christ776's full-sized avatar

Christian De Martino christ776

View GitHub Profile

Keybase proof

I hereby claim:

  • I am christ776 on github.
  • I am christian776 (https://keybase.io/christian776) on keybase.
  • I have a public key ASDd9jVHfzDhy3z_lIslZ5H5zZs-q5iHIrxsW6Q3dENA4Ao

To claim this, I am signing this object:

function flattenArray(arr) {
if (arr === undefined || arr === null) {
throw new Error('Bad argument type:', arr);
}
const flattenedArray = [].concat(...arr)
for(const m of flattenedArray) {
if (m instanceof Array) {
return flattenArray(flattenedArray);
}
}
#!/usr/bin/env python3
import requests
from requests.exceptions import ConnectionError
import json
import locale
from bs4 import Tag, NavigableString, BeautifulSoup
"""
Set locale to es_ES
curl -s https://www.bancogalicia.com/cotizacion/cotizar\?currencyId\=02\&quoteType\=SU\&quoteId\=999 | python -c "import sys, json; obj = json.load(sys.stdin);print('Dolar compra: ' + obj['buy']); print('Dolar venta: '+ obj['sell'])"
//You have an array of characters (string) that may be '1', '0' o '*'. e.g. 10*00*0. The program needs to
//generate an output of all the possible combinations by replacing * with an 0 and 1. I.e. input> 10**0
//output> 10000, 10010, 10100, 10110. Input > *0 output > 00, 10.
function findOcurrencesOf(character = "*", array) {
let occ = [];
for (let i = 0; i < array.length; i++) {
if (array[i] === character) {
occ.push(i);
}
//You have an array of characters (string) that may be '1', '0' o '*'. e.g. 10*00*0. The program needs to
//generate an output of all the possible combinations by replacing * with an 0 and 1. I.e. input> 10**0
//output> 10000, 10010, 10100, 10110. Input > *0 output > 00, 10.
function findOcurrencesOf(character = "*", array) {
let occ = [];
for (let i = 0; i < array.length; i++) {
if (array[i] === character) {
occ.push(i);
}
{
"categoriesToShow": [
"Key Concepts",
"Mathematical Practices",
"Learning Objectives"
],
"questionTagsById": [
{
"id": 568229,
"question_type": "questions/multiple_choice",
##
## Supermodel
## A Sega Model 3 Arcade Emulator.
## Copyright 2011-2016 Bart Trzynadlowski, Nik Henson
##
## This file is part of Supermodel.
##
## Supermodel is free software: you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## Software Foundation, either version 3 of the License, or (at your option)
// The MIT License (MIT)
//
// Copyright (c) 2015 Isuru Nanayakkara
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
override func scrollViewDidScroll(scrollView: UIScrollView) {
// when reaching bottom, load a new page
if scrollView.contentOffset.y == scrollView.contentSize.height - scrollView.bounds.size.height
{
// fetch next page of results
//self.footerActivityIndicator.startAnimating()
self.dataPaginator.fetchNextBatch()
}
}