Ir al contenido principal

Entradas

Mostrando entradas de 2017

Arduino: Probar el sensor de ultrasonidos HR-SC04

#define prender(pin) digitalWrite( (pin) , HIGH ) #define apagar(pin)  digitalWrite( (pin) , LOW ) #define salida(pin)  pinMode( (pin) , OUTPUT ) #define entrada(pin) pinMode( (pin) , INPUT ) #define esperar      delay   long laDistancia ;   long elTiempo ;   void setup ()     {       Serial . begin ( 9600 );       salida ( 9 ) ;       entrada ( 8 ) ;     }   ;     void loop ()     {       apagar ( 9 );       delayMicroseconds ( 5 );       prender ( 9 );       delayMicroseconds ( 10 );              elTiempo = pulseIn ( 8 , HIGH );       laDistancia = int ( 0.017 * elT...

Link para el BIOS de la Compaq F700

El siguiente es el link al informe ACCEDE en TechRepublic A Compaq BIOS is like a file cabinet with many locked drawers and few open ones. The computer maker limits the settings users can change, unlike more liberal manufacturers that let users tinker with advanced settings. This means that Compaq prevents the owners of their computers from exploring the mysteries of their Basic Input/Output System (BIOS) settings, and from trying to make their computers run better and faster. To penetrate a Compaq BIOS, users need a map and a key. In this Daily Drill Down, I will provide both by explaining where Compaq owners can read BIOS information in DOS and in Windows, and by presenting a tool called TweakBIOS. With TweakBIOS, many settings that Compaq tried to hide are illuminated. I will also list some BIOS resources.

RegEx para saber si hay comas fuera de paréntesis

La siguiente Regular Expression indica si hay una coma fuera de paréntesis. La idea es resolver un caso para CSS: Según la opción del codificador, puede elegirse entre el modelo JSON o la misma función CSS3 para un fondo de gradiente lineal: - funcion="lineal-gradient( 35deg, red, blue )" - funcion="lineal, 35deg, red, blue" Código: /,(?![^(]*\))/g Extraido del comentario del usuario Tim Pietzcker que ejemplifica con mucha ayuda... Pattern regex = Pattern.compile( ", # Match a comma\n" + "(?! # only if it's not followed by...\n" + " [^(]* # any number of characters except opening parens\n" + " \\) # followed by a closing parens\n" + ") # End of lookahead", Pattern.COMMENTS); En Coincidir sólo las comas que no estén dentro de paréntesis .

Solicitar Marcado para Animación o Request Animation Frame (rAF)

Una unidad sencilla de rAF Algoritmo en JavaScript: window.requestAnimFrame = (function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function( callback ){ window.setTimeout(callback, 1000 / 60); }; })(); Erik Moller, de Opera browser, desarrolló el siguiente algoritmo a modo de PolyFill: (function() { var lastTime = 0; var vendors = ['webkit', 'moz']; for(var x = 0; x El modo de uso es el siguiente: window.requestAnimationFrame( function( /* tipo tiempo */ dado_tiempo ){ // dado_tiempo ~= +new Date // the unix time }); Fuente: Paul Irish