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
const robar = arreglo => { | |
const casasPorRobarOriginal = [...arreglo]; | |
const arrDesc = [...arreglo]; | |
//Ordenamos las casas a robar por cantidad de dinero de forma descendente | |
//Y lo guardamos en arrDesc, mantenemos el arrary original para poder comparar indices luego | |
for(let i = 0; i < arrDesc.length; i++){ | |
for(j = i + 1; j < arrDesc.length; j++){ | |
if(arrDesc[i] < arrDesc[j]){ | |
const grande = arrDesc[j]; | |
arrDesc[j] = arrDesc[i]; |
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
definición del form y del formset: | |
''' | |
archivo forms.py | |
''' | |
class AutorForm(forms.ModelForm): | |
def clean_nombre(self): | |
return escape(self.cleaned_data.get('nombre')) | |
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
public HttpResponseMessage GetClientes(string browserId) | |
{ | |
log.Debug("Entró el browserId "+browserId); | |
Cliente cliente = null; | |
ServerResponse serverResponse = new ServerResponse(); | |
try |
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
package com.zulu.fireapp; | |
import android.support.annotation.NonNull; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.View; | |
import android.widget.ListView; | |
import android.widget.TextView; | |
import com.firebase.ui.database.FirebaseListAdapter; |
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
/*var link = document.createElement('a'); | |
link.href = 'http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe'; | |
link.download = ''; | |
document.body.appendChild(link); | |
link.click(); | |
*/ | |
document.onreadystatechange = () => { | |
if (document.readyState === 'complete') { | |
var html = document.getElementsByTagName("HTML")[0]; |