This file contains 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(){ | |
alert(1); | |
}); |
This file contains 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 ready_keyBind(){ | |
$(function(){ | |
var schema = [ | |
{key:'s', fn: d_save, args: []} | |
]; | |
for(var k of schema) | |
$.ctrl(k.key,k.fn,k.args); | |
}) |
This file contains 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
/* | |
Return statistic from all tables in current DataBase | |
+------------------+----------+-------+--------------+ | |
| tableName | rowCount | size | externalSize | | |
+------------------+----------+-------+--------------+ | |
| mails | 101 | 64kb | 48kb | | |
+------------------+----------+-------+--------------+ | |
| "logs" | 25 | 104kb | 56kb | | |
+------------------+----------+-------+--------------+ |
This file contains 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
[ | |
{ | |
"id": "179c3813.5b8248", | |
"type": "function", | |
"z": "f2af3e46.9dad5", | |
"name": "random url", | |
"func": "var ran = Math.random()*1000 | 0;\n// msg.url = 'https://www.google.ru/search?q='+ran+'&sourceid=chrome&ie=UTF-8';\n// msg.url = 'https://www.bing.com/search?q='+ran+'&sourceid=chrome&ie=UTF-8';\nmsg.url = 'http://randomtextgenerator.com/';\n\nmsg.payload = {\n text_mode: 'plain',\n language:'en',\n Go:'Go'\n}\nmsg.headers = {'Accept-Language':'en'};\n\nreturn msg;", | |
"outputs": 1, | |
"noerr": 0, | |
"x": 334, |
This file contains 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
[ | |
{ | |
"id": "18c14b4b.131de5", | |
"type": "function", | |
"z": "4e51036c.b5a04c", | |
"name": "gen Query", | |
"func": "var jj = global.get('jj'); //JSON safe stringify\n\ntry {\n var sql = \"INSERT INTO logs (code,source,title,body,json,screenshot,uid)\";\n sql += \" VALUES \";\n var v = msg.payload;\n \n if(typeof msg === 'string') return;\n \n var a = [v.code,\n escapeQuote(escapeObj(v.source)||'node-red').slice(0,100),\n escapeQuote(v.title).slice(0,200),\n escapeQuote(escapeObj(v.body||'node body')),\n escapeQuote(jj(v.json)),\n '',v.uid];\n \n // node.warn(a);\n a = a.map(s=>`'${s}'`).join(',');\n sql += `(${a})`;\n msg.topic = sql;\n msg.payload = '';\n return msg;\n} catch (err){\n node.error(err);\n}\n\n\nfunction escapeObj(va){\n if(typeof va === 'string')\n return va;\n else return jj(va)\n}\n\nfunction escapeSP(v) {\n // return v\n // .repla |
This file contains 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
[ | |
{ | |
"id": "6ca1909c.71f58", | |
"type": "inject", | |
"z": "f2af3e46.9dad5", | |
"name": "", | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"repeat": "", |
This file contains 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
[ | |
{ | |
"id": "82919dfb.c477c", | |
"type": "inject", | |
"z": "826a56c3.fa3198", | |
"name": "", | |
"topic": "", | |
"payload": "ARR", | |
"payloadType": "global", | |
"repeat": "", |
This file contains 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
[ | |
{ | |
"id": "a943ef88.f0d67", | |
"type": "function", | |
"z": "3f9b5a25.189626", | |
"name": "loop", | |
"func": "if(msg.loop_array.length<1)\n return [null,msg];\n \nmsg.loop_current = msg.loop_array.shift();\nmsg.payload = msg.loop_current;\n\nreturn [msg]", | |
"outputs": 2, | |
"noerr": 0, | |
"x": 401, |
This file contains 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 array_move(arr, old_index, new_index) { | |
if (new_index >= arr.length) { | |
var k = new_index - arr.length + 1; | |
while (k--) { | |
arr.push(undefined); | |
} | |
} | |
arr.splice(new_index, 0, arr.splice(old_index, 1)[0]); | |
return arr; // for testing | |
}; |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css", rel="stylesheet", integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u", crossorigin="anonymous"> |
OlderNewer