text:
/*!
    * assets-reload v1.3.0
    * (c) 2019 wilsonliuxyz@gmail.com
    * @description switch all assets cdn name (script,link,background-image,img). when you open one website in a test domain you can switch cdn name to location.hostname
    * @license MIT
    */
(function (global, factory) {
	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
	typeof define === 'function' && define.amd ? define(factory) :
	(global.assetsReload = factory());
}(this, (function () { 'use strict';

var AssetsReload = function AssetsReload(replaceFunc, beforeInsertHook) {
  this.replaceFunc = replaceFunc;
  this.beforeInsertHook = beforeInsertHook || (function () {});
  this.reloadCache = {
    SCRIPT: [],
    IMG: [],
    LINK: [],
    BACKGROUNDIMAGE: []
  };

  this.mapConf = {
    SCRIPT: {
      linkKey: 'src',
    },
    IMG: {
      linkKey: 'src',
    },
    LINK: {
      linkKey: 'href',
    }
  };
};
// reload all of one type assets enum: SCRIPT IMG LINK
AssetsReload.prototype.reloadAll = function reloadAll (nodeName) {
  var domNodeList = document.getElementsByTagName(nodeName);
  var len = domNodeList.length;
  if (len === 0) {
    return false
  }
  for (var i = 0; i < len; i++) {
    this.reload(domNodeList[i]);
  }
};
/**
 *
 **/
AssetsReload.prototype.reload = function reload (domElement) {
  var nodeName = domElement.nodeName;
  var ref = this.mapConf[nodeName];
    var linkKey = ref.linkKey;
  var link = domElement[linkKey];

  var newUrl = this.replaceFunc(link, domElement);
  if (!newUrl) {
    return false
  }

  var newNode = document.createElement(nodeName);
  this.extendAttr(domElement, newNode);

  newNode[linkKey] = newUrl;
  this.beforeInsertHook(nodeName, domElement, newNode);
  this.reloadCache[nodeName].push(link);
  domElement.parentNode.insertBefore(newNode, domElement);
  domElement.parentNode.removeChild(domElement);
};
/**
 * @desc replace backgroundImage
 **/
AssetsReload.prototype.reloadBackgroundImage = function reloadBackgroundImage () {
  // detect is support styleSheets
  var isSupportStyleSheets = document.styleSheets && document.styleSheets[0];
  if (!isSupportStyleSheets) { return false }

  var styleSheetsLength = document.styleSheets.length;
  for (var i = 0; i < styleSheetsLength; i++) {
    var styleSheets = document.styleSheets[i];
    try {
      if (!(styleSheets.rules && styleSheets.rules.length > 0)) {
        continue
      }
      for (var j = 0; j < styleSheets.rules.length; j++) {
        var item = styleSheets.rules[j];
        // is back null
        var backStr = item.selectorText && item.style && item.style.backgroundImage;
        if (!backStr) {
          continue
        }
        // is has real url
        var matchRes = backStr.match(/url\(["|'](.*)["|']\)/);
        var backgroundImage = matchRes && matchRes[1];
        if (!backgroundImage) {
          continue
        }
        // base64 not replace
        if (backgroundImage.indexOf('data:image/') !== -1) {
          continue;
        }
        var nodeName = "BACKGROUNDIMAGE";
        var newUrl = this.replaceFunc(backgroundImage, item);

        if (!newUrl) {
          continue
        }
        var cssText = item.selectorText + "{ background-image: url(" + newUrl + ")}";
        var cssTextKey = i + cssText;
        if (this.reloadCache[nodeName].indexOf(cssTextKey) === -1) {
          this.beforeInsertHook(nodeName, backgroundImage, newUrl);
          this.reloadCache[nodeName].push(cssTextKey);
          // insertRule tail styleSheets

          styleSheets.insertRule(cssText, styleSheets.rules.length);
        }
      }
    } catch (err) {
      console.log("CdnAssetsSwitch replaceBackGroundImage", err);
    }
  }
};
/**
 * @desc entend origin node attributes
 **/
AssetsReload.prototype.extendAttr = function extendAttr (oldNode, newNode) {
  var attrMap = {
    'crossorigin': 'crossOrigin'
  };
  if (!(oldNode && oldNode.attributes)) {
    return
  }
  for (var key in oldNode.attributes) {
    if (oldNode.attributes.hasOwnProperty(key)) {
      var nodeAttr = oldNode.attributes[key];
      var name = attrMap[nodeAttr.name] || nodeAttr.name;
      // extend function
      if (['onerror', 'onload', 'onabort'].indexOf(name) !== -1) {
        newNode[name] = oldNode[name];
      } else {
        newNode[nodeAttr.name] = nodeAttr.value;
      }
    }
  }
};

return AssetsReload;

})));


text:
// Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
/* eslint-disable */

frappe.query_reports["Inactive Sales Items"] = {
	"filters": [
		{
			fieldname: "territory",
			label: __("Territory"),
			fieldtype: "Link",
			options: "Territory",
			reqd: 1,
		},
		{
			fieldname: "item",
			label: __("Item"),
			fieldtype: "Link",
			options: "Item"
		},
		{
			fieldname: "item_group",
			label: __("Item Group"),
			fieldtype: "Link",
			options: "Item Group"
		},
		{
			fieldname: "based_on",
			label: __("Based On"),
			fieldtype: "Select",
			options: "Sales Order\nSales Invoice",
			default: "Sales Order"
		},
		{
			fieldname: "days",
			label: __("Days Since Last order"),
			fieldtype: "Select",
			options: [30, 60, 90],
			default: 30
		},
	]
};

domain: javascript


text:
import React from 'react';

export default function WindSun(props) {
  return (
    <svg xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 24 24" width={24} height={24} {...props}>
      <path d="M11,4.5a.99943.99943,0,0,0,1-1v-1a1,1,0,0,0-2,0v1A.99943.99943,0,0,0,11,4.5Zm-7,7a.99943.99943,0,0,0-1-1H2a1,1,0,0,0,0,2H3A.99943.99943,0,0,0,4,11.5Zm.63574,4.9502-.707.707a.99989.99989,0,1,0,1.41406,1.41406l.707-.707A.99989.99989,0,1,0,4.63574,16.4502Zm0-9.9004A.99989.99989,0,0,0,6.0498,5.13574l-.707-.707A.99989.99989,0,0,0,3.92871,5.84277Zm12.02149.293a.99672.99672,0,0,0,.707-.293l.707-.707a.99989.99989,0,1,0-1.41406-1.41406l-.707.707a1,1,0,0,0,.707,1.707ZM13,12a.99943.99943,0,0,0,1,1h5a3.00328,3.00328,0,0,0,3-3,1,1,0,0,0-2,0,1.01348,1.01348,0,0,1-1,1H14A.99943.99943,0,0,0,13,12Zm7,3H15a1,1,0,0,0,0,2h5a1,1,0,0,1,0,2,1,1,0,0,0,0,2,3,3,0,0,0,0-6ZM9,19a1,1,0,1,0,1,1A1,1,0,0,0,9,19Zm6,0H13a1,1,0,0,0,0,2h2a1.01348,1.01348,0,0,1,1,1,1,1,0,0,0,2,0A3.00328,3.00328,0,0,0,15,19Zm-4-4a3.5,3.5,0,0,1,0-7,3.41539,3.41539,0,0,1,2.1875.77441,1.00008,1.00008,0,1,0,1.26562-1.54882A5.39339,5.39339,0,0,0,11,6a5.5,5.5,0,0,0,0,11,1,1,0,0,0,0-2Z" />
    </svg>
  );
}


text:
(function($) {
    "use strict"; // Start of use strict

    $(window).on('load', function() {
        var $allSlides, $flexslider;
        if (jQuery().flexslider) {
            $flexslider = $('.flexslider');
            $allSlides = $flexslider.find('.item');
            $flexslider.addClass("fade-loading");
            return $('.flexslider').flexslider({
                animation: 'fade',
                pauseOnHover: true,
                slideshowSpeed: 5000,
                animationSpeed: 400,
                prevText: '',
                nextText: '',
                before: function(slider) {
                    var $activeSlide;
                    $activeSlide = $flexslider.find('.flex-active-slide');
                    if ($activeSlide.index() === $allSlides.length - 1) {
                        $allSlides.eq(0).find('.animate').children().addClass("animate").removeClass("animated");
                        $allSlides.not('.flex-active-slide').find('.animate').children().addClass("animate").removeClass("animated");
                    } else {
                        $allSlides.not('.flex-active-slide').find('.animate').children().addClass("animate").removeClass("animated");
                    }
                    return setTimeout((function() {
                        return $allSlides.eq(slider.animatingTo).find('.animate').children().addClass("animated").removeClass("animate");
                    }), 50);
                }
            });
        }
    });

})(jQuery);


text:
/*!
 * VisualEditor IME test for Internet Explorer on Windows in Korean.
 *
 * @copyright 2011-2015 VisualEditor Team and others; see http://ve.mit-license.org
 */

ve.ce.imetests.push( [ 'input-ie-win-korean', [
	/*jshint quotmark:double */
	{"imeIdentifier":"Korean","userAgent":"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET4.0C)","startDom":"x"},
	{"seq":0,"time":3611.081,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":1,"time":3611.082,"action":"sendEvent","args":["compositionstart",{}]},
	{"seq":2,"time":3611.112,"action":"changeText","args":["ㅎ"]},
	{"seq":3,"time":3611.112,"action":"changeSel","args":[1,1]},
	{"seq":4,"time":3611.112,"action":"endLoop","args":[]},
	{"seq":5,"time":3611.162,"action":"sendEvent","args":["keyup",{"keyCode":71}]},
	{"seq":6,"time":3611.195,"action":"endLoop","args":[]},
	{"seq":7,"time":3611.352,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":8,"time":3611.379,"action":"changeText","args":["하"]},
	{"seq":9,"time":3611.379,"action":"endLoop","args":[]},
	{"seq":10,"time":3611.493,"action":"sendEvent","args":["keyup",{"keyCode":75}]},
	{"seq":11,"time":3611.513,"action":"endLoop","args":[]},
	{"seq":12,"time":3611.618,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":13,"time":3611.647,"action":"changeText","args":["한"]},
	{"seq":14,"time":3611.647,"action":"endLoop","args":[]},
	{"seq":15,"time":3611.734,"action":"sendEvent","args":["keyup",{"keyCode":83}]},
	{"seq":16,"time":3611.765,"action":"endLoop","args":[]},
	{"seq":17,"time":3611.919,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":18,"time":3611.949,"action":"changeText","args":["한ㄱ"]},
	{"seq":19,"time":3611.949,"action":"changeSel","args":[2,2]},
	{"seq":20,"time":3611.949,"action":"endLoop","args":[]},
	{"seq":21,"time":3612.045,"action":"sendEvent","args":["keyup",{"keyCode":82}]},
	{"seq":22,"time":3612.083,"action":"endLoop","args":[]},
	{"seq":23,"time":3612.386,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":24,"time":3612.418,"action":"changeText","args":["한그"]},
	{"seq":25,"time":3612.418,"action":"endLoop","args":[]},
	{"seq":26,"time":3612.536,"action":"sendEvent","args":["keyup",{"keyCode":77}]},
	{"seq":27,"time":3612.569,"action":"endLoop","args":[]},
	{"seq":28,"time":3612.767,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":29,"time":3612.803,"action":"changeText","args":["한글"]},
	{"seq":30,"time":3612.803,"action":"endLoop","args":[]},
	{"seq":31,"time":3612.938,"action":"sendEvent","args":["keyup",{"keyCode":70}]},
	{"seq":32,"time":3612.971,"action":"endLoop","args":[]},
	{"seq":33,"time":3613.169,"action":"sendEvent","args":["compositionend",{}]},
	{"seq":34,"time":3613.178,"action":"sendEvent","args":["keydown",{"keyCode":32}]},
	{"seq":35,"time":3613.186,"action":"sendEvent","args":["keypress",{"keyCode":32}]},
	{"seq":36,"time":3613.205,"action":"changeText","args":["한글 "]},
	{"seq":37,"time":3613.205,"action":"changeSel","args":[3,3]},
	{"seq":38,"time":3613.205,"action":"endLoop","args":[]},
	{"seq":39,"time":3613.309,"action":"sendEvent","args":["keyup",{"keyCode":32}]},
	{"seq":40,"time":3613.339,"action":"endLoop","args":[]},
	{"seq":41,"time":3613.54,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":42,"time":3613.547,"action":"sendEvent","args":["compositionstart",{}]},
	{"seq":43,"time":3613.574,"action":"changeText","args":["한글 ㅅ"]},
	{"seq":44,"time":3613.574,"action":"changeSel","args":[4,4]},
	{"seq":45,"time":3613.574,"action":"endLoop","args":[]},
	{"seq":46,"time":3613.69,"action":"sendEvent","args":["keyup",{"keyCode":84}]},
	{"seq":47,"time":3613.725,"action":"endLoop","args":[]},
	{"seq":48,"time":3613.801,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":49,"time":3613.825,"action":"changeText","args":["한글 시"]},
	{"seq":50,"time":3613.825,"action":"endLoop","args":[]},
	{"seq":51,"time":3613.941,"action":"sendEvent","args":["keyup",{"keyCode":76}]},
	{"seq":52,"time":3613.977,"action":"endLoop","args":[]},
	{"seq":53,"time":3614.047,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":54,"time":3614.077,"action":"changeText","args":["한글 싷"]},
	{"seq":55,"time":3614.077,"action":"endLoop","args":[]},
	{"seq":56,"time":3614.192,"action":"sendEvent","args":["keyup",{"keyCode":71}]},
	{"seq":57,"time":3614.228,"action":"endLoop","args":[]},
	{"seq":58,"time":3614.363,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":59,"time":3614.395,"action":"changeText","args":["한글 시허"]},
	{"seq":60,"time":3614.395,"action":"changeSel","args":[5,5]},
	{"seq":61,"time":3614.395,"action":"endLoop","args":[]},
	{"seq":62,"time":3614.468,"action":"sendEvent","args":["keyup",{"keyCode":74}]},
	{"seq":63,"time":3614.512,"action":"endLoop","args":[]},
	{"seq":64,"time":3614.591,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":65,"time":3614.63,"action":"changeText","args":["한글 시험"]},
	{"seq":66,"time":3614.63,"action":"endLoop","args":[]},
	{"seq":67,"time":3614.764,"action":"sendEvent","args":["keyup",{"keyCode":65}]},
	{"seq":68,"time":3614.814,"action":"endLoop","args":[]},
	{"seq":69,"time":3614.895,"action":"sendEvent","args":["compositionend",{}]},
	{"seq":70,"time":3614.904,"action":"sendEvent","args":["keydown",{"keyCode":32}]},
	{"seq":71,"time":3614.912,"action":"sendEvent","args":["keypress",{"keyCode":32}]},
	{"seq":72,"time":3614.931,"action":"changeText","args":["한글 시험 "]},
	{"seq":73,"time":3614.931,"action":"changeSel","args":[6,6]},
	{"seq":74,"time":3614.931,"action":"endLoop","args":[]},
	{"seq":75,"time":3615.048,"action":"sendEvent","args":["keyup",{"keyCode":32}]},
	{"seq":76,"time":3615.082,"action":"endLoop","args":[]},
	{"seq":77,"time":3615.381,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":78,"time":3615.39,"action":"sendEvent","args":["compositionstart",{}]},
	{"seq":79,"time":3615.417,"action":"changeText","args":["한글 시험 ㅎ"]},
	{"seq":80,"time":3615.417,"action":"changeSel","args":[7,7]},
	{"seq":81,"time":3615.417,"action":"endLoop","args":[]},
	{"seq":82,"time":3615.486,"action":"sendEvent","args":["keyup",{"keyCode":71}]},
	{"seq":83,"time":3615.535,"action":"endLoop","args":[]},
	{"seq":84,"time":3615.64,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":85,"time":3615.669,"action":"changeText","args":["한글 시험 하"]},
	{"seq":86,"time":3615.669,"action":"endLoop","args":[]},
	{"seq":87,"time":3615.762,"action":"sendEvent","args":["keyup",{"keyCode":75}]},
	{"seq":88,"time":3615.803,"action":"endLoop","args":[]},
	{"seq":89,"time":3615.913,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":90,"time":3615.937,"action":"changeText","args":["한글 시험 합"]},
	{"seq":91,"time":3615.937,"action":"endLoop","args":[]},
	{"seq":92,"time":3616.066,"action":"sendEvent","args":["keyup",{"keyCode":81}]},
	{"seq":93,"time":3616.104,"action":"endLoop","args":[]},
	{"seq":94,"time":3616.339,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":95,"time":3616.372,"action":"changeText","args":["한글 시험 합ㄴ"]},
	{"seq":96,"time":3616.372,"action":"changeSel","args":[8,8]},
	{"seq":97,"time":3616.372,"action":"endLoop","args":[]},
	{"seq":98,"time":3616.485,"action":"sendEvent","args":["keyup",{"keyCode":83}]},
	{"seq":99,"time":3616.523,"action":"endLoop","args":[]},
	{"seq":100,"time":3616.613,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":101,"time":3616.641,"action":"changeText","args":["한글 시험 합니"]},
	{"seq":102,"time":3616.641,"action":"endLoop","args":[]},
	{"seq":103,"time":3616.726,"action":"sendEvent","args":["keyup",{"keyCode":76}]},
	{"seq":104,"time":3616.775,"action":"endLoop","args":[]},
	{"seq":105,"time":3616.927,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":106,"time":3616.959,"action":"changeText","args":["한글 시험 합닏"]},
	{"seq":107,"time":3616.959,"action":"endLoop","args":[]},
	{"seq":108,"time":3617.08,"action":"sendEvent","args":["keyup",{"keyCode":69}]},
	{"seq":109,"time":3617.126,"action":"endLoop","args":[]},
	{"seq":110,"time":3617.313,"action":"sendEvent","args":["keydown",{"keyCode":229}]},
	{"seq":111,"time":3617.344,"action":"changeText","args":["한글 시험 합니다"]},
	{"seq":112,"time":3617.344,"action":"changeSel","args":[9,9]},
	{"seq":113,"time":3617.344,"action":"endLoop","args":[]},
	{"seq":114,"time":3617.388,"action":"sendEvent","args":["keyup",{"keyCode":75}]},
	{"seq":115,"time":3617.429,"action":"endLoop","args":[]}
] ] );


text:
import React from "react";

class Logo extends React.Component {

    constructor(props) {
        super(props);
    }

    render() {

        const gameLogoStyle = {
            fontSize: `${this.props.baseHeight}px`,
        };

        return (

Reactive

Floating

Point

        );
    }

}

export default Logo;


text:
var stompClient = null;
var connected = false;
var connectDelayTime = 2000;
var refreshJobSnapshotDelayTime =1000;
var job_state = "job_state_";
var job_start_time = "job_start_time_";
var job_end_time = "job_end_time_";
var job_queue_count = "job_queue_count_";
var job_total_process_count = "job_total_process_count_";
var job_total_result_count = "job_total_result_count_";
var job_exception_count = "job_total_process_count_";
var job_avg_process_time = "job_avg_process_time_";
var job_max_process_time = "job_max_process_time_";
var job_min_Process_time = "job_min_Process_time_";
var job_cronTrigger="job_cronTrigger_";
var job_queue_operation="job_queue_operation_";
var job_operation="job_operation_";
var job_scheduled="job_scheduledTd_";

$(function() {
	$("#search_job_bt").click(function(){
		$('#job_search').find('#pageIndex').val(0);
		searchJob();
	});
	$("#create_job_bt").click(function(){
		searchJob();
	});
	$("#upload_jobProfile").click(function() {
		uploadJobProfile();
	});
	$("#search_job_name").bind('keydown',function(event){
	  if(event.keyCode == "13"){
		  $('#job_search').find('#pageIndex').val(0);
		  searchJob();
	  }
	});
	connect();
	// 加载数据
	searchJob();
});

function showDiv(showDivID){
	var showDivs=$("div[class='showDiv']");
	for (var i = 0; i < showDivs.length; i++) {
		var showDiv=$(showDivs[i]);
		var display=showDiv.css("display");
		var lastShowDivId=showDiv.attr("id");
		if(showDivID!=lastShowDivId&&("inline"==display||"inline-block"==display||"block"==display)){
			showDiv.css("display","none");
			var showDivIdRecordInput=$("<input type='text' name='showDivIdRecordInput' value='"+lastShowDivId+"' style='display: none' />");
			showDivIdRecordInput.appendTo($("#showDivIdRecordDiv"));
		}else if(showDivID==showDiv.attr("id")){
			showDiv.css("display","block");
		}else{
			showDiv.css("display","none");
		}
	}
}

function returnLastShowDiv(){
	var showDivIdRecordInputs=$("#showDivIdRecordDiv").find("input[name='showDivIdRecordInput']");
	if(showDivIdRecordInputs.length>0){
		var lastShowDivInput=$(showDivIdRecordInputs[showDivIdRecordInputs.length-1]);
		var lastShowDivId=lastShowDivInput.val();
		var showDivs=$("div[class='showDiv']");
		for (var i = 0; i < showDivs.length; i++) {
			var showDiv=$(showDivs[i]);
			if(lastShowDivId==showDiv.attr("id")){
				showDiv.css("display","block");
			}else{
				showDiv.css("display","none");
			}
		}
		lastShowDivInput.remove();
	}
}
/**
 * 与后台建立websocket连接
 *
 * @returns
 */
function connect() {
	if(!connected){
		var socket = new SockJS('/crawler_websocket');
	    stompClient = Stomp.over(socket);
	    stompClient.connect({}, function (frame) {
	    	connected=true;
	        stompClient.subscribe('/topic/job/jobSnapshot', function (responseMsg) {
	        	var msg=JSON.parse(responseMsg.body);
	        	if (msg.isOk == 1) {
	        		refreshJobSnapshots(msg.data);
	    		}
	        });
	    });
	    window.setTimeout(connect, connectDelayTime);
	}else{
		window.setTimeout(requestRefreshJobSnapshot,refreshJobSnapshotDelayTime);
	}
}

/**
 * 请求刷新job运行快照
 *
 * @returns
 */
function requestRefreshJobSnapshot() {
	var jobTrs = $('#jobs').find("tr");
	var jobNames="";
	var workSpaceNames="";
	var requestMsg=new Object();
	for (var i = 0; i < jobTrs.length; i++) {
		var jobTr=$(jobTrs[i]);
		var jobSnapshot = new Object();
		jobNames+=jobTr.find("[name='name']").val()+",";
		workSpaceNames+=jobTr.find("[name='workSpaceName']").val()+",";
	}
	requestMsg.jobNames=jobNames;
	requestMsg.workSpaceNames=workSpaceNames;
    stompClient.send("/crawler/refreshJobSnapshot", {}, JSON.stringify(requestMsg));
    window.setTimeout(requestRefreshJobSnapshot,refreshJobSnapshotDelayTime);
}

/**
 * 动态显示job 运行信息
 *
 * @param jobSnapshots
 * @returns
 */
function refreshJobSnapshots(jobSnapshots) {
	if(null!=jobSnapshots){
		for (var i = 0; i < jobSnapshots.length; i++) {
			var jobSnapshot = jobSnapshots[i];
			var jobName = jobSnapshot.name;
			var jobTr=$("tr[name='"+jobName+"']");
			if(null!=jobTr&&undefined!=jobTr){
				var oldStatus=jobTr.find("[name='state']").text();
				var newStatus=getState(jobSnapshot.status);
				// 只有当状态发生改变时才更新一下内容
				if(oldStatus!=newStatus){
					var color=getStateColor(newStatus);
					if(jobSnapshot.status==3||jobSnapshot.status==4){
						newStatus=""+newStatus+"";
					}
					jobTr.find("[name='state']").css("color",color).html(newStatus);
					var startTime=jobSnapshot.startTime;
					var startTimeTd =jobTr.find("[name='startTime']");
					var oldStartTime=startTimeTd.html();
					if(""==oldStartTime&&startTime!=null&&startTime!="null"&&startTime!=""){
						startTime=startTime.substring(5,startTime.length);
						startTimeTd.html(startTime);
					}
					if(""!=oldStartTime&&(startTime==null||startTime=="null"||startTime=="")){
						startTimeTd.html("");
					}

					var opetationHtml=masterScheduled.getOperation(jobSnapshot.name,jobSnapshot.status);
					$("#" + job_operation + jobName).html(opetationHtml);
				}
				var workSpaceShowStr=getWorkSpaceHtml(jobSnapshot.workSpaceName,
						jobSnapshot.totalProcessCount,
						jobSnapshot.workSpaceDoingSize,
						jobSnapshot.workSpaceErrSize);
				$("#" + job_queue_count + jobName).html(workSpaceShowStr);
				var errCountHtml=getErrCountHtml(jobSnapshot.name,jobSnapshot.id,jobSnapshot.errCount);
				$("#" + job_exception_count + jobName).html(errCountHtml);
			}
		}
	}
}

function getErrCountHtml(jobName,jobSnapshotId,errCount){
	var errCountHtml;
	if(errCount>0){
		errCountHtml=""+errCount+"";
	}else{
		errCountHtml=errCount;
	}
	return errCountHtml;
}

function showErrMsg(jobName,jobSnapshotId){
	var workerErrMsgDiv=$("#job_worker_errMsg_div");
	var pageIndex=workerErrMsgDiv.find("input[id='pageIndex']").val();
	var url = "/crawler/job/jobSnapshot/queryErrMsg";
	$.post(url, {
		jobName:jobName,
		jobSnapshotId : jobSnapshotId,
		pageIndex : pageIndex
	}, function(responseMsg) {
		if (responseMsg.isOk == 1) {
			var data=responseMsg.data.list;
			var table = workerErrMsgDiv.find('table');
			workerErrMsgDiv.find('#jobName').val(jobName);
			workerErrMsgDiv.find('#jobSnapshotId').val(jobSnapshotId);
			var table=workerErrMsgDiv.find("table");
			table.find("tr[name='jobWorkerErrMsgDiv']").remove();
			if (null != data && data.length > 0) {
				workerErrMsgDiv.find("input[id='pageIndex']").val(pageIndex);
				for (var i = 0; i < data.length; i++) {
					var workerErrMsg = data[i];
					var tr = $("

");
					$(""+ workerErrMsg.workerName + "	").appendTo(tr);
					$(""+ workerErrMsg.startTime + "	").appendTo(tr);
					var divId="workerErrMsg_"+workerErrMsg.id;
					$(""+ workerErrMsg.type + "	").appendTo(tr);
					$("

"+ workerErrMsg.msg + "

").appendTo(tr);
					tr.appendTo(table);
				}
				pageInfo("#job_worker_errMsg_div",responseMsg,"lastSearchJobWorkerErrMsg","nextSearchWorkerErrMsg");
			}
			showDiv("job_worker_errMsg_div");
		}
	});
}

function showErrMsgDetail(divId){
	showLayer($("#"+divId));
}

function nextSearchWorkerErrMsg() {
	var workerErrMsgDiv=$('#job_worker_errMsg_div');
	var jobName=workerErrMsgDiv.find('#jobName').val();
	var jobSnapshotId=workerErrMsgDiv.find('#jobSnapshotId').val();
	var pageIndex=workerErrMsgDiv.find('#pageIndex').val();
	pageIndex=parseInt(pageIndex);
	pageIndex=pageIndex+1;
	workerErrMsgDiv.find('#pageIndex').val(pageIndex)
	showErrMsg(jobName,jobSnapshotId);
}

function lastSearchJobWorkerErrMsg() {
	var workerErrMsgDiv=$('#job_worker_errMsg_div');
	var jobName=workerErrMsgDiv.find('#jobName').val();
	var jobSnapshotId=workerErrMsgDiv.find('#jobSnapshotId').val();
	var pageIndex=workerErrMsgDiv.find('#pageIndex').val();
	pageIndex=parseInt(pageIndex);
	pageIndex=pageIndex-1;
	workerErrMsgDiv.find('#pageIndex').val(pageIndex)
	showErrMsg(jobName,jobSnapshotId);
}

function uploadJobProfile(url,file) {
	var url="/crawler/job/upload/profile";
	uploadFile(url,$("#jobProfile")[0].files[0]);
}

function searchJob() {
	var jobName = $('#search_job_name').val();
	var jobSearch=$('#job_search');
	var pageIndex=jobSearch.find('#pageIndex').val();
	var url="/crawler/job/query";
	$.post(url, {
		pageIndex:pageIndex,
		jobName : jobName
	}, function(responseMsg) {
		if (responseMsg.isOk == 1) {
			showJobTable(responseMsg);
		}
	});
}

function nextSearchJob() {
	var jobSearch=$('#job_search');
	var pageIndex=jobSearch.find('#pageIndex').val();
	pageIndex=parseInt(pageIndex);
	pageIndex=pageIndex+1;
	jobSearch.find('#pageIndex').val(pageIndex)
	searchJob();
}

function lastSearchJob() {
	var jobSearch=$('#job_search');
	var pageIndex=jobSearch.find('#pageIndex').val();
	pageIndex=parseInt(pageIndex);
	pageIndex=pageIndex-1;
	jobSearch.find('#pageIndex').val(pageIndex)
	searchJob();
}

function showJobTable(result) {
	var jobs=result.data.list;
	if(null!=jobs&&jobs.length>0){
		var jobDiv=$('#job_div');
		var table = jobDiv.find('table');
		table.find("tr[class=job]").remove();
		var job;
		for (var i = 0; i < jobs.length; i++) {
			job = jobs[i];
			var tr = $("

");
			$("<input name='version' style='display:none' type='text' value='"+job.version+"' />").appendTo(tr);
			$("<input name='name' style='display:none' type='text' value='"+job.name+"' />").appendTo(tr);
			$("<input name='level' style='display:none' type='text' value='"+job.level+"' />").appendTo(tr);
			$("<input name='workSpaceName' style='display:none' type='text' value='"+job.workSpaceName+"' />").appendTo(tr);
			$("<input name='workerClass' style='display:none' type='text' value='"+job.workerClass+"' />").appendTo(tr);
			$("<input name='designatedNodeName' style='display:none' type='text' value='"+job.designatedNodeName+"' />").appendTo(tr);
			$("<input name='needNodes' style='display:none' type='text' value='"+job.needNodes+"' />").appendTo(tr);
			$("<input name='isScheduled' style='display:none' type='text' value='"+job.isScheduled+"' />").appendTo(tr);
			$("<input name='describe' style='display:none' type='text' value='"+job.describe+"' />").appendTo(tr);
			$(""+job.name+"	").appendTo(tr);
			var cronTrigger=job.cronTrigger;
			var ctTd=$("</td");
			$("<input name='cronTrigger'  flag='"+job.name+"' style='display:none' type='text' value='"+cronTrigger+"' />").appendTo(ctTd);
			$("<input name='update_cronTrigger'  flag='"+job.name+"'  style='display:none' type='text' value='"+cronTrigger+"' />").appendTo(ctTd);
			if(cronTrigger==null||cronTrigger==""||cronTrigger=="null"){
				cronTrigger="#";
			}
			$(""+cronTrigger+"").appendTo(ctTd);
			ctTd.appendTo(tr);

			var scheduledTd = $("	");
			var scheduledOperation=getIsScheduledShowHtml(job.name,job.isScheduled);
			$(scheduledOperation).appendTo(scheduledTd);
			scheduledTd.appendTo(tr);

			var status=getState(job.status);
			var color=getStateColor(status);
			$(""+ status + "	").appendTo(tr);
			$("	").appendTo(tr);
			var queueHtml=getWorkSpaceHtml(job.queueName,0,0,0);
			$(""+queueHtml+"	").appendTo(tr);

			$("0	").appendTo(tr);

			var td = $("	");
			var html=masterScheduled.getOperation(job.name,job.state);
			$(html).appendTo(td);
			td.appendTo(tr);
			var otherTd = $("	");
			var otherOperation="记录 ";
			otherOperation += "配置 ";
			otherOperation += "抽取项 ";
			otherOperation += "下载";
			$(otherOperation).appendTo(otherTd);
			otherTd.appendTo(tr);
			tr.appendTo(table);
		}
		table.find("input[name='update_cronTrigger']").bind('keydown',function(event){
			  if(event.keyCode == "13"){
				  var jobName=$(this).attr("flag");
				  updateCronTrigger(jobName);
			  }
		});
		table.find("input[name='update_nextJobName']").bind('keydown',function(event){
			  if(event.keyCode == "13"){
				  var jobName=$(this).attr("flag");
				  updateNextJobName(jobName);
			  }
		});
		pageInfo("#job_div",result,"lastSearchJob","nextSearchJob");
	}
}

function pageInfo(showDivId,responseMsg,lastSearch,nextSearch){
	var pageIndex=responseMsg.data.pageIndex;
	var pageSize=responseMsg.data.pageSize;
	var totalPage=responseMsg.data.totalPage;
	var totalSize=responseMsg.data.totalSize;
	var showDivId=$(showDivId);
	showDivId.find('#pageIndex').val(pageIndex);
	showDivId.find('#totalPage').val(totalPage);
	showDivId.find('#totalSize').val(totalSize);
	var pageInfoHtml="
";
	pageInfoHtml+="总共"+totalSize+"条记录";
	pageInfoHtml+="每页"+pageSize+"条";
	pageInfoHtml+="总页数:"+totalPage+"";
	pageInfoHtml+="当前页:"+(parseInt(pageIndex)+1)+"";
	pageInfoHtml+="";
	if(totalPage>1){
		if(pageIndex>=totalPage-1){
			pageInfoHtml+="上一页";
		}else if(pageIndex==0){
			pageInfoHtml+="下一页";
		}else{
			pageInfoHtml+="下一页";
			pageInfoHtml+="上一页    ";
		}
	}
	pageInfoHtml+="
";
	var pageInfoDiv=showDivId.find('#pageInfo');
	pageInfoDiv.find("div").remove();
	$(pageInfoHtml).appendTo(pageInfoDiv);
}

/**
 * READY(1), WAITING_EXECUTED(2), EXECUTING(3), SUSPEND(4), STOP(5),
 * FINISHED(6);
 */
function getState(state) {
	var stateStr = "准备";
	if (0 == state) {
		stateStr = "准备";
	} else if (1 == state) {
		stateStr = "定时计划中";
	}  else if (2 == state) {
		stateStr = "等待被执行";
	} else if (3 == state) {
		stateStr = "初始化";
	} else if (4 == state) {
		stateStr = "运行";
	}else if (5 == state) {
		stateStr = "暂停";
	}else if (6 == state) {
		stateStr = "停止";
	}else if (7 == state) {
		stateStr = "完成";
	}
	return stateStr;
}
function getStateColor(state){
	var color = "#227700";
	if (0 == state) {
		color = "#227700";
	}else if (1 == state) {
		color = "#FF0000";
	} else if (2 == state) {
		color = "#FF8888";
	}else if (3 == state) {
		color = "#FF0000";
	} else if (4 == state) {
		color = "#FF0000";
	} else if (5 == state) {
		color = "#FF3333";
	} else if (6== state) {
		color = "#FF0000";
	} else if (7 == state) {
		color = "#FF0000";
	}
	return color;
}

// 对Date的扩展，将 Date 转化为指定格式的String
// 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符，
// 年(y)可以用 1-4 个占位符，毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
// 例子：
// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
// (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
Date.prototype.Format = function(fmt){ // author: meizz
	var o = {
			"M+" : this.getMonth()+1,                 // 月份
			"d+" : this.getDate(),                    // 日
			"h+" : this.getHours(),                   // 小时
			"m+" : this.getMinutes(),                 // 分
			"s+" : this.getSeconds(),                 // 秒
			"q+" : Math.floor((this.getMonth()+3)/3), // 季度
			"S"  : this.getMilliseconds()             // 毫秒
	};
	if(/(y+)/.test(fmt)){
		fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
	}
	for(var k in o){
		if(new RegExp("("+ k +")").test(fmt)){
			fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
		}
	}
	return fmt;
}

function getWorkSpaceHtml(workSpaceName,totalProcessCount,doingSize,errSize){
	var totalProcessCountHtml=""
		+totalProcessCount+"";
	var doingSizeHtml="0";
	if(doingSize>0){
		doingSizeHtml=""
				+""+doingSize+""
				+" ";
	}else{
		doingSizeHtml=""+doingSize+"";
	}
	var errSizeHtml="0";
	if(errSize>0){
		errSizeHtml=""
				+""+errSize+""
				+" ";
	}else{
		errSizeHtml=""+errSize+" ";
	}
	var queueShowStr=totalProcessCountHtml+"/ ("+doingSizeHtml+" | "+errSizeHtml+")";
	return queueShowStr;
}

function showJobParams(jobName) {
	var jobTr=$('#job_div').find("table").find("tr[name='"+jobName+"']");
	var jobParamsDiv = $("#job_params_div");

	jobParamsDiv.find("input[name='name']").val(jobName);

	var level=jobTr.find("input[name='level']").val();
	jobParamsDiv.find("input[name='level']").val(level);

	var workSpaceName=jobTr.find("input[name='workSpaceName']").val();
	jobParamsDiv.find("input[name='workSpaceName']").val(workSpaceName);

	var workerClass=jobTr.find("input[name='workerClass']").val();
	jobParamsDiv.find("input[name='workerClass']").val(workerClass);

	var designatedNodeName=jobTr.find("input[name='designatedNodeName']").val();
	jobParamsDiv.find("input[name='designatedNodeName']").val(designatedNodeName);

	var needNodes=jobTr.find("input[name='needNodes']").val();
	jobParamsDiv.find("input[name='needNodes']").val(needNodes);

	var describe=jobTr.find("input[name='describe']").val();
	jobParamsDiv.find("input[name='describe']").val(describe);

	var url = "/crawler/job/queryJobParams/" + jobName;
	$.get(url, function(result) {
		var jobParams=result.data;
		if(null!=jobParams){
			var jobParamsTable =jobParamsDiv.find("table[id='jobParams']");
			jobParamsTable.find("tr[class=jobParams]").remove();
			for (var i = 0; i < jobParams.length; i++) {
				var jobParam=jobParams[i];
				var tr = $("

");
				$("<input name='version' style='display:none' type='text' value='"+jobParam.version+"' />").appendTo(tr);
				var jobParamNameTd=$("</td");
				$("<input name='name'  flag='"+jobParam.id+"' style='display:none' type='text' value='"+jobParam.name+"' />").appendTo(jobParamNameTd);
				$("<input name='update_name'  flag='"+jobParam.id+"' size='20'  style='display:none' type='text' value='"+jobParam.name+"' />").appendTo(jobParamNameTd);


text:
module.exports = {
  purpleRedTheme: {
    palette: {
      primary: {
        light: '#EDE7F6',
        main: '#673AB7',
        dark: '#512DA8',
        contrastText: '#fff',
      },
      secondary: {
        light: '#FCE4EC',
        main: '#EC407A',
        dark: '#C2185B',
        contrastText: '#fff',
      },
    },
  },
  greenOrangeTheme: {
    palette: {
      primary: {
        light: '#F1F8E9',
        main: '#689F38',
        dark: '#33691E',
        contrastText: '#fff',
      },
      secondary: {
        light: '#FFF8E1',
        main: '#FF8F00',
        dark: '#E65100',
        contrastText: '#fff',
      },
    },
  },
  magentaTheme: {
    palette: {
      primary: {
        light: '#FCE4EC',
        main: '#EC407A',
        dark: '#D81B60',
        contrastText: '#fff',
      },
      secondary: {
        light: '#FFF8E1',
        main: '#FFA000',
        dark: '#FF6F00',
        contrastText: '#fff',
      },
    },
  },
  purpleTheme: {
    palette: {
      primary: {
        light: '#EDE7F6',
        main: '#AB47BC',
        dark: '#8E24AA',
        contrastText: '#fff',
      },
      secondary: {
        light: '#E0F7FA',
        main: '#00BCD4',
        dark: '#006064',
        contrastText: '#fff',
      },
    },
  },
  blueTheme: {
    palette: {
      primary: {
        light: '#E8EAF6',
        main: '#3F51B5',
        dark: '#283593',
        contrastText: '#fff',
      },
      secondary: {
        light: '#E1F5FE',
        main: '#03A9F4',
        dark: '#0277BD',
        contrastText: '#fff',
      },
    },
  },
  orangeTheme: {
    palette: {
      primary: {
        light: '#FFF3E0',
        main: '#EF6C00',
        dark: '#E65100',
        contrastText: '#fff',
      },
      secondary: {
        light: '#F3E5F5',
        main: '#9C27B0',
        dark: '#7B1FA2',
        contrastText: '#fff',
      },
    },
  },
  cyanTheme: {
    palette: {
      primary: {
        light: '#E0F7FA',
        main: '#009688',
        dark: '#00695C',
        contrastText: '#fff',
      },
      secondary: {
        light: '#F1F8E9',
        main: '#689F38',
        dark: '#33691E',
        contrastText: '#fff',
      },
    },
  },
  redTheme: {
    palette: {
      primary: {
        light: '#FFEBEE',
        main: '#EF5350',
        dark: '#E53935',
        contrastText: '#fff',
      },
      secondary: {
        light: '#ECEFF1',
        main: '#607D8B',
        dark: '#455A64',
        contrastText: '#fff',
      },
    },
  },
  skyBlueTheme: {
    palette: {
      primary: {
        light: '#E3F2FD',
        main: '#2196F3',
        dark: '#1565C0',
        contrastText: '#fff',
      },
      secondary: {
        light: '#E0F2F1',
        main: '#00BFA5',
        dark: '#00796B',
        contrastText: '#fff',
      },
    },
  },
  greyTheme: {
    palette: {
      primary: {
        light: '#ECEFF1',
        main: '#607D8B',
        dark: '#455A64',
        contrastText: '#fff',
      },
      secondary: {
        light: '#E0E0E0',
        main: '#757575',
        dark: '#424242',
        contrastText: '#fff',
      },
    },
  },
  yellowBlueTheme: {
    palette: {
      primary: {
        light: '#E1F5FE',
        main: '#039BE5',
        dark: '#01579B',
        contrastText: '#fff',
      },
      secondary: {
        light: '#FFF3E0',
        main: '#FF9800',
        dark: '#E65100',
        contrastText: '#fff',
      },
    },
  },
  pinkBlueTheme: {
    palette: {
      primary: {
        light: '#E0F7FA',
        main: '#00BCD4',
        dark: '#006064',
        contrastText: '#fff',
      },
      secondary: {
        light: '#FCE4EC',
        main: '#F06292',
        dark: '#AD1457',
        contrastText: '#fff',
      },
    },
  },
  yellowCyanTheme: {
    palette: {
      primary: {
        light: '#FFF3E0',
        main: '#F9A825',
        dark: '#F57F17',
        contrastText: '#fff',
      },
      secondary: {
        light: '#E0F7FA',
        main: '#00BCD4',
        dark: '#006064',
        contrastText: '#fff',
      },
    },
  },
  blueCyanTheme: {
    palette: {
      primary: {
        light: '#E8EAF6',
        main: '#3F51B5',
        dark: '#283593',
        contrastText: '#fff',
      },
      secondary: {
        light: '#E0F7FA',
        main: '#00BCD4',
        dark: '#00838F',
        contrastText: '#fff',
      },
    },
  },
  greenPurpleTheme: {
    palette: {
      primary: {
        light: '#EDE7F6',
        main: '#7C4DFF',
        dark: '#311B92',
        contrastText: '#fff',
      },
      secondary: {
        light: '#E8F5E9',
        main: '#00C853',
        dark: '#1B5E20',
        contrastText: '#fff',
      },
    },
  },
  pinkGreenTheme: {
    palette: {
      primary: {
        light: '#DCEDC8',
        main: '#689F38',
        dark: '#33691E',
        contrastText: '#fff',
      },
      secondary: {
        light: '#FCE4EC',
        main: '#EC407A',
        dark: '#D81B60',
        contrastText: '#fff',
      },
    },
  },
  goldTheme: {
    palette: {
      primary: {
        light: '#FFF9C4',
        main: '#FF9100',
        dark: '#FF6D00',
        contrastText: '#fff',
      },
      secondary: {
        light: '#EFEBE9',
        main: '#8D6E63',
        dark: '#4E342E',
        contrastText: '#fff',
      },
    },
  }
};


text:
import { put, takeLatest, select } from 'redux-saga/effects';
import ModelchimpClient from 'utils/modelchimpClient';
import { LOAD_EXPERIMENT_DATA,
  CREATE_EXPERIMENT_LABELS,
  DELETE_EXPERIMENT_LABELS,
  SUBMIT_DELETE_EXPERIMENTS,
 } from './constants';
import {
  loadExperimentAction,
  loadExperimentSuccessAction,
  loadExperimentErrorAction,
  createExperimentLabelsSuccessAction,
  createExperimentLabelsErrorAction,
  deleteExperimentLabelsSuccessAction,
  deleteExperimentLabelsErrorAction,
  submitDeleteExperimentsSuccessAction,
  submitDeleteExperimentsErrorAction,
} from './actions';
import {
  makeSelectExperimentColumns,
  makeSelectExperimentMetricColumns,
  makeSelectDeleteList,
} from './selectors';
import { mapKeys } from 'lodash';

export function* getExperimentList({ projectId }) {
  let requestURL = `experiment/list/${projectId}/`;
  let cols = yield select(makeSelectExperimentColumns());
  let metricCols = yield select(makeSelectExperimentMetricColumns());

  if ((cols && cols.length > 0) || (metricCols && metricCols.length > 0)) {
    cols = cols.map(e => `param_fields[]=${e}&`);
    cols = cols.join('');
    metricCols = metricCols.map(e => `metric_fields[]=${e}&`);
    metricCols = metricCols.join('');

    requestURL = `${requestURL}?${cols}${metricCols}`;
  }

  try {
    const experiments = yield ModelchimpClient.get(requestURL);

    yield put(loadExperimentSuccessAction(experiments));
  } catch (err) {
    yield put(loadExperimentErrorAction(err));
  }
}

export function* createLabel({ modelId, labelData, projectId }) {
  const requestURL = `experiment/${modelId}/label/`;
  const formData = new FormData();

  mapKeys(labelData, (v, k) => formData.append(k, v));

  try {
    const data = yield ModelchimpClient.post(requestURL, { body: formData });
    yield put(createExperimentLabelsSuccessAction(data));
    yield put(loadExperimentAction(projectId));

  } catch (err) {
    yield put(createExperimentLabelsErrorAction(err));
  }
}

export function* deleteLabel({ modelId, label, projectId }) {
  const requestURL = `experiment/${modelId}/label/?label=${label}`;

  try {
    const data = yield ModelchimpClient.delete(requestURL);

    if (data) {
      yield put(deleteExperimentLabelsSuccessAction(data));
      yield put(loadExperimentAction(projectId));
    }
  } catch (err) {
    yield put(deleteExperimentLabelsErrorAction(err));
  }
}

export function* deleteExperimentList({ projectId }) {
  let requestURL = `experiment/delete/${projectId}/`;
  const formData = new FormData();
  const deleteList = yield select(makeSelectDeleteList());

  formData.append('model_ids', deleteList.toJS());

  try {
    const data = yield ModelchimpClient.delete(requestURL, { body: formData });
    yield put(submitDeleteExperimentsSuccessAction());
    yield put(loadExperimentAction(projectId));
  } catch (err) {
    yield put(submitDeleteExperimentsErrorAction(err));
  }
}

export default function* experimentListSaga() {
  yield takeLatest(LOAD_EXPERIMENT_DATA, getExperimentList);
  yield takeLatest(CREATE_EXPERIMENT_LABELS, createLabel);
  yield takeLatest(DELETE_EXPERIMENT_LABELS, deleteLabel);
  yield takeLatest(SUBMIT_DELETE_EXPERIMENTS, deleteExperimentList);
}


text:
var random = require('geojson-random');

/**
 * Generates random {@link GeoJSON} data, including {@link Point|Points} and {@link Polygon|Polygons}, for testing
 * and experimentation.
 *
 * @module turf/random
 * @category data
 * @param {String} [type='point'] type of features desired: 'points' or 'polygons'
 * @param {Number} [count=1] how many geometries should be generated.
 * @param {Object} options options relevant to the feature desired. Can include:
 * @param {Array<number>} options.bbox a bounding box inside of which geometries
 * are placed. In the case of {@link Point} features, they are guaranteed to be within this bounds,
 * while {@link Polygon} features have their centroid within the bounds.
 * @param {Number} [options.num_vertices=10] options.vertices the number of vertices added
 * to polygon features.
 * @param {Number} [options.max_radial_length=10] the total number of decimal
 * degrees longitude or latitude that a polygon can extent outwards to
 * from its center.
 * @return {FeatureCollection} generated random features
 * @example
 * var points = turf.random('points', 100, {
 *   bbox: [-70, 40, -60, 60]
 * });
 *
 * //=points
 *
 * var polygons = turf.random('polygons', 4, {
 *   bbox: [-70, 40, -60, 60]
 * });
 *
 * //=polygons
 */
module.exports = function(type, count, options) {
    options = options || {};
    count = count || 1;
    switch (type) {
        case 'point':
        case 'points':
        case undefined:
            return random.point(count, options.bbox);
        case 'polygon':
        case 'polygons':
            return random.polygon(
                count,
                options.num_vertices,
                options.max_radial_length,
                options.bbox);
        default:
            throw new Error('Unknown type given: valid options are points and polygons');
    }
};


text:
$(document).ready(function(){

  $("form#height").submit(function(event){

    event.preventDefault();
    alert("form works");
    var inputHeight = parseInt($("input#heightInput").val());

    alert(inputHeight);

    if (inputHeight >= 48) {
      $("div#rideConditions1").show();
      $("div.ridesContainer").show();
      $("span.inch48").removeClass("inch48").addClass("inch48Blue");
      $("span.inch24").removeClass("inch24").addClass("inch24Green")
      $("span.inch12").removeClass("inch12").addClass("inch12Red");
    } else if (inputHeight >=12 && inputHeight <= 20) {
      $("div#rideConditions2").show();
      $("div.ridesContainer").show();
      $("span.inch48").removeClass("inch48").addClass("inch48Blue");
      $("span.inch24").removeClass("inch24").addClass("inch24Green")
      $("span.inch12").removeClass("inch12").addClass("inch12Red");
    } else {
      $("div#rideConditions3").show();
      $("div.ridesContainer").show();
      $("span.inch48").removeClass("inch48").addClass("inch48Red");
      $("span.inch24").removeClass("inch24").addClass("inch24Red")
      $("span.inch12").removeClass("inch12").addClass("inch12Green");
    }

    $("div#introImagery").hide();

  });

});

// below follows these instructions
// Create a website for an amusement park that prompts the user to enter their height.
// The page should then only displays information about rides the user is tall enough to safely ride.
//
//
// $("form#height").submit(function(event){
//
//   event.preventDefault();
//   alert("form works");
//   var inputHeight = parseInt($("input#heightInput").val());
//
//   alert(inputHeight);
//
//   if (inputHeight >= 48) {
//     $("div#adultRides").show();
//     $("div#kidsRides").show();
//   } else if (inputHeight <= 47) {
//     $("div#kidsRides").show();
//     $("div#toddlerRides").show();
//   } else {
//     $("div#toddlerRides").show()
//   }
//
//   $("div#introImagery").hide();
//
// });


text:
// Управление событиями
export let events = {
    events: {},
    on: function (eventName, fn) {
        this.events[eventName] = this.events[eventName] || [];
        this.events[eventName].push(fn);
    },
    off: function (eventName, fn) {
        if (this.events[eventName]) {
            for (let i = 0, len = this.events[eventName].length; i < len; i++) {
                if (this.events[eventName][i] === fn) {
                    this.events[eventName].splice(i, 1);
                    break;
                }
            }
        }
    },
    trigger: function (eventName, data) {
        if (this.events[eventName]) {
            this.events[eventName].forEach(function (fn) {
                fn(data);
            });
        }
    }
};


text:
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.InfoOnlyDigital = void 0;
const control_base_1 = require("./control-base");
class InfoOnlyDigital extends control_base_1.ControlBase {
    loadAsync(type, uuid, control) {
        return __awaiter(this, void 0, void 0, function* () {
            yield this.updateObjectAsync(uuid, {
                type: type,
                common: {
                    name: control.name,
                    role: 'switch',
                },
                native: { control: control },
            });
            yield this.loadOtherControlStatesAsync(control.name, uuid, control.states, ['active']);
            if (!control.hasOwnProperty('states') || !control.states.hasOwnProperty('active')) {
                return;
            }
            yield this.createBooleanControlStateObjectAsync(control.name, uuid, control.states, 'active', 'indicator');
            if (!control.hasOwnProperty('details')) {
                return;
            }
            if (control.details.hasOwnProperty('text')) {
                const text = control.details.text;
                yield this.updateStateObjectAsync(uuid + '.active-text', {
                    name: control.name + ': active as text',
                    read: true,
                    write: false,
                    type: 'string',
                    role: 'text',
                }, control.states.active, (name, value) => {
                    this.setStateAck(name, value == 1 ? text.on : text.off);
                });
            }
            if (control.details.hasOwnProperty('image')) {
                const image = control.details.text;
                yield this.updateStateObjectAsync(uuid + '.active-image', {
                    name: control.name + ': active as image',
                    read: true,
                    write: false,
                    type: 'string',
                    role: 'text',
                }, control.states.active, (name, value) => {
                    this.setStateAck(name, value == 1 ? image.on : image.off);
                });
            }
            if (control.details.hasOwnProperty('color')) {
                const color = control.details.text;
                yield this.updateStateObjectAsync(uuid + '.active-color', {
                    name: control.name + ': active as color',
                    read: true,
                    write: false,
                    type: 'string',
                    role: 'text',
                }, control.states.active, (name, value) => {
                    this.setStateAck(name, value == 1 ? color.on : color.off);
                });
            }
        });
    }
}
exports.InfoOnlyDigital = InfoOnlyDigital;
//# sourceMappingURL=InfoOnlyDigital.js.map


text:
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * @name: S9.9_A1;
 * @section: 9.9;
 * @assertion: ToObject conversion from undefined value must throw TypeError;
 * @description: Trying to convert undefined to Object;
*/

// CHECK#1
try{
  undefined['foo'];
  $ERROR('#1.1: undefined[\'foo\'] must throw TypeError. Actual: ' + (undefined['foo']));
}
catch(e){
  if((e instanceof TypeError) !== true){
    $ERROR('#1.2: undefined[\'foo\'] must throw TypeError. Actual: ' + (e));
  }
}

// CHECK#2
try{
  with(undefined) x = 2;
  $ERROR('#2.1: with(undefined) x = 2 must throw TypeError. Actual: x === ' + (x));
}
catch(e){
  if((e instanceof TypeError) !== true){
    $ERROR('#2.2: with(undefined) x = 2 must throw TypeError. Actual: ' + (e));
  }
}

// CHECK#3
try{
  for(var y in undefined) y = 2;
  $ERROR('#3.1: for(var y in undefined) y = 2 must throw TypeError. Actual: y === ' + (y));
}
catch(e){
  if((e instanceof TypeError) !== true){
    $ERROR('#3.2: for(var y in undefined) y = 2 must throw TypeError. Actual: ' + (e));
  }
}

// CHECK#4
try{
  for(var z in this.foo) z = 2;
  $ERROR('#4.1: for(var z in this.foo) z = 2 must throw TypeError. Actual: z === ' + (z));
}
catch(e){
  if((e instanceof TypeError) !== true){
    $ERROR('#4.2: for(var z in this.foo) z = 2 must throw TypeError. Actual: ' + (e));
  }
}


text:
var __reflect = (this && this.__reflect) || function (p, c, t) {
    p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
/**
  * 主界面消息
  * by dily
  * (c) copyright 2014 - 2035
  * All Rights Reserved.
  * 包括 角色UI、主功能、活动等等
  */
var MainNotify = (function () {
    function MainNotify() {
    }
    //打开主界面UI
    MainNotify.OPEN_MAIN = "MainNotify_OPEN_MAIN";
    //关闭主界面UI
    MainNotify.CLOSE_MAIN = "MainNotify_CLOSE_MAIN";
    //打开角色UI
    MainNotify.OPEN_ROLE = "MainNotify_OPEN_ROLE";
    //关闭角色UI
    MainNotify.CLOSE_ROLE = "MainNotify_CLOSE_ROLE";
    //打开功能UI
    MainNotify.OPEN_FUNCTION = "MainNotify_OPEN_FUNCTION";
    //关闭功能UI
    MainNotify.CLOSE_FUNCTION = "MainNotify_CLOSE_FUNCTION";
    //打开活动UI
    MainNotify.OPEN_ACTIVITY = "MainNotify_OPEN_ACTIVITY";
    //关闭活动UI
    MainNotify.CLOSE_ACTIVITY = "MainNotify_CLOSE_ACTIVITY";
    return MainNotify;
}());
__reflect(MainNotify.prototype, "MainNotify");


text:
/**
 * Kendo UI v2020.2.617 (http://www.telerik.com/kendo-ui)
 * Copyright 2020 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
 *
 * Kendo UI commercial licenses may be obtained at
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
 * If you do not own a commercial license, this file shall be governed by the trial license terms.

*/
!function(n){"function"==typeof define&&define.amd?define(["kendo.core.min"],n):n()}(function(){!function(n,y){kendo.cultures.vun={name:"vun",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n%","n%"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{name:"",abbr:"",pattern:["-$n","$n"],decimals:0,",":",",".":".",groupSize:[3],symbol:"TSh"}},calendars:{standard:{days:{names:["Jumapilyi","Jumatatuu","Jumanne","Jumatanu","Alhamisi","Ijumaa","Jumamosi"],namesAbbr:["Jpi","Jtt","Jnn","Jtn","Alh","Iju","Jmo"],namesShort:["Jpi","Jtt","Jnn","Jtn","Alh","Iju","Jmo"]},months:{names:["Januari","Februari","Machi","Aprilyi","Mei","Junyi","Julyai","Agusti","Septemba","Oktoba","Novemba","Desemba"],namesAbbr:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Des"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"dd/MM/yyyy",D:"dddd, d MMMM yyyy",F:"dddd, d MMMM yyyy HH:mm:ss",g:"dd/MM/yyyy HH:mm",G:"dd/MM/yyyy HH:mm:ss",m:"MMMM d",M:"MMMM d",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"HH:mm",T:"HH:mm:ss",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM yyyy",Y:"MMMM yyyy"},"/":"/",":":":",firstDay:1}}}}(this)});
//# sourceMappingURL=kendo.culture.vun.min.js.map


text:
/**
 * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */

/* globals document, console, window */

import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';

import EditorWatchdog from '../../src/editorwatchdog';

class TypingError {
	constructor( editor ) {
		this.editor = editor;
	}

	init() {
		const inputCommand = this.editor.commands.get( 'input' );

		inputCommand.on( 'execute', ( evt, data ) => {
			const commandArgs = data[ 0 ];

			if ( commandArgs.text === '1' ) {
				// Simulate error.
				this.editor.foo.bar = 'bom';
			}
		} );
	}
}

const editorConfig = {
	image: { toolbar: [ 'toggleImageCaption', 'imageTextAlternative' ] },
	plugins: [
		ArticlePluginSet, TypingError
	],
	toolbar: [ 'heading', '|', 'bold', 'italic', 'link', 'bulletedList', 'numberedList', 'blockQuote',
		'insertTable', 'mediaEmbed', 'undo', 'redo' ],
	table: {
		contentToolbar: [
			'tableColumn',
			'tableRow',
			'mergeTableCells'
		]
	}
};

const watchdog1 = createWatchdog(
	document.getElementById( 'editor-1' ),
	document.getElementById( 'editor-1-state' ),
	'First'
);

const watchdog2 = createWatchdog(
	document.getElementById( 'editor-2' ),
	document.getElementById( 'editor-2-state' ),
	'Second'
);

Object.assign( window, { watchdog1, watchdog2 } );

document.getElementById( 'random-error' ).addEventListener( 'click', () => {
	throw new Error( 'foo' );
} );

function createWatchdog( editorElement, stateElement, name ) {
	const watchdog = new EditorWatchdog( ClassicEditor );

	watchdog.create( editorElement, editorConfig );

	watchdog.on( 'error', () => {
		console.log( `${ name } editor crashed!` );
	} );

	watchdog.on( 'restart', () => {
		console.log( `${ name } editor restarted.` );
	} );

	watchdog.on( 'stateChange', () => {
		console.log( `${ name } watchdog state changed to '${ watchdog.state }'` );

		stateElement.innerText = watchdog.state;

		if ( watchdog.state === 'crashedPermanently' ) {
			watchdog.editor.isReadOnly = true;
		}
	} );

	stateElement.innerText = watchdog.state;

	return watchdog;
}


text:
(function(env) {
    env.ddg_spice_expatistan = function(api_result) {
        "use strict";

        if(!api_result || api_result.status !== 'OK') {
            return Spice.failed('expatistan');
        }

        Spice.add({
            id: "expatistan",
            name: "Answer",
            data: api_result,
            meta: {
                sourceUrl: api_result.source_url,
                sourceName: 'Expatistan'
            },
            normalize: function(item) {

                // Vars
                var city, cost, subtitle, title;

                // Guard if abstract or source_url don't exist
                if (!api_result.abstract || !api_result.source_url) {
                    return Spice.failed('expatistan');
                }

                // We have a comparison result return the full abstract
                if(api_result.source_url.match(/comparison/)) {
                    title = api_result.abstract;
                } else {
                // We have a single result extract the index and create a subtitle
                    city = api_result.abstract.match(/<b>(.*?)<\/b>/g)[0];
                    title = api_result.abstract.match(/\s[0-9]+\s/)[0];
                    subtitle = city + " - Cost of living index";
                }

                return {
                    title: DDG.strip_html(title),
                    subtitle: DDG.strip_html(subtitle)
                };
            },
            templates: {
                group: 'text',
                options: {
                    moreAt: true
                }
            }
        });
    }
}(this));


text:
// THIS FILE IS AUTO GENERATED
var GenIcon = require('../lib').GenIcon
module.exports.HiLibrary = function HiLibrary (props) {
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 20 20","fill":"currentColor"},"child":[{"tag":"path","attr":{"fillRule":"evenodd","d":"M10.496 2.132a1 1 0 00-.992 0l-7 4A1 1 0 003 8v7a1 1 0 100 2h14a1 1 0 100-2V8a1 1 0 00.496-1.868l-7-4zM6 9a1 1 0 00-1 1v3a1 1 0 102 0v-3a1 1 0 00-1-1zm3 1a1 1 0 012 0v3a1 1 0 11-2 0v-3zm5-1a1 1 0 00-1 1v3a1 1 0 102 0v-3a1 1 0 00-1-1z","clipRule":"evenodd"}}]})(props);
};


text:
/*
 * Provides methods for working with localized strings.
 */
cmsdefine([], function () {

    /**
     * Get localized string for specific resource key.
     *
     * @param {string} Resource key
     * @returns {string} Localized string
     */
    function getString(key) {
        var translation,
            localizationStrings = window.CMS['localizationStrings'];

        if (localizationStrings !== undefined) {
            translation = localizationStrings[key];
        }

        return (translation !== undefined) ? translation : key;
    }

    return {
        getString: getString
    };
});


text:
import React,{Component} from 'react'
import {connect} from 'react-redux'
import {menuDisplayActions,changeActiveTheme} from '../../Actions/topBarActions'
import {faMoon,faSun, faPaperPlane} from '@fortawesome/fontawesome-free-solid'
import {faFacebook,faTwitter,faGithub,faLinkedin,faPiedPiper} from '@fortawesome/fontawesome-free-brands'
import IconedButton from '../iconedButton'
import './main.css'
import {initiateSendMessage} from '../../Actions/messagesHandler'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

class Menu extends Component{
    constructor(props) {
        super(props);
        this.state = {
            light:false,
            dark:false,
            pied:false,
            messageToDev:""
        }
        this.setWrapperRef = this.setWrapperRef.bind(this);
        this.handleClickOutside = this.handleClickOutside.bind(this);
    }

    componentDidMount() {
        document.addEventListener('mousedown', this.handleClickOutside);
        this.checkActiveTheme()
    }

    componentWillUnmount() {
        document.removeEventListener('mousedown', this.handleClickOutside);
    }

    componentDidUpdate(prevProps){
        if(this.props.theme !== prevProps.theme){
            this.checkActiveTheme()
        }
    }

    checkActiveTheme(){
        switch(this.props.theme){
            case "LIGHT":{
                this.setState({light:true,dark:false,pied:false});
                break;
            }

            case "DARK":{
                this.setState({dark:true,light:false,pied:false});
                break;
            }

            case "PIED":{
                this.setState({dark:false,light:false,pied:true});
                break;
            }

            default:{
                break;
            }
          }
      }

    changeTheme(theme){
        console.log("HERE")
        this.props.dispatch(changeActiveTheme(theme))
    }
    openSocial(network){
        let url = null
        switch(network){
            case "facebook":{
                url = 'https://www.facebook.com/abdulhamidoumer.oumer'
                break
            }

            case "twitter":{
                url = 'https://twitter.com/Aotwitts3'
                break
            }

            case "github":{
                url = 'https://github.com/abdulhamidOumer'
                break
            }

            case "linkedin":{
                url = 'https://www.linkedin.com/in/abdulhamid-mohammed-3a9485108/'
                break
            }
            default:
                break
        }

        const openUrl = window.open(url, '_blank')
        openUrl.focus()
    }
    setWrapperRef(node) {
      this.wrapperRef = node;
    }

    handleClickOutside(event) {
      if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {
          this.props.dispatch(menuDisplayActions('HIDE'));
      }
    }

    sendMessageToDev(){
        const message = this.state.messageToDev
        this.props.dispatch(initiateSendMessage(message))
    }

    handleInput(event){
        const message = event.target.value
        this.setState({
            messageToDev:message
        })
    }

    render(){
        return(

Themes

                    <IconedButton onClick={this.changeTheme.bind(this,"LIGHT")} icon={faSun} discription='Light Mode' active={this.state.light}/>
                    <IconedButton onClick={this.changeTheme.bind(this,"DARK")} icon={faMoon} discription='Dark Mode'  active={this.state.dark}/>
                    <IconedButton onClick={this.changeTheme.bind(this,"PIED")} icon={faPiedPiper} discription='Pied Piper'  active={this.state.pied}/>

Contact

                    <textarea value={this.state.messageToDev} onChange={this.handleInput.bind(this)} placeholder='Direct Message' className='message-input'></textarea>
                    <button className='send-messenger-button' onClick={this.sendMessageToDev.bind(this)}>
                        Send To Developer
                        <FontAwesomeIcon icon={faPaperPlane} className='messenger-icon'/>
                    </button>

                    <IconedButton onClick={this.openSocial.bind(this,'facebook')} icon={faFacebook} active/>
                    <IconedButton onClick={this.openSocial.bind(this,'twitter')} icon={faTwitter} active/>
                    <IconedButton onClick={this.openSocial.bind(this,'github')} icon={faGithub}  active/>
                    <IconedButton onClick={this.openSocial.bind(this,'linkedin')} icon={faLinkedin} active/>

        )
    }
}

Menu = connect(store=>{
    return{
        theme:store.theme
    }
})(Menu)

export default Menu


text:
import React, {PropTypes} from 'react';
import {connect} from 'react-redux';
import Snackbar from 'material-ui/Snackbar';

import {notice, requestClose} from '../../redux/modules/noticeBar';

var Notice = React.createClass({
    propTypes: {
        open: PropTypes.bool.isRequired,
        message: PropTypes.string.isRequired
    },

    handleRequestClose: function () {
        this.props.requestClose();
    },

    render: function () {
        return (
            <div>
                <Snackbar
                    open={this.props.open}
                    message={this.props.message}
                    autoHideDuration={3000}
                    onRequestClose={this.handleRequestClose}
                    bodyStyle={{fontFamily: 'Lato', fontSize: '2em', fontWeight:'bold'}}
                />
            </div>
        );
    }
});

function mapStateToProps (state) {
    return {
        open: state.noticeBar.open,
        message: state.noticeBar.message,
    };
}

export default connect(
    mapStateToProps ,
    {notice, requestClose}
)(Notice)


text:
import express from "express";
import { promises } from "fs";
import moment from "moment";
const { writeFile, readFile } = promises;

import {inserirLancamento} from "../controllers/lancamentosControllers.js";
import {media, somatorio, teste} from "../libs/calculos.js";

const router = express.Router();

router.get("/totalMes/:mes", async (req, res) => {
    let numeros = [1, 2, 3, 4, 5, 6, 7];
    /*numeros.forEach(async x => {
        let result = await teste(x);
        console.log(result);
    });*/
    /*for (let x of numeros) {
        let result = await teste(x);
        console.log(result);
    }*/
    for (let i = 0; i < numeros.length; i++) {
        let result = await teste(numeros[i]);
        console.log(result);
    }

    let json = JSON.parse(await readFile(global.fileName));
    let lancamentos = json.lancamentos.filter(lancamento => {
        const mes = moment(lancamento.data, "DD/MM/YYYY").month() + 1;
        return mes === parseInt(req.params.mes);
    });
    lancamentos = lancamentos.map(lancamento => {
        return lancamento.valor;
    });
    res.send({valor: somatorio(lancamentos)});
});

router.post("/receita", async (req, res) => {
    try {
        let lancamento = req.body;
        res.send(await inserirLancamento(lancamento));
    } catch (err) {
        res.status(400).send({error: err.message});
    }
});

router.post("/despesa", async (req, res) => {
    try {
        let lancamento = req.body;
        res.send(await inserirLancamento(lancamento, "D"));
    } catch (err) {
        res.status(400).send({error: err.message});
    }
});

export default router;


text:
var hypnoticBall, database;
var position;

function setup(){
  database = firebase.database();
  console.log(database);
  createCanvas(500,500);

  hypnoticBall = createSprite(250,250,10,10);
  hypnoticBall.shapeColor = "red";

  var hypnoticBallPosition = database.ref('ball/position');
  hypnoticBallPosition.on("value", readPosition, showError);
}

function draw(){
  background("white");

    if(keyDown(LEFT_ARROW)){
      writePosition(-1,0);
   console.log("left");
    }
    else if(keyDown(RIGHT_ARROW)){
      writePosition(1,0);
    }
    else if(keyDown(UP_ARROW)){
      writePosition(0,-1);
    }
    else if(keyDown(DOWN_ARROW)){
      writePosition(0,+1);
    }
    drawSprites();

}

function writePosition(x,y){
  database.ref("ball/position").set ({
    "x" : position.x + x,
    "y" : position.y + y
  })
}

function readPosition(data){
  position = data.val();
  console.log(position.x);
  hypnoticBall.x = position.x;
  hypnoticBall.y = position.y;
}

function showError(){
  console.log("Error in writing to the database");
}


text:
const chromeLauncher = require('chrome-launcher');
const CDP = require('chrome-remote-interface');

module.exports = class Browser {
    async initialize() {
        const chrome = await chromeLauncher.launch({
            chromeFlags: [
                //'--disable-gpu',
                //'--headless'
            ]
        });
        const protocol = await CDP({
            port: chrome.port
        });
        await Promise.all([protocol.Page.enable(), protocol.Runtime.enable()]);
        this.protocol = protocol;
    }

    navigate(url) {
        return this.protocol.Page.navigate({ url });
    }

    loadEventFired(callback) {
        return this.protocol.Page.loadEventFired(callback);
    }

    reload(callback) {
        return this.protocol.Page.reload({ ignoreCache: true });
    }

    async getPageTextContent() {
        const { result } = await this.protocol.Runtime.evaluate({
            expression: "document.querySelector('body').textContent"
        });
        return result.value;
    }

    async captureScreenshot() {
        const { data } = await this.protocol.Page.captureScreenshot();
        return data;
    }
}


text:
// This file was automatically generated from common.soy.
// Please don't edit this file by hand.

if (typeof apps == 'undefined') { var apps = {}; }

apps.messages = function(opt_data, opt_ignored, opt_ijData) {
  return '
a visual programming environmentBlocklySee generated JavaScript code.Save and link to blocks.Run the program defined by the blocks in the workspace.Run ProgramResetঠিক আছেCancelLogicLoopsMathTextListsColourVariablesFunctionsThere was a problem with the request.Share your blocks with this link:\\n\\n%1Sorry, \'%1\' doesn\'t correspond with any saved program.Could not load your saved file.  Perhaps it was created with a different version of Blockly?listtext
';
};

apps.dialog = function(opt_data, opt_ignored, opt_ijData) {
  return '

';
};

apps.codeDialog = function(opt_data, opt_ignored, opt_ijData) {
  return '

' + apps.ok(null, null, opt_ijData) + '
';
};

apps.storageDialog = function(opt_data, opt_ignored, opt_ijData) {
  return '

' + apps.ok(null, null, opt_ijData) + '
';
};

apps.ok = function(opt_data, opt_ignored, opt_ijData) {
  return '
<button class="secondary" onclick="BlocklyApps.hideDialog(true)">ঠিক আছে</button>
';
};

;
// This file was automatically generated from template.soy.
// Please don't edit this file by hand.

if (typeof planepage == 'undefined') { var planepage = {}; }

planepage.messages = function(opt_data, opt_ignored, opt_ijData) {
  return apps.messages(null, null, opt_ijData) + '
Rows: %1rows (%1)1st class rows: %11st class rows (%1)2nd class rows: %12nd class rows (%1)Seats: %1?seats =
';
};

planepage.start = function(opt_data, opt_ignored, opt_ijData) {
  var output = planepage.messages(null, null, opt_ijData) + '

Blockly : Plane Seat Calculator   ';
  var iLimit130 = opt_ijData.maxLevel + 1;
  for (var i130 = 1; i130 < iLimit130; i130++) {
    output += ' ' + ((i130 == opt_ijData.level) ? '' + soy.$$escapeHtml(i130) + '' : (i130 < opt_ijData.level) ? '' + soy.$$escapeHtml(i130) + '' : '' + soy.$$escapeHtml(i130) + '');
  }
  output += '
	<select id="languageMenu"></select>


text:
import { NotImplementedError } from '../extensions/index.js';

/**
 * Given matrix where you have to find cats by ears "^^"
 *
 * @param {Array<Array>} matrix
 * @return {Number} count of cats found
 *
 * @example
 * countCats([
 *  [0, 1, '^^'],
 *  [0, '^^', 2],
 *  ['^^', 1, 2]
 * ]) => 3`
 *
 */
export default function countCats(matrix) {
  // let result = 0;

  // for (let i = 0; i < matrix.length; i++){
  //   for (let j = 0; j < matrix[i].length; j++){
  //     if (matrix[i][j] == '^^' ) {result++}
  //   }
  // }
  return matrix.flat(1).filter(elem => elem === '^^').length;
}


text:
// @ts-check
const {
	packageJson,
	install,
	getExtsFromCommand,
	uninstall,
} = require('mrm-core');
const { isUsingYarnBerry } = require('mrm-core/src/npm');
const { castArray } = require('lodash');
const husky = require('husky');

const packages = {
	'lint-staged': '>=10',
	husky: '>=7',
};

/**
 * Default lint-staged rules
 *
 * @param name Name of the rule to match user overrides
 * @param [condition] Function that returns true when the rule should be added
 * @param extensions Default extension (if we can't infer them from an npm script)
 * @param [script] Name of an npm script to infer extensions
 * @param [param] Command line parameter of an npm script to infer extensions (for example, `ext` for `--ext`)
 * @param command Command to run for a lint-staged rule
 */
const defaultRules = [
	// ESLint
	{
		name: 'eslint',
		condition: pkg => !!pkg.get('devDependencies.eslint'),
		extensions: ['js'],
		script: 'lint',
		param: 'ext',
		command: 'eslint --cache --fix',
	},
	// Stylelint
	{
		name: 'stylelint',
		condition: pkg => !!pkg.get('devDependencies.stylelint'),
		extensions: ['css'],
		script: 'lint:css',
		command: 'stylelint --fix',
	},
	// Prettier
	{
		name: 'prettier',
		condition: pkg =>
			!!pkg.get('devDependencies.prettier') &&
			!pkg.get('devDependencies.eslint-plugin-prettier'),
		extensions: ['js', 'css', 'md'],
		script: 'format',
		command: 'prettier --write',
	},
];

/**
 * Merge default rules with user overrides
 *
 * @param {Array} defaults
 * @param {Object} overrides
 */
function mergeRules(defaults, overrides) {
	// Overrides for default rules
	const rulesWithOverrides = defaults.map(rule => ({
		...rule,
		...overrides[rule.name],
	}));

	// Custom rules
	return Object.entries(overrides).reduce((acc, [name, rule]) => {
		if (acc.some(x => x.name === name)) {
			return acc;
		}
		return [...acc, rule];
	}, rulesWithOverrides);
}

/**
 * Convert an array of extensions to a glob pattern
 *
 * Example: ['js', 'ts'] -> '*.{js,ts}'
 *
 * @param {string[]} exts
 */
function extsToGlob(exts) {
	if (exts.length > 1) {
		return `*.{${exts}}`;
	}

	return `*.${exts}`;
}

/**
 * Generate a regular expression to detect a rule in existing rules. For simplicity
 * assumes that the first word in the command is the binary you're running.
 *
 * Example: 'eslint --fix' -> /\beslint\b/
 *
 * TODO: Allow overriding for more complex commands
 *
 * @param {string} command
 */
function getRuleRegExp(command) {
	return new RegExp(`\\b${command.split(' ').shift()}\\b`);
}

/**
 * Check if a given command belongs to a rule
 *
 * @param {string | string[]} ruleCommands
 * @param {string} command
 */
function isCommandBelongsToRule(ruleCommands, command) {
	const regExp = getRuleRegExp(command);
	return castArray(ruleCommands).some(x => regExp.test(x));
}

module.exports = function task({ lintStagedRules }) {
	const pkg = packageJson();
	const allRules = mergeRules(defaultRules, lintStagedRules);
	const existingRules = Object.entries(pkg.get('lint-staged', {}));

	// Remove exising rules that run any of default commands
	const commandsToRemove = allRules.map(rule => rule.command);
	const existingRulesToKeep = existingRules.filter(([, ruleCommands]) =>
		commandsToRemove
			.map(command => isCommandBelongsToRule(ruleCommands, command))
			.every(x => x === false)
	);

	// New rules
	const rulesToAdd = allRules.map(
		({
			condition = () => true,
			extensions: defaultExtensions,
			script,
			param,
			command,
			enabled = true,
		}) => {
			if (!enabled || !condition(pkg)) {
				return null;
			}

			const extensions =
				getExtsFromCommand(pkg.getScript(script), param) || defaultExtensions;
			const pattern = extsToGlob(extensions);

			return [pattern, command];
		}
	);

	// Merge existing and new rules, clean up
	const rulesToWrite = [...existingRulesToKeep, ...rulesToAdd].filter(Boolean);

	// Merge rules with the same pattern and convert to an object
	// Wrap commands in an array only when a pattern has multiple commands
	const rules = {};
	rulesToWrite.forEach(([pattern, command]) => {
		if (rules[pattern]) {
			rules[pattern] = [...castArray(rules[pattern]), command];
		} else {
			rules[pattern] = command;
		}
	});

	if (Object.keys(rules).length === 0) {
		const names = defaultRules.map(rule => rule.name);
		console.log(
			`\nCannot add lint-staged: only ${names.join(
				', '
			)} or custom rules are supported.`
		);
		return;
	}

	// package.json
	pkg
		// Remove husky 0.14 config
		.unset('scripts.precommit')
		// Remove husky 4 config
		.unset('husky')
		// Remove simple-git-hooks
		.unset('simple-git-hooks')
		// Add new config
		.merge({
			'lint-staged': rules,
		});

	if (isUsingYarnBerry()) {
		// Yarn 2 doesn't support `prepare` lifecycle yet
		// https://yarnpkg.com/advanced/lifecycle-scripts
		pkg.appendScript('postinstall', 'husky install');
		if (!pkg.get('private')) {
			// In case package isn't private, pinst ensures that postinstall
			// is disabled on publish
			pkg
				.appendScript('prepublishOnly', 'pinst --disable')
				.appendScript('postpublish', 'pinst --enable');
			packages.pinst = '>=2';
		}
	} else {
		// npm, Yarn 1, pnpm
		pkg.appendScript('prepare', 'husky install');
	}

	pkg.save();

	uninstall('simple-git-hooks');
	// Install dependencies
	install(packages);
	// Install husky
	husky.install();
	// Set lint-staged config
	husky.add('.husky/pre-commit', 'npx lint-staged');
};

module.exports.description = 'Adds lint-staged';
module.exports.parameters = {
	lintStagedRules: {
		type: 'config',
		default: {},
	},
};


text:
/* Change this file to get your personal Porfolio */

//Home Page
const greeting = {
  title: "Ambareesh R",
  logo_name: "Ambareesh",
  subTitle:
    "An Aspiring Deep Learning practitioner who is passionate about building scalable and robust AI enabled applications . With strong technical skills and academic background in engineering, statistics, machine learning and full stack development.",
};

const socialMediaLinks = [
  {
    name: "Github",
    link: "https://github.com/ambareeshr",
    fontAwesomeIcon: "fa-github", // Reference https://fontawesome.com/icons/github?style=brands
    backgroundColor: "#181717", // Reference https://simpleicons.org/?q=github
  },
  {
    name: "LinkedIn",
    link: "https://www.linkedin.com/in/ambareesh-r",
    fontAwesomeIcon: "fa-linkedin-in", // Reference https://fontawesome.com/icons/linkedin-in?style=brands
    backgroundColor: "#0077B5", // Reference https://simpleicons.org/?q=linkedin
  },
  {
    name: "Gmail",
    link: "mailto:rambareeshceg@gmail.com",
    fontAwesomeIcon: "fa-google", // Reference https://fontawesome.com/icons/google?style=brands
    backgroundColor: "#D14836", // Reference https://simpleicons.org/?q=gmail
  }
];

const skills = {
  data: [
    {
      title: "AI & Data Science",
      fileName: "DataScienceImg",
      skills: [
        "⚡ Developing highly scalable production ready models for various machine learning and statistical use cases",
        "⚡ Worked in many Computer Vision and Natural Language Processing projects",
        "⚡ Experienced in Deep Learning frameworks such as Tensorflow and Pytorch.",
      ],
      softwareSkills: [
        {
          skillName: "Tensorflow",
          logoName: "logos-tensorflow",
          style: {
            backgroundColor: "transparent",
          },
        },
        {
          skillName: "Keras",
          logoName: "simple-icons:keras",
          style: {
            backgroundColor: "white",
            color: "#D00000",
          },
        },
        {
          skillName: "PyTorch",
          logoName: "logos-pytorch",
          style: {
            backgroundColor: "transparent",
          },
        },
        {
          skillName: "Python",
          logoName: "ion-logo-python",
          style: {
            backgroundColor: "transparent",
            color: "#3776AB",
          },
        },
      ],
    },
    {
      title: "Full Stack Development",
      fileName: "FullStackImg",
      skills: [
        "⚡ Building responsive website UI using Angular",
        "⚡ Creating application backend in Flask, .Net & Java",
        "⚡ Worked in relational databases such as SQL, MySQL and non-relational databases such as MongoDB, Redis"
      ],
      softwareSkills: [
        {
          skillName: "HTML5",
          logoName: "simple-icons:html5",
          style: {
            color: "#E34F26",
          },
        },
        {
          skillName: "CSS3",
          logoName: "fa-css3",
          style: {
            color: "#1572B6",
          },
        },
        {
          skillName: "Sass",
          logoName: "simple-icons:sass",
          style: {
            color: "#CC6699",
          },
        },
        {
          skillName: "JavaScript",
          logoName: "simple-icons:javascript",
          style: {
            backgroundColor: "#000000",
            color: "#F7DF1E",
          },
        },
        {
          skillName: "Angular",
          logoName: "logos:angular-icon",
          style: {
            color: "#2C8EBB",
          },
        },
        {
          skillName: "ReactJS",
          logoName: "simple-icons:react",
          style: {
            color: "#61DAFB",
          },
        },
        {
          skillName: "NodeJS",
          logoName: "simple-icons:node-dot-js",
          style: {
            color: "#339933",
          },
        },
        {
          skillName: "NPM",
          logoName: "simple-icons:npm",
          style: {
            color: "#CB3837",
          },
        },
        {
          skillName: "Flask",
          logoName: "logos:flask",
          style: {
            color: "#663399",
          },
        },
        {
          skillName: "Flutter",
          logoName: "simple-icons:flutter",
          style: {
            color: "#02569B",
          },
        },
      ],
    },
    {
      title: "Cloud Infra-Architecture",
      fileName: "CloudInfraImg",
      skills: [
        "⚡ Experience working on multiple cloud platforms",
        "⚡ Created Continous Integration/Continous Deployment (CI/CD) pipelines for many projects.",
        "⚡ Deploying deep learning models on cloud to use on mobile devices",
      ],
      softwareSkills: [
        {
          skillName: "AWS",
          logoName: "simple-icons:amazonaws",
          style: {
            color: "#FF9900",
          },
        },
        {
          skillName: "Azure",
          logoName: "simple-icons:microsoftazure",
          style: {
            color: "#0089D6",
          },
        },
        {
          skillName: "Firebase",
          logoName: "simple-icons:firebase",
          style: {
            color: "#FFCA28",
          },
        },
        {
          skillName: "MySQL",
          logoName: "logos:mysql",
          style: {
            color: "#336791",
          },
        },
        {
          skillName: "MongoDB",
          logoName: "simple-icons:mongodb",
          style: {
            color: "#47A248",
          },
        },
        {
          skillName: "Docker",
          logoName: "simple-icons:docker",
          style: {
            color: "#1488C6",
          },
        },
        {
          skillName: "Kubernetes",
          logoName: "simple-icons:kubernetes",
          style: {
            color: "#326CE5",
          },
        },
      ],
    },
  ],
};

const degrees = {
  degrees: [
    {
      title: "Anna University, College of Engineering Guindy",
      subtitle: "B.Tech. in Information Technology",
      logo_path: "annaUnivLogo.png",
      alt_name: "Anna University, CEG",
      duration: "2015 - 2019",
      descriptions: [
        "⚡ Courses Taken : Data Structures, Algorithms, DBMS, OS, CA, AI etc.",
        "⚡ Apart from this, I have done courses on Deep Learning, Data Science and Full Stack Development.",
      ],
      website_link: "https://www.annauniv.edu/",
    },
  ],
};

const certifications = {
  certifications: [
    {
      title: "Deep Learning Nanodegree",
      subtitle: "- Udacity",
      logo_path: "aws_facebookai_logo.png",
      certificate_link:
        "https://confirm.udacity.com/KGNC4KFP",
      alt_name: "Udacity",
      color_code: "#02B3E4",
    },
    {
      title: "Recommender Systems and Deep Learning in Python",
      subtitle: "- Udemy",
      logo_path: "udemy_logo.png",
      certificate_link:
        "https://ude.my/UC-2c264bae-b840-4b28-afb3-db1c58761357/",
      alt_name: "Udemy",
      color_code: "#0C9D5899",
    },
    {
      title: "Cluster Analysis and Unsupervised Machine Learning in Python",
      subtitle: "- Udemy",
      logo_path: "udemy_logo.png",
      certificate_link:
        "https://ude.my/UC-854cf59e-757d-4612-badf-cbf00117cb32",
      alt_name: "Udemy",
      color_code: "#0C9D5899",
    }
  ],
};

// Contact Page
const contactPageData = {
  contactSection: {
    title: "Contact Me",
    profile_image_path: "android-chrome-512x512.png",
    description:
      "Want to discuss about any project or just wanna say Hi?",
  },
  addressSection: {
    title: "Address",
    subtitle:
      "Sai Dharshan Apts, South Gangaiamman koil 2nd Street, Choolaimedu, Chennai-600094 ",
    avatar_image_path: "address_image.svg",
    location_map_link: "https://goo.gl/maps/N34TVpwA3pzqrArw8",
  },
  phoneSection: {
    title: "Phone Number",
    subtitle: "+91 9791141626",
  },
};

export {
  greeting,
  socialMediaLinks,
  skills,
  degrees,
  certifications,
  contactPageData
};