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
#ivancp custom scripts | |
export MYSQLSH_PROMPT_THEME=/usr/share/mysqlsh/prompt/prompt_256pl+aw.json |
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
/* https://twitter.com/js_tut/status/1262754711502942213 */ | |
String.prototype.rotate = function(shiftVal){ | |
var str = this.toLowerCase(); | |
var newPos = shiftVal > 0 ? (str.length - (shiftVal % str.length)):(Math.abs(shiftVal) % str.length); | |
if(newPos == str.length) | |
return str.charAt(0).toUpperCase() + (str.length > 1 ? str.substring(1,str.length):''); | |
return str.charAt(newPos).toUpperCase() + str.substring(newPos+1,str.length) + str.substring(0,newPos); | |
} |
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
-- http://bugs.mysql.com/bug.php?id=72838 | |
use test; | |
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS sp_test$$ | |
CREATE PROCEDURE `sp_test`(p_query varchar(250)) | |
BEGIN |
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
'Put this function in new/existing MS-Access module. | |
' | |
' Version History: | |
' 2012-03-16 - First version http://en.latindevelopers.com/ivancp/2012/ms-access-to-mysql-with-relationships/ | |
' | |
' 2014-02-09 - Seamus Casey | |
' a modification to Ivan's handy Access to MySQL relationship/constraint generator | |
' | |
' changes include: | |
' 1) skip Access system tables (TableDefAttributeEnum.dbSystemObjec) |
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
"Habilitar el resaltado de la sintaxis | |
syntax enable | |
"Para que los tabs no ocupen mucho espacio | |
set shiftwidth=4 | |
set tabstop=4 | |
"Si estamos usando gVIM entonces cambiamos el | |
"esquema de colores (no me agrada el fondo blanco) | |
if has("gui_running") |
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
mysql> repair table dbdemo.table; | |
+---------------+--------+----------+-------------------------------------------------------------------+ | |
| Table | Op | Msg_type | Msg_text | | |
+---------------+--------+----------+-------------------------------------------------------------------+ | |
| dbdemo.table | repair | info | Key 1 - Found wrong stored record at 381432048 | | |
| dbdemo.table | repair | info | Key 1 - Found wrong stored record at 390303976 | | |
| dbdemo.table | repair | info | Wrong aligned block at 391242113 | | |
| dbdemo.table | repair | info | Delete link points outside datafile at 391242113 | | |
| dbdemo.table | repair | info | Key 1 - Found wrong stored record at 393273584 | | |
| dbdemo.table | repair | info | Key 1 - Found wrong stored record at 396046628 | |
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
#include <iostream> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <map> | |
using namespace std; | |
int main(int argc, char** argv) | |
{ | |
char* line = new char[501]; |