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
| <?php | |
| class RelojEntry { | |
| protected $numReloj; | |
| protected $userId; | |
| protected $date; | |
| public function __set($name, $value) { | |
| $this->$name = $value; | |
| } | |
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
| <?php | |
| /** | |
| * $Id$ | |
| * @license | |
| * | |
| * @package usuarios | |
| * @subpackage components | |
| * @author Danilo Domínguez P. | |
| * @copyright UTP | |
| */ |
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
| /* | |
| * Luhn algorithm number checker - | |
| * (c) 2005-2008 shaman - www.planzero.org * This code has been released | |
| * into the public domain, however please * give credit to the original author | |
| * where possible. | |
| */ | |
| function _luhn_check($number) { | |
| // Strip any non-digits (useful for credit card numbers with spaces | |
| // and hyphens) |
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
| ini_set('display_errors',1); | |
| ini_set('display_startup_errors',1); | |
| error_reporting(-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
| SELECT CONCAT("ALTER DEFINER=`youruser`@`host` VIEW ", | |
| table_name," AS ", view_definition,";") FROM | |
| information_schema.views WHERE table_schema='databasename' | |
| Mix this with the mysql command line (assuming *nix, not familiar with windows): | |
| > echo above_query | mysql -uuser -p > alterView.sql | |
| > mysql -uuser -ppass databasename < alterView.sql |
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
| // this is the id of the submit button | |
| $("#submitButtonId").click(function() { | |
| var url = "path/to/your/script.php"; // the script where you handle the form input. | |
| $.ajax({ | |
| type: "POST", | |
| url: url, | |
| data: $("#idForm").serialize(), // serializes the form's elements. | |
| success: function(data) |
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
| <?php | |
| $pageIndexToSection = array( | |
| 0 => 'inicio', | |
| 1 => 'registro', | |
| 2 => 'busqueda', | |
| 3 => 'perfil', | |
| 4 => 'perfil_publico', | |
| 5 => 'agregar_evento', | |
| 6 => 'agregar_empresa', | |
| 7 => 'buscar_certificado', |
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
| Referencias | |
| 1. https://en.wikipedia.org/wiki/Programming_paradigm | |
| 2. http://www.slideshare.net/Coverity/the-psychology-of-c-analysis-24025354 | |
| 3. http://sealedabstract.com/rants/why-mobile-web-apps-are-slow/ | |
| 4. http://www.youtube.com/view_play_list?p=9D558D49CA734A02 | |
| 5. https://en.wikipedia.org/wiki/Type_inference | |
| 6. http://www.infoq.com/presentations/ruby-invitation | |
| 7. http://www.infoq.com/presentations/java-g1 | |
| 8. https://developers.google.com/events/io/sessions/324431687 |
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
| class TestActivity extends Activity { | |
| private mFilename; | |
| public void onCreate(Bundle paramBundle) { | |
| Intent localIntent = getIntent(); | |
| this.mFilename = localIntent.getData().toString(); | |
| } | |
| protected void onDestroy() { | |
| StringBuilder localStringBuilder; |
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
| ; restart before running this | |
| dpkg --get-selections | \ | |
| grep 'linux-image*' | \ | |
| awk '{print $1}' | \ | |
| egrep -v "linux-image-$(uname -r)|linux-image-generic" | \ | |
| while read n | |
| do | |
| sudo apt-get -y remove $n | |
| done |
OlderNewer