This file contains hidden or 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
// source http://www.java2s.com/Code/Java/Development-Class/Returnsthegivendatewithtimesettotheendoftheday.htm | |
import java.util.Calendar; | |
import java.util.Date; | |
public class DateUtils { | |
/** | |
* <p>Checks if two dates are on the same day ignoring time.</p> | |
* @param date1 the first date, not altered, not null |
This file contains hidden or 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
# decoder for the codes transmitted for this RF Tx/Rx: https://www.instructables.com/id/Super-Simple-Raspberry-Pi-433MHz-Home-Automation/ | |
# se puede probar en https://www.tutorialspoint.com/execute_python_online.php | |
import re | |
# codigo leido por el receptor de radiofrecuencia | |
out = "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
This file contains hidden or 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
$(document).ready(function() { | |
var link = $('head').find('link:first'); | |
window.onbeforeunload = function(){ | |
return "Leaving this page may cause loss of your code!"; | |
}; | |
window.beforeunload = function(){ | |
return "Leaving this page may cause loss of your code!"; | |
}; | |
$(window).bind('keydown', function(event) { | |
if (event.ctrlKey || event.metaKey) { |
This file contains hidden or 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 a = {a:'a'}; | |
var b = {b:'b'}; | |
// a is modified and is the merge | |
console.log(Object.assign(a, b)); | |
console.log(a, b); |
This file contains hidden or 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
int Echo1 = A3; //LEFT_SENSOR ECHO | |
int Trig1 = A2; //LEFT_SENSOR TRIG | |
int Echo2 = A5; //MID_SENSOR ECHO | |
int Trig2 = A4; //MID_SENSOR TRIG | |
int Echo3 = A1; //RIGHT_SENSOR ECHO | |
int Trig3 = A0; //RIGHT_SENSOR TRIG | |
int in1 = 5; | |
int in2 = 6; | |
int in3 = 9; |
This file contains hidden or 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
@Grab(group='net.sourceforge.nekohtml', module='nekohtml', version='1.9.14') | |
import org.cyberneko.html.parsers.SAXParser | |
import groovy.util.XmlSlurper | |
// global | |
out = new File('/home/pablo/Desktop/play_store_scrap_20170612-5.csv') | |
base_url = "https://play.google.com" | |
similar_queue_urls = [] // queue to process similar apps, list<url:current depth>, cant make a map because I need to use list.pop to loop becaue iteration cant be done since the queue will be modified while iterating | |
processed_app_details_urls = [] // list of already processed to avoid loops | |
scrapped = new StringBuffer() // CSV accumulator |
This file contains hidden or 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
// BinTreeJS | |
(function() { | |
"use strict"; | |
var expr; // expression of this bintree | |
var value; // value of the current node | |
var left; // subtrees | |
var right; |
This file contains hidden or 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 o = { | |
a: undefined, | |
b: undefined | |
}; | |
console.log( o.a && o.b ); | |
console.log( !o.a && !o.b ); |
This file contains hidden or 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
// CriteriaBuilderJS | |
// Criteria Expression Module | |
(function() { | |
"use strict"; | |
// expression id generator | |
var id = 1; | |
This file contains hidden or 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
<html> | |
<head> | |
<script | |
src="https://code.jquery.com/jquery-3.3.1.min.js" | |
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" | |
crossorigin="anonymous"></script> | |
<script> | |
$(function() { | |
$('textarea').on('change keyup paste', function(e) { | |
//console.log(e.target.value); |