Monday, July 20, 2015

jQuery datepicker() Uncaught TypeError: undefined is not a function


Can anyone please help me I am struggling with this problem for the past few day. Actually I included all the necessary plugins' but still the
$('#datepicker').datepicker() function is not defined ERROR.
I included the same plugins' in the other jsp of my projects there the datepicker works perfectly.
This is what I tried.
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">

$( '#datepicker' ).datepicker();
solved :
Please double check the js files you include if you include the same js file twice are different version of same file twice, It will conflict. Have patient to go through to entire jsp or html file to check the js files.
also do this :
jQuery(document).ready(function(){
    $('#Yourdatepicker').datepicker();

});

Monday, April 6, 2015

Creating MySQL UDFs

HOW TO RUN BINARIES AND USE REGULAR EXPRESSION IN MySQL 



I've googled how tu run binaries files from mysql, finally i release this post.

MySql UDF Project is:

http://www.mysqludf.org/lib_mysqludf_preg/index.php


1. Download these files. ( Ypu can compilate this file, however is not practical, therefore i published its win-binaries ).
 or 


And binaries for regular expressions 


2. You have to copy thes files into path:
C:\Program Files\MySQL\MySQL Server 5.1\lib\plugin

3. Run this script.

http://rpbouman.blogspot.com/2007/09/creating-mysql-udfs-with-microsoft.html
DROP FUNCTION IF EXISTS sys_eval;
DROP FUNCTION IF EXISTS sys_exec;
DROP FUNCTION IF EXISTS sys_get;
DROP FUNCTION IF EXISTS sys_set;
 
CREATE FUNCTION sys_eval RETURNS STRING SONAME 'lib_mysqludf_sys.dll';
CREATE FUNCTION sys_exec RETURNS STRING SONAME 'lib_mysqludf_sys.dll';
CREATE FUNCTION sys_get  RETURNS STRING SONAME 'lib_mysqludf_sys.dll';
CREATE FUNCTION sys_set  RETURNS STRING SONAME 'lib_mysqludf_sys.dll';
 
DROP FUNCTION IF EXISTS preg_capture;
DROP FUNCTION IF EXISTS preg_check;
DROP FUNCTION IF EXISTS preg_position;
DROP FUNCTION IF EXISTS preg_replace;
DROP FUNCTION IF EXISTS preg_rlike;
DROP FUNCTION IF EXISTS lib_mysqludf_preg_info;
 
CREATE FUNCTION preg_capture            RETURNS STRING SONAME 'lib_mysqludf_preg.dll';
CREATE FUNCTION preg_check              RETURNS STRING SONAME 'lib_mysqludf_preg.dll';
CREATE FUNCTION preg_position           RETURNS STRING SONAME 'lib_mysqludf_preg.dll';
CREATE FUNCTION preg_replace            RETURNS STRING SONAME 'lib_mysqludf_preg.dll';
CREATE FUNCTION preg_rlike              RETURNS STRING SONAME 'lib_mysqludf_preg.dll';
CREATE FUNCTION lib_mysqludf_preg_info  RETURNS STRING SONAME 'lib_mysqludf_preg.dll';
 

4. Example, run this sentence.
SELECT sys_exec('dir > c:\\out.txt') FROM dual

5. Troubleshotting.
In C:\Program Files\MySQL\MySQL Server 5.1 you can see my.ini

You have to configure the plugin_dir
**plugin_dir="C:\\Program Files\\MySQL\\MySQL Server 5.1\\lib\\plugin"**
basedir="C:/Program Files/MySQL/MySQL Server 5.1"
datadir="C:/ProgramData/MySQL/MySQL Server 5.1/Data"
Restart MySql Services
net stop mysql
net start mysql
Finally, you must execute 
Show Variables

ref :http://talf.wikispaces.com/20101120-Mysql-How+execute+binaries+files+from+mysql

MS in Computer Science with paid training in USA company