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 myAry = [1, 2, 3]; | |
| $.cookie('name', JSON.stringify(myAry)); | |
| var storedAry = JSON.parse($.cookie('name')); | |
| //storedAry -> [1, 2, 3] |
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
| function getCookie(w){ | |
| cName = ""; | |
| pCOOKIES = new Array(); | |
| pCOOKIES = document.cookie.split('; '); | |
| for(bb = 0; bb < pCOOKIES.length; bb++){ | |
| NmeVal = new Array(); | |
| NmeVal = pCOOKIES[bb].split('='); | |
| if(NmeVal[0] == w){ | |
| cName = unescape(NmeVal[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
| var n = noty({ | |
| layout: 'center', | |
| type: 'alert', | |
| modal: false, | |
| closeWith: ['click'], | |
| text: 'Do you really want to log out?', | |
| buttons: [ | |
| {addClass: 'btn btn-primary', text: 'Ok', onClick: function($noty) { | |
| location.href='/logout' | |
| } |
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
| Step( | |
| function A() { | |
| //Code here | |
| }, | |
| function B(e, r) { | |
| //Code here | |
| } | |
| ); | |
| Step( |
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
| DELIMITER $$ | |
| CREATE PROCEDURE spCMyTopDel( | |
| IN TID INT(11) | |
| ) | |
| BEGIN | |
| DELETE FROM `gluer_topic` WHERE TID = TID; | |
| END; | |
| DELIMITER ; | |
| CALL spCMyTopDel(123); |
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
| conn.beginTransaction(function(err) { | |
| if (err) { | |
| throw err; | |
| } | |
| conn.query('INSERT INTO gluer_topic SET ?', data, function(err, result) { | |
| if (err) { | |
| console.error(err); | |
| conn.rollback(function() { | |
| throw err; | |
| }); |
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
| async.eachSeries = function (arr, iterator, callback) { | |
| callback = callback || function () {}; | |
| if (!arr.length) { | |
| return callback(); | |
| } | |
| var completed = 0; | |
| var iterate = function () { | |
| iterator(arr[completed], function (err) { | |
| if (err) { | |
| callback(err); |
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
| async.eachSeries(list, function(item, cb2){ | |
| //Code here | |
| },cb);//async.eachSeries |
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
| typeof(row) != 'undefined' && row.length > 0 |
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 */ | |
| $tsql = "SELECT * FROM ACT_Currency_Exch_Rate_Tbl | |
| WHERE Currency_Code = ? | |
| AND Effective_Date_Time <= ? | |
| AND Expiry_Date_Time IS NULL"; | |
| $data = array(&$param['CURR_CODE'],date("m/d/Y")); | |
| $stmt = sqlsrv_prepare($conn, $tsql, $data); | |
| if(sqlsrv_execute($stmt) === false) die('ACT_Currency_Exch_Rate_Tbl_sel '.print_r(sqlsrv_errors(),true)); | |
| while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) { | |
| $arIn['CURR_RATE'] = $row['Exchange_Rate']; |