text:
// Generated by CoffeeScript 1.3.3

/*
HTML5 DateTime polyfill | Jonathan Stipe | https://github.com/jonstipe/datetime-polyfill
*/

(function() {

  (function($) {
    $.fn.inputDateTime = function() {
      var decrement, decrementDate, increment, incrementDate, makeDateDisplayString, makeDateTimeString, makeTimeDisplayString, readDateTime, stepNormalize;
      readDateTime = function(dt_str) {
        var dateObj, dayPart, hourPart, matchData, millisecondPart, minutePart, monthPart, secondPart, yearPart;
        if (/^\d{4,}-\d\d-\d\dT\d\d:\d\d(?:\:\d\d(?:\.\d+)?)?Z$/.test(dt_str)) {
          matchData = /^(\d+)-(\d+)-(\d+)T(\d+):(\d+)(?:\:(\d+)(?:\.(\d+))?)?Z$/.exec(dt_str);
          yearPart = parseInt(matchData[1], 10);
          monthPart = parseInt(matchData[2], 10);
          dayPart = parseInt(matchData[3], 10);
          hourPart = parseInt(matchData[4], 10);
          minutePart = parseInt(matchData[5], 10);
          secondPart = matchData[6] != null ? parseInt(matchData[6], 10) : 0;
          millisecondPart = matchData[7] != null ? matchData[7] : '0';
          while (millisecondPart.length < 3) {
            millisecondPart += '0';
          }
          if (millisecondPart.length > 3) {
            millisecondPart = millisecondPart.substring(0, 3);
          }
          millisecondPart = parseInt(millisecondPart, 10);
          dateObj = new Date();
          dateObj.setUTCFullYear(yearPart);
          dateObj.setUTCMonth(monthPart - 1);
          dateObj.setUTCDate(dayPart);
          dateObj.setUTCHours(hourPart);
          dateObj.setUTCMinutes(minutePart);
          dateObj.setUTCSeconds(secondPart);
          dateObj.setUTCMilliseconds(millisecondPart);
          return dateObj;
        } else {
          throw "Invalid datetime string: " + dt_str;
        }
      };
      makeDateTimeString = function(date_obj) {
        var dt_arr;
        dt_arr = [date_obj.getUTCFullYear().toString()];
        dt_arr.push('-');
        if (date_obj.getUTCMonth() < 9) {
          dt_arr.push('0');
        }
        dt_arr.push((date_obj.getUTCMonth() + 1).toString());
        dt_arr.push('-');
        if (date_obj.getUTCDate() < 10) {
          dt_arr.push('0');
        }
        dt_arr.push(date_obj.getUTCDate().toString());
        dt_arr.push('T');
        if (date_obj.getUTCHours() < 10) {
          dt_arr.push('0');
        }
        dt_arr.push(date_obj.getUTCHours().toString());
        dt_arr.push(':');
        if (date_obj.getUTCMinutes() < 10) {
          dt_arr.push('0');
        }
        dt_arr.push(date_obj.getUTCMinutes().toString());
        if (date_obj.getUTCSeconds() > 0 || date_obj.getUTCMilliseconds() > 0) {
          dt_arr.push(':');
          if (date_obj.getUTCSeconds() < 10) {
            dt_arr.push('0');
          }
          dt_arr.push(date_obj.getUTCSeconds().toString());
          if (date_obj.getUTCMilliseconds() > 0) {
            dt_arr.push('.');
            if (date_obj.getUTCMilliseconds() < 100) {
              dt_arr.push('0');
            }
            if (date_obj.getUTCMilliseconds() < 10) {
              dt_arr.push('0');
            }
            dt_arr.push(date_obj.getUTCMilliseconds().toString());
          }
        }
        dt_arr.push('Z');
        return dt_arr.join('');
      };
      makeDateDisplayString = function(date_obj, elem) {
        var $elem, date_arr, day_names, month_names;
        $elem = $(elem);
        day_names = $elem.datepicker("option", "dayNames");
        month_names = $elem.datepicker("option", "monthNames");
        date_arr = [day_names[date_obj.getUTCDay()]];
        date_arr.push(', ');
        date_arr.push(month_names[date_obj.getUTCMonth()]);
        date_arr.push(' ');
        date_arr.push(date_obj.getUTCDate().toString());
        date_arr.push(', ');
        date_arr.push(date_obj.getUTCFullYear().toString());
        return date_arr.join('');
      };
      makeTimeDisplayString = function(date_obj) {
        var ampm, time_arr;
        time_arr = new Array();
        if (date_obj.getUTCHours() === 0) {
          time_arr.push('12');
          ampm = 'AM';
        } else if (date_obj.getUTCHours() > 0 && date_obj.getUTCHours() < 10) {
          time_arr.push('0');
          time_arr.push(date_obj.getUTCHours().toString());
          ampm = 'AM';
        } else if (date_obj.getUTCHours() >= 10 && date_obj.getUTCHours() < 12) {
          time_arr.push(date_obj.getUTCHours().toString());
          ampm = 'AM';
        } else if (date_obj.getUTCHours() === 12) {
          time_arr.push('12');
          ampm = 'PM';
        } else if (date_obj.getUTCHours() > 12 && date_obj.getUTCHours() < 22) {
          time_arr.push('0');
          time_arr.push((date_obj.getUTCHours() - 12).toString());
          ampm = 'PM';
        } else if (date_obj.getUTCHours() >= 22) {
          time_arr.push((date_obj.getUTCHours() - 12).toString());
          ampm = 'PM';
        }
        time_arr.push(':');
        if (date_obj.getUTCMinutes() < 10) {
          time_arr.push('0');
        }
        time_arr.push(date_obj.getUTCMinutes().toString());
        time_arr.push(':');
        if (date_obj.getUTCSeconds() < 10) {
          time_arr.push('0');
        }
        time_arr.push(date_obj.getUTCSeconds().toString());
        if (date_obj.getUTCMilliseconds() > 0) {
          time_arr.push('.');
          if (date_obj.getUTCMilliseconds() % 100 === 0) {
            time_arr.push((date_obj.getUTCMilliseconds() / 100).toString());
          } else if (date_obj.getUTCMilliseconds() % 10 === 0) {
            time_arr.push('0');
            time_arr.push((date_obj.getUTCMilliseconds() / 10).toString());
          } else {
            if (date_obj.getUTCMilliseconds() < 100) {
              time_arr.push('0');
            }
            if (date_obj.getUTCMilliseconds() < 10) {
              time_arr.push('0');
            }
            time_arr.push(date_obj.getUTCMilliseconds().toString());
          }
        }
        time_arr.push(' ');
        time_arr.push(ampm);
        return time_arr.join('');
      };
      increment = function(hiddenField, dateBtn, timeField, calendarDiv) {
        var $hiddenField, max, step, value;
        $hiddenField = $(hiddenField);
        value = readDateTime($hiddenField.val());
        step = $hiddenField.data("step");
        max = $hiddenField.data("max");
        if (!(step != null) || step === 'any') {
          value.setUTCSeconds(value.getUTCSeconds() + 1);
        } else {
          value.setUTCSeconds(value.getUTCSeconds() + step);
        }
        if ((max != null) && value > max) {
          value.setTime(max.getTime());
        }
        $hiddenField.val(makeDateTimeString(value)).change();
        $(dateBtn).text(makeDateDisplayString(value, calendarDiv));
        $(timeField).val(makeTimeDisplayString(value));
        $(calendarDiv).datepicker("setDate", value);
        return null;
      };
      decrement = function(hiddenField, dateBtn, timeField, calendarDiv) {
        var $hiddenField, min, step, value;
        $hiddenField = $(hiddenField);
        value = readDateTime($hiddenField.val());
        step = $hiddenField.data("step");
        min = $hiddenField.data("min");
        if (!(step != null) || step === 'any') {
          value.setUTCSeconds(value.getUTCSeconds() - 1);
        } else {
          value.setUTCSeconds(value.getUTCSeconds() - step);
        }
        if ((min != null) && value < min) {
          value.setTime(min.getTime());
        }
        $hiddenField.val(makeDateTimeString(value)).change();
        $(dateBtn).text(makeDateDisplayString(value, calendarDiv));
        $(timeField).val(makeTimeDisplayString(value));
        $(calendarDiv).datepicker("setDate", value);
        return null;
      };
      incrementDate = function(hiddenField, dateBtn, timeField, calendarDiv) {
        var $hiddenField, max, step, value;
        $hiddenField = $(hiddenField);
        value = readDateTime($hiddenField.val());
        step = $hiddenField.data("step");
        max = $hiddenField.data("max");
        value.setUTCDate(value.getUTCDate() + 1);
        if ((max != null) && value > max) {
          value.setTime(max.getTime());
        }
        $hiddenField.val(makeDateTimeString(value)).change();
        $(dateBtn).text(makeDateDisplayString(value, calendarDiv));
        $(timeField).val(makeTimeDisplayString(value));
        $(calendarDiv).datepicker("setDate", value);
        return null;
      };
      decrementDate = function(hiddenField, dateBtn, timeField, calendarDiv) {
        var $hiddenField, min, step, value;
        $hiddenField = $(hiddenField);
        value = readDateTime($hiddenField.val());
        step = $hiddenField.data("step");
        min = $hiddenField.data("min");
        value.setUTCDate(value.getUTCDate() - 1);
        if ((min != null) && value < min) {
          value.setTime(min.getTime());
        }
        $hiddenField.val(makeDateTimeString(value)).change();
        $(dateBtn).text(makeDateDisplayString(value, calendarDiv));
        $(timeField).val(makeTimeDisplayString(value));
        $(calendarDiv).datepicker("setDate", value);
        return null;
      };
      stepNormalize = function(inDate, hiddenField) {
        var $hiddenField, kNum, max, min, minNum, raisedStep, step, stepDiff, stepDiff2;
        $hiddenField = $(hiddenField);
        step = $hiddenField.data("step");
        min = $hiddenField.data("min");
        max = $hiddenField.data("max");
        if ((step != null) && step !== 'any') {
          kNum = inDate.getTime();
          raisedStep = step * 1000;
          if (min == null) {
            min = new Date(0);
          }
          minNum = min.getTime();
          stepDiff = (kNum - minNum) % raisedStep;
          stepDiff2 = raisedStep - stepDiff;
          if (stepDiff === 0) {
            return inDate;
          } else {
            if (stepDiff > stepDiff2) {
              return new Date(inDate.getTime() + stepDiff2);
            } else {
              return new Date(inDate.getTime() - stepDiff);
            }
          }
        } else {
          return inDate;
        }
      };
      $(this).filter('input[type="datetime"]').each(function() {
        var $calendarContainer, $calendarDiv, $dateBtn, $hiddenField, $this, $timeField, btnContainer, calendarContainer, calendarDiv, className, closeFunc, dateBtn, downBtn, halfHeight, hiddenField, max, min, step, style, timeField, upBtn, value;
        $this = $(this);
        value = $this.attr('value');
        min = $this.attr('min');
        max = $this.attr('max');
        step = $this.attr('step');
        className = $this.attr('class');
        style = $this.attr('style');
        if ((value != null) && /^\d{4,}-\d\d-\d\dT\d\d:\d\d(?:\:\d\d(?:\.\d+)?)?Z$/.test(value)) {
          value = readDateTime(value);
        } else {
          value = new Date();
        }
        if (min != null) {
          min = readDateTime(min);
          if (value < min) {
            value.setTime(min.getTime());
          }
        }
        if (max != null) {
          max = readDateTime(max);
          if (value > max) {
            value.setTime(max.getTime());
          }
        }
        if ((step != null) && step !== 'any') {
          step = parseFloat(step);
        }
        hiddenField = document.createElement('input');
        $hiddenField = $(hiddenField);
        $hiddenField.attr({
          type: "hidden",
          name: $this.attr('name'),
          value: makeDateTimeString(value)
        });
        $hiddenField.data({
          min: min,
          max: max,
          step: step
        });
        value = stepNormalize(value, hiddenField);
        $hiddenField.attr('value', makeDateTimeString(value));
        calendarContainer = document.createElement('span');
        $calendarContainer = $(calendarContainer);
        if (className != null) {
          $calendarContainer.attr('class', className);
        }
        if (style != null) {
          $calendarContainer.attr('style', style);
        }
        calendarDiv = document.createElement('div');
        $calendarDiv = $(calendarDiv);
        $calendarDiv.css({
          display: 'none',
          position: 'absolute'
        });
        dateBtn = document.createElement('button');
        $dateBtn = $(dateBtn);
        $dateBtn.addClass('datetime-datepicker-button');
        timeField = document.createElement('input');
        $timeField = $(timeField);
        $timeField.attr({
          type: "text",
          value: makeTimeDisplayString(value),
          size: 14
        });
        $this.replaceWith(hiddenField);
        $dateBtn.appendTo(calendarContainer);
        $calendarDiv.appendTo(calendarContainer);
        $calendarContainer.insertAfter(hiddenField);
        $timeField.insertAfter(calendarContainer);
        halfHeight = ($timeField.outerHeight() / 2) + 'px';
        upBtn = document.createElement('div');
        $(upBtn).addClass('datetime-spin-btn datetime-spin-btn-up').css('height', halfHeight);
        downBtn = document.createElement('div');
        $(downBtn).addClass('datetime-spin-btn datetime-spin-btn-down').css('height', halfHeight);
        btnContainer = document.createElement('div');
        btnContainer.appendChild(upBtn);
        btnContainer.appendChild(downBtn);
        $(btnContainer).addClass('datetime-spin-btn-container').insertAfter(timeField);
        $calendarDiv.datepicker({
          dateFormat: 'MM dd, yy',
          showButtonPanel: true
        });
        $dateBtn.text(makeDateDisplayString(value, calendarDiv));
        if (min != null) {
          $calendarDiv.datepicker("option", "minDate", min);
        }
        if (max != null) {
          $calendarDiv.datepicker("option", "maxDate", max);
        }
        if (Modernizr.csstransitions) {
          calendarDiv.className = "datetime-calendar-dialog datetime-closed";
          $dateBtn.click(function(event) {
            $calendarDiv.off('transitionend oTransitionEnd webkitTransitionEnd MSTransitionEnd');
            calendarDiv.style.display = 'block';
            calendarDiv.className = "datetime-calendar-dialog datetime-open";
            event.preventDefault();
            return false;
          });
          closeFunc = function(event) {
            var transitionend_function;
            if (calendarDiv.className === "datetime-calendar-dialog datetime-open") {
              transitionend_function = function(event) {
                calendarDiv.style.display = 'none';
                $calendarDiv.off("transitionend oTransitionEnd webkitTransitionEnd MSTransitionEnd", transitionend_function);
                return null;
              };
              $calendarDiv.on("transitionend oTransitionEnd webkitTransitionEnd MSTransitionEnd", transitionend_function);
              calendarDiv.className = "datetime-calendar-dialog datetime-closed";
            }
            if (event != null) {
              event.preventDefault();
            }
            return null;
          };
        } else {
          $dateBtn.click(function(event) {
            $calendarDiv.fadeIn('fast');
            event.preventDefault();
            return false;
          });
          closeFunc = function(event) {
            $calendarDiv.fadeOut('fast');
            if (event != null) {
              event.preventDefault();
            }
            return null;
          };
        }
        $calendarDiv.mouseleave(closeFunc);
        $calendarDiv.datepicker("option", "onSelect", function(dateText, inst) {
          var dateObj, origDate;
          origDate = readDateTime($hiddenField.val());
          dateObj = $.datepicker.parseDate('MM dd, yy', dateText);
          dateObj.setUTCHours(origDate.getUTCHours());
          dateObj.setUTCMinutes(origDate.getUTCMinutes());
          dateObj.setUTCSeconds(origDate.getUTCSeconds());
          dateObj.setUTCMilliseconds(origDate.getUTCMilliseconds());
          if ((min != null) && dateObj < min) {
            dateObj.setTime(min.getTime());
          } else if ((max != null) && dateObj > max) {
            dateObj.setTime(max.getTime());
          }
          dateObj = stepNormalize(dateObj, hiddenField);
          $hiddenField.val(makeDateTimeString(dateObj)).change();
          $timeField.val(makeTimeDisplayString(dateObj));
          $dateBtn.text(makeDateDisplayString(dateObj, calendarDiv));
          closeFunc();
          return null;
        });
        $calendarDiv.datepicker("setDate", value);
        $dateBtn.on({
          DOMMouseScroll: function(event) {
            if (event.originalEvent.detail < 0) {
              incrementDate(hiddenField, dateBtn, timeField, calendarDiv);
            } else {
              decrementDate(hiddenField, dateBtn, timeField, calendarDiv);
            }
            event.preventDefault();
            return null;
          },
          mousewheel: function(event) {
            if (event.originalEvent.wheelDelta > 0) {
              incrementDate(hiddenField, dateBtn, timeField, calendarDiv);
            } else {
              decrementDate(hiddenField, dateBtn, timeField, calendarDiv);
            }
            event.preventDefault();
            return null;
          },
          keypress: function(event) {
            if (event.keyCode === 38) {
              incrementDate(hiddenField, dateBtn, timeField, calendarDiv);
              event.preventDefault();
            } else if (event.keyCode === 40) {
              decrementDate(hiddenField, dateBtn, timeField, calendarDiv);
              event.preventDefault();
            }
            return null;
          }
        });
        $timeField.on({
          DOMMouseScroll: function(event) {
            if (event.originalEvent.detail < 0) {
              increment(hiddenField, dateBtn, timeField, calendarDiv);
            } else {
              decrement(hiddenField, dateBtn, timeField, calendarDiv);
            }
            event.preventDefault();
            return null;
          },
          mousewheel: function(event) {
            if (event.originalEvent.wheelDelta > 0) {
              increment(hiddenField, dateBtn, timeField, calendarDiv);
            } else {
              decrement(hiddenField, dateBtn, timeField, calendarDiv);
            }
            event.preventDefault();
            return null;
          },
          keypress: function(event) {
            var _ref, _ref1;
            if (event.keyCode === 38) {
              increment(hiddenField, dateBtn, timeField, calendarDiv);
              event.preventDefault();
            } else if (event.keyCode === 40) {
              decrement(hiddenField, dateBtn, timeField, calendarDiv);
              event.preventDefault();
            } else if (((_ref = event.keyCode) !== 35 && _ref !== 36 && _ref !== 37 && _ref !== 39 && _ref !== 46) && ((_ref1 = event.which) !== 8 && _ref1 !== 9 && _ref1 !== 32 && _ref1 !== 45 && _ref1 !== 46 && _ref1 !== 47 && _ref1 !== 48 && _ref1 !== 49 && _ref1 !== 50 && _ref1 !== 51 && _ref1 !== 52 && _ref1 !== 53 && _ref1 !== 54 && _ref1 !== 55 && _ref1 !== 56 && _ref1 !== 57 && _ref1 !== 58 && _ref1 !== 65 && _ref1 !== 77 && _ref1 !== 80 && _ref1 !== 97 && _ref1 !== 109 && _ref1 !== 112)) {
              event.preventDefault();
            }
            return null;
          },
          change: function(event) {
            var ampm, dateObj, hours, matchData, milliseconds, minutes, seconds;
            $this = $(this);
            if (/^((?:1[0-2])|(?:0[1-9]))\:[0-5]\d(?:\:[0-5]\d(?:\.\d+)?)?\s[AaPp][Mm]$/.test($this.val())) {
              matchData = /^(\d\d):(\d\d)(?:\:(\d\d)(?:\.(\d+))?)?\s([AaPp][Mm])$/.exec($this.val());
              hours = parseInt(matchData[1], 10);
              minutes = parseInt(matchData[2], 10);
              seconds = parseInt(matchData[3], 10) || 0;
              milliseconds = matchData[4];
              if (milliseconds == null) {
                milliseconds = 0;
              } else if (milliseconds.length > 3) {
                milliseconds = parseInt(milliseconds.substring(0, 3), 10);
              } else if (milliseconds.length < 3) {
                while (milliseconds.length < 3) {
                  milliseconds += '0';
                }
                milliseconds = parseInt(milliseconds, 10);
              } else {
                milliseconds = parseInt(milliseconds, 10);
              }
              ampm = matchData[5].toUpperCase();
              dateObj = readDateTime($hiddenField.val());
              if (ampm === 'AM' && hours === 12) {
                hours = 0;
              } else if (ampm === 'PM' && hours !== 12) {
                hours += 12;
              }
              dateObj.setUTCHours(hours);
              dateObj.setUTCMinutes(minutes);
              dateObj.setUTCSeconds(seconds);
              dateObj.setUTCMilliseconds(milliseconds);
              if ((min != null) && dateObj < min) {
                $hiddenField.val(makeDateTimeString(min)).change();
                $this.val(makeTimeDisplayString(min));
              } else if ((max != null) && dateObj > max) {
                $hiddenField.val(makeDateTimeString(max)).change();
                $this.val(makeTimeDisplayString(max));
              } else {
                dateObj = stepNormalize(dateObj, hiddenField);
                $hiddenField.val(makeDateTimeString(dateObj)).change();
                $this.val(makeTimeDisplayString(dateObj));
              }
            } else {
              $this.val(makeTimeDisplayString(readDateTime($hiddenField.val())));
            }
            return null;
          }
        });
        $(upBtn).on("mousedown", function(event) {
          var releaseFunc, timeoutFunc;
          increment(hiddenField, dateBtn, timeField, calendarDiv);
          timeoutFunc = function(hiddenField, dateBtn, timeField, calendarDiv, incFunc) {
            incFunc(hiddenField, dateBtn, timeField, calendarDiv);
            $(timeField).data('timeoutID', window.setTimeout(timeoutFunc, 10, hiddenField, dateBtn, timeField, calendarDiv, incFunc));
            return null;
          };
          releaseFunc = function(event) {
            window.clearTimeout($(timeField).data('timeoutID'));
            $(document).off('mouseup', releaseFunc);
            $(upBtn).off('mouseleave', releaseFunc);
            return null;
          };
          $(document).on('mouseup', releaseFunc);
          $(upBtn).on('mouseleave', releaseFunc);
          $(timeField).data('timeoutID', window.setTimeout(timeoutFunc, 700, hiddenField, dateBtn, timeField, calendarDiv, increment));
          return null;
        });
        $(downBtn).on("mousedown", function(event) {
          var releaseFunc, timeoutFunc;
          decrement(hiddenField, dateBtn, timeField, calendarDiv);
          timeoutFunc = function(hiddenField, dateBtn, timeField, calendarDiv, decFunc) {
            decFunc(hiddenField, dateBtn, timeField, calendarDiv);
            $(timeField).data('timeoutID', window.setTimeout(timeoutFunc, 10, hiddenField, dateBtn, timeField, calendarDiv, decFunc));
            return null;
          };
          releaseFunc = function(event) {
            window.clearTimeout($(timeField).data('timeoutID'));
            $(document).off('mouseup', releaseFunc);
            $(downBtn).off('mouseleave', releaseFunc);
            return null;
          };
          $(document).on('mouseup', releaseFunc);
          $(downBtn).on('mouseleave', releaseFunc);
          $(timeField).data('timeoutID', window.setTimeout(timeoutFunc, 700, hiddenField, dateBtn, timeField, calendarDiv, decrement));
          return null;
        });
        return null;
      });
      return this;
    };
    $(function() {
      if (!Modernizr.inputtypes.datetime) {
        $('input[type="datetime"]').inputDateTime();
      }
      return null;
    });
    return null;
  })(jQuery);

}).call(this);


text:
'use strict';

/**
 * @ngdoc function
 * @name tmpyoApp.controller:MainCtrl
 * @description
 * # MainCtrl
 * Controller of the tmpyoApp
 */
angular.module('cookHttpApp')
  .controller('MainCtrl', function ($scope) {
    $scope.awesomeThings = [
      'HTML5 Boilerplate',
      'AngularJS',
      'Karma'
    ];
  });

redpajama_set_name: RedPajamaGithub


text:
package com.java110.dto.couponShopPoolDetail;

import com.java110.dto.PageDto;
import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName FloorDto
 * @Description 商家赠送记录数据层封装
 * @Author wuxw
 * @Date 2019/4/24 8:52
 * @Version 1.0
 * add by wuxw 2019/4/24
 **/
public class CouponShopPoolDetailDto extends PageDto implements Serializable {

    private String couponName;
private String actualPrice;
private String validityDay;
private String detailId;
private String sendCount;
private String userName;
private String createUserName;
private String spId;
private String userId;
private String createUserId;
private String poolId;
private String tel;
private String shopId;
private String orderId;

    private Date createTime;

    private String statusCd = "0";

    public String getCouponName() {
        return couponName;
    }
public void setCouponName(String couponName) {
        this.couponName = couponName;
    }
public String getActualPrice() {
        return actualPrice;
    }
public void setActualPrice(String actualPrice) {
        this.actualPrice = actualPrice;
    }
public String getValidityDay() {
        return validityDay;
    }
public void setValidityDay(String validityDay) {
        this.validityDay = validityDay;
    }
public String getDetailId() {
        return detailId;
    }
public void setDetailId(String detailId) {
        this.detailId = detailId;
    }
public String getSendCount() {
        return sendCount;
    }
public void setSendCount(String sendCount) {
        this.sendCount = sendCount;
    }
public String getUserName() {
        return userName;
    }
public void setUserName(String userName) {
        this.userName = userName;
    }
public String getSpId() {
        return spId;
    }
public void setSpId(String spId) {
        this.spId = spId;
    }
public String getUserId() {
        return userId;
    }
public void setUserId(String userId) {
        this.userId = userId;
    }
public String getPoolId() {
        return poolId;
    }
public void setPoolId(String poolId) {
        this.poolId = poolId;
    }
public String getTel() {
        return tel;
    }
public void setTel(String tel) {
        this.tel = tel;
    }
public String getShopId() {
        return shopId;
    }
public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getStatusCd() {
        return statusCd;
    }

    public void setStatusCd(String statusCd) {
        this.statusCd = statusCd;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }
}


text:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>A test project, for fun</title>
    <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic">
    <link rel="stylesheet" href="//fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="https://unpkg.com/vue-material/dist/vue-material.css">
  </head>
  <body>
    <div id="app">
      <navigation></navigation>
      <router-view></router-view>
    </div>
    <script src="build.js" charset="utf-8"></script>
  </body>
</html>


text:
<?xml version="1.0"?>

<!--
    Copyright 1996-2008 Ariba, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    $Id:  $
 -->

<project name="groovyloader" default="default">

    <description>
        AribaWeb Groovy integration
    </description>

    <property environment="env"/>
    <property name="aw.home" location="${env.AW_HOME}"/>

    <property name="javac.excludes" value="ariba/ui/demoshell/,ariba/ui/scratch/,ariba/util/"/>

    <import file="${aw.home}/tools/build-module.xml"/>

    <fileset id="module.libs2" dir="${lib-internal.dir}">
        <include name="groovy-all.jar"/>
    </fileset>
</project>


text:
A simple [Pastie.org](http://pastie.org)-like web application inspired by Nick Plante's [toopaste](https://github.com/zapnap/toopaste) project
showing how to use **RethinkDB as a backend for Sinatra applications**.

The app demos the following functionality:

*   Creating a new snippet (code highlighting included)
*   Retrieving a snippet
*   Listing snippets for a language

The app could be easily extended to provide more interesting features like:

*   pagination
*   snippet expiration

Fork it and send us a pull request.

# Complete stack #

*   [Sinatra](http://www.sinatrarb.com/)
*   [RethinkDB](http://www.rethinkdb.com)

# Installation #

```
git clone git://github.com/rethinkdb/rethinkdb-example-sinatra-pastie.git
cd rethinkdb-example-sinatra-pastie
bundle
```

_Note_: If you don't have RethinkDB installed, you can follow [these instructions to get it up and running](http://www.rethinkdb.com/docs/install/).

# Running the application #

Running a Sinatra app is as easy as:

```
rackup
```

# Credits #

* This sample app was inspired by Nick Plante's [toopaste](https://github.com/zapnap/toopaste) project.
* The snippets of code used for syntax highlighting are from Ryan Tomayko's [rocco.rb](https://github.com/rtomayko/rocco) project.
* Code highlighting in snippets is done using [Pygments](http://pygments.org) or the [Pygments web service](http://pygments.appspot.com/)
* The [Solarized dark Pygments stylesheet](https://gist.github.com/1573884) was created by Zameer Manji

# License #

This demo application is licensed under the [MIT license](http://opensource.org/licenses/mit-license.php).


text:
<TITLE>Review for Muzyka dlya dekabrya (1995)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Muzyka dlya dekabrya (1995)

reviewed by
Felix Kreisel

                           Three Russian Films
                       Film reviews by F. Kreisel
                        Copyright 1995 F. Kreisel

     The recently concluded ten-day-long Montreal Film Festival paid
special attention to Israeli, Latin American and Canadian films.
However, a number of recent Russian films were presented as well.  This
writer was able to see three of these films and here are my
impressions.  Preceding my analyses I have included the official
capsule descriptions provided by the Festival organizers.  But let us
look at the movies....

*        *        *        *        *        *        *        *        *
MUZYKA DLIA DEKABRIA -- MUSIC FOR DECEMBER
Director: Ivan Dukhovichny

     "Alexander Larin, a famous artist, a former Soviet citizen,
returns to Russia from the United States.  He comes to see Masha
Bersenieva, a beautiful young woman whom he knew when she was a child.
At the time he was going to marry her mother Anna, but when he found
himself falling in love with the daughter, Larin became afraid of the
consequences and he left them both.  Six years have passed since then.
Anna has married a rich businessman and Masha is engaged.  Larin's
sudden appearance upsets the stability of the women's lives.  Larin's
visit is a hopeless attempt to return to a country which no longer
exists, to love which has vanished.  The past overtakes him as
punishment.  Six years earlier Larin betrayed not so much his love as
himself.  In contrast to Larin is Mitia, Masha's fiance, who is
forthright about his feelings and has no intention of abandoning his
values and principles."

     The story begins with the landing of a foreign airliner in the
St. Petersburg airport.  A Russian painter who had settled in the US a
few years ago arrives back home to a changed and renamed Leningrad.  We
see nothing much of the city, what we see of it appears empty, run
down, uninhabited.  Two small boys beg the new arrival for a dollar and
scornfully reject rubles.  Telephones are vandalized.

     The action centers on an artistically inclined family living in a
huge mansion on the banks of the Neva river.  How did they manage to
occupy this large building?  What happened to its former tenants?  How
does this family make a living?  What do they do all day besides
smoking, drinking vodka and quarreling in front of the TV?  Good
questions all, but the answers are left to the viewer's imagination.

     The slim, attractive forty-something mother is excited that her
former lover has come back and something will change in her
chain-smoking, soul-searching-and-not-finding-anything existence.  Her
beautiful daughter is about to marry an art photographer, a very nice,
sensitive and gifted boy.  The mother has a husband, a businessman of
the new type: a Mafia kingpin who controls half the city, a ruthless
trader and a player of Russian roulette, just as ready to put a murder
contract out on someone as to shoot himself.  He seems to be the
provider of the house, the source of wealth, power, money, contacts,
servants, caviar, passports, plane tickets abroad, subsidies for the
young photographer and so on.

     Without going into the whole story we should immediately note that
normal working people are absent with a few exceptions: waiters,
bartenders, bodyguards and the above mentioned street urchins.  The
only social or political comment comes from the mouth of the
Godfather's second in command.  This fine fellow is a fascist
nationalist who wants to kick all the liberals out and to set up a
"strong" regime which will bring order.

     The movie ends with a couple of killings, a suicide and a case of
madness.  The final scene is of the same plane taking off from Russia
and flying to that other planet -- the Golden West.  One final note:
the main actor who played the part of Larin, the Russian-American
painter, has in real life already abandoned Mother Russia and settled
in Montreal, Canada.

     Needless to say, a flat plot like this brought out the worst in
all of the actors: they are without exception wooden mannequins, mere
shadows and caricatures of people.  They are totally unreal and
unbelievable.  A wise viewer will avoid this film.

MANIA GISELI -- GISELE'S MANIA
Director: Alexei Uchitel

"The spectacular life and career of Russian ballerina Olga Spesivtseva,
who died from dementia in New York in 1991 at the age of 96, is
recounted in this film not as a biography but as a chronicle of her
love affairs, particularly with the ballet GISELLE.  GISELLE
immortalized her life and GISELLE destroyed her life.  The mysterious
relationships between talent and madness, between creativity and
obsession, between freedom and fate are explored in a film that is
part drama, part detective story and part elegy on the power of love."

     This is a complicated story within a story.  In the present Russia
a couple of ballet dancers entertain the vodka swilling and cocaine
sniffing clientele of an exclusive garden night club.  Somehow the
story turns into a tale of a great Russian ballerina, Olga
Spesivtseva.  We meet her as a young hopeful at the St.  Petersburg
ballet school before the outbreak of World War I.  She gets her big
break when an aging ballet critic notices her pas de plies.  Olga
sleeps with the critic and becomes a star.  After the Revolution and
the Civil War she abandons the critic and, attracted by the new power
elite, sleeps with Lev Kamenev's assistant, a young Chekist.  Then she
emigrates to Paris, charms the pants off a few ballet aficionados, is
rejected by a gay dancer and meets a rich American ballet lover.  In
1932 she is filmed in the role of Giselle and critics rave about the
reality of Gisele's madness.

     All around her men become miserable: the critic has to go back to
his ugly wife; Kamenev's assistant is shot by the GPU; the gay dancer
doesn't get to be in the movie and turns out not to be gay at all; the
rich American financier turns out to be in the employ of the Soviet
secret police and is killed as well.  Spesivtseva eventually goes mad
and is shut up in a New York insane asylum.

     Back in today's Russia the new ballerina, who may be the
reincarnation of Spesivtseva, is also going crazy.  Does anyone care?

     Out of all the theatrical forms of art ballet has always been the
most abstract, elitist and remote from the masses of people.  While it
is physically demanding of the actor, it is also most corruptive.  As
Olga Spesivtseva says about herself and her colleagues:  "We always
sleep with the rich and the mighty."  The Imperial Russian ballet had
provided bedmates for the tsarist ministers and governors; the great
Soviet ballets supplied courtesans for the Politburo.  Today, the
Russian ballet troupes hardly ever perform in Russia; the mighty dollar
and D-mark buy nights of pleasure with the dancer-prostitutes (male and
female); the extensive preparatory schools for young dancers are
withering away and there will be no new Ulanovas, Plisetskaias and
Nureyevs.

MUSULMANIN -- A MOSLEM
Director Vladimir Khotinenko

     "When he went to fight for his country, Ivanov was a hero.  Now
that he has returned from seven years as a prisoner of war in
Afghanistan--"from the other world"--his family and his village are
not so sure.  The Afghan war veteran has returned as a Moslem.  A
devout Moslem to boot.  He has his rug, prays towards Mecca five times
a day and mutters "Allah Akhbar."  He no longer drinks, smokes or
touches girls.  And, worst of all, he won't steal.  "Son," his mother
cries, "do you think we don't know that to steal is wrong?  ...  But
stealing from the state, that is how we survive!" Some of the villagers
secretly sympathize with the boy, but theirs is a very insular society
and the world of Islam is threatening.  Ivanov is no longer a hometown
boy, he's a stranger--a "Moslem"--and the threat has come home."

     This film was introduced at the festival by the director and the
producer.  Speaking poor English they wanted to say one thing: they are
dedicated to Russia, they are not about to leave it and emigrate.

     Many things set this film apart from the rest.  It is set in the
country, not in any city (actually in the region of Riazan'); it is
filmed mainly outdoors, not inside a bar, a house or a theatre.  It
celebrates Nature; it contrasts the clean, healthy beauty of the river
and the rolling green meadows with the ugly, stultifying social
relationships predominating in this and in many other villages of
Russia.

     The main personages, Ivanov and his mother are set before us with
sympathy and love.  The young man is struggling to understand his place
in the Universe; the Moslem God is for him a set of ethics, a guide to
his relationship with his family, his neighbors and the rest of
humanity.  Ivanov tenaciously clings to the Moslem prayers he learned
in the far off mountain village in Afghanistan from his adopted
grandfather who rescued him from a firing squad.

     Ivanov's mother is like everybody's mother, working to provide for
her family, always worrying about her children, her home.  The elder
son is a drunken lout, disgusting in his crude laziness and anger,
stealing the family's valuables to buy a bottle of vodka, dangerous
when frightened by something incomprehensible, like his younger
brother's religion.  The brothers fight and the home situation turns
murderously ugly.  There is a moment in the movie, when the mother
tearfully tells her beloved younger son that he must leave home to
prevent a tragedy.  She loves him, but the elder son, the lazy, no good
drunkard needs her more.  This scene shattered me with its reality and
truth.

     The movie's portrayal of the economic and social changes is
commendable, although incomplete.  The story alludes to the ongoing
shady machinations of the local leadership.  Apparently the collective
farm of the Soviet days survives and everyone still works half
heartedly in the communal fields and still steals whole heartedly for
the private cow and for the tiny garden plot.  But now, some land deals
are being hatched behind the backs of the villagers.  The director of
the farm is still running things in a heavy hand, but he has left the
"Communist" Party and instead of a red Party card he now boasts a gold
Orthodox cross.  He drives around in a car and even flies in an army
helicopter.  He receives a million dollars for selling something, we
are not quite sure what.

     Alas, in today's Russia there are no happy tales to tell, so this
movie also ends in a tragedy.  The directors are too honest to pretend
that some set of circumstances, some economic factors or even some God,
Moslem or Orthodox, will change the situation for the better.  It is up
to us to consider: What is to be done?

     If, which seems unlikely in view of the monopolization of American
cinema by Hollywood shlock, this movie does appear in the United
States, it should not be missed.

Some general conclusions.

     In general, the Russian cinema, like the rest of national culture
is in a period of sharp decline.  The number of films produced is down
because the industry is no longer subsidized by the state as in the
past.  The budgetary considerations lead the directors to eliminate or
minimize the more expensive production features like street scenes, car
chases, location shoots, etc.  The process of talent drain, similar to
the brain drain in science and engineering, is depleting the industry
as the more talented actors, technicians and directors migrate to the
West or to more lucrative pursuits.

     We should also consider the ideological void of today's
post-Soviet society.  The illusions, which dominated among the artistic
strata of the Soviet Union a few years ago have dissipated.  Five or
ten years ago these elements believed that the dismantling of
centralized planning and the introduction of the regime of the
bourgeois market will rapidly reward them with prosperous and secure
life-styles (the "Dallas" and "Santa Barbara" syndrome).  Instead, the
"free professions" have today all but disappeared.  The great literary
and scientific journals have closed, the institutes are dying of
hyperinflation, the medical professionals (with the exception of those
few serving the government and business Mafia) are underpaid, deprived
of basic supplies and overwhelmed with the effects of the general
social and medical catastrophes.  This week's public teachers' strikes
illustrate the desperate state of the educated layers.

     Another factor to consider: who is funding these movies?  It is a
fact that the producers and the directors must go hat in hand to the
Mafia kingpins begging them for donations to produce the next film.
One does not, of course, bite the hand that feeds him.  Hence, instead
of painting a true picture of reality, we get evasions, half-truths,
escapes into the past, etc.  Films today do not attract the public;
from what we saw at the Festival, with reason.  A recent article in the
well known illustrated weekly Ogonyek decried the fact that Russian
films are produced primarily for the various festivals, mostly foreign,
while the public is treated to a steady diet of second rate Western
shoot-em-ups and TV fantasies about the lives of the rich and famous.

     The reality of Russian capitalism is shocking beyond belief; it
should call for an explosion of literary and cinematic indignation.
Why does not a new Saltykov-Schedrin satirize the Prime Minister
Chernomyrdin for his numerous stock portfolios?  Why does not a new
Gogol cut into President Yeltsin, drunk both with power and with vodka?
A young Gorky should be telling the stories of the current lower
depths, for example the ghoulish fact that in Moscow thousands of
elderly pensioners were murdered in the past couple of years in order
to steal their apartments.  A new Lev Tolstoy should be painting the
dramas of the social disaster overwhelming every layer of society.

     Similarly in film.  The young Soviet cinema of the 1920's, which
gave us the docudrama of Eisenstein's Potemkin and the intense
breathtaking realism of Dziga Vertov, was animated by deep optimism.
Eisenstein, Vertov, Pudovkin and others believed in the future, in
their ability to affect changes, in the perfectibility of both society
and Man.  Today's cinema is permeated, on the contrary, by deep
pessimism, tempered only by opportunistic mysticism.

     The Russian filmmakers, as well as writers, poets, musicians,
artists, etc. are unwilling to look squarely at the developing
capitalist reality because, hampered as they are by the fatal
identification of Stalinism with socialism, they see no alternative to
it.

--
Iskra Research -- Historical research and publication of Marxist
classics in the Russian language.
e-mail: 72633.3207@CompuServe.com
http://www.mit.edu:8001/afs/athena.mit.edu/user/f/j/fjk/Public/iskra.html

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
import { AiService } from 'app/shared/services/ai.service';
import { Injectable } from '@angular/core';
import { Url } from 'app/shared/Utilities/url';

export enum LogLevel {
    error,
    warning,
    debug,
    verbose
}

export type LogLevelString = 'error' | 'warning' | 'debug' | 'verbose';

@Injectable()
export class LogService {

    private _logLevel: LogLevel;
    private _categories: string[];

    constructor(private _aiService: AiService) {
        const levelStr = Url.getParameterByName(null, 'appsvc.log.level');

        if (levelStr) {
            try {
                this._logLevel = LogLevel[levelStr];
            } catch (e) {
                this._logLevel = LogLevel.warning;
            }
        } else {
            this._logLevel = LogLevel.warning;
        }

        this._categories = Url.getParameterArrayByName(null, 'appsvc.log.category');
    }

    public error(category: string, id: string, data: any) {
        if (!category || !id || !data) {
            throw Error('You must provide a category, id, and data');
        }

        const errorId = `/errors/${category}/${id}`;

        // Always log errors to App Insights
        this._aiService.trackEvent(errorId, data);

        if (this._shouldLog(category, LogLevel.error)) {
            console.error(`[${category}] - ${data}`);
        }
    }

    public warn(category: string, id: string, data: any) {
        if (!category || !id || !data) {
            throw Error('You must provide a category, id, and data');
        }

        const warningId = `/warnings/${category}/${id}`;

        // Always log warnings to App Insights
        this._aiService.trackEvent(warningId, data);

        if (this._shouldLog(category, LogLevel.warning)) {
            console.log(`%c[${category}] - ${data}`, 'color: #ff8c00');
        }
    }

    public debug(category: string, data: any) {
        if (!category || !data) {
            throw Error('You must provide a category and data');
        }

        if (this._shouldLog(category, LogLevel.debug)) {
            console.log(`${this._getTime()} %c[${category}] - ${data}`, 'color: #0058ad');
        }
    }

    public verbose(category: string, data: any) {
        if (!category || !data) {
            throw Error('You must provide a category and data');
        }

        if (this._shouldLog(category, LogLevel.verbose)) {
            console.log(`${this._getTime()} [${category}] - ${data}`);
        }
    }

    public log(level: LogLevel, category: string, data: any, id?: string){
        if(!id && (level === LogLevel.error || level === LogLevel.warning)){
            throw Error('Error and Warning log levels require an id');
        }

        if(level === LogLevel.error){
            this.error(category, id, data);
        } else if(level === LogLevel.warning){
            this.warn(category, id, data);
        } else if(level === LogLevel.debug){
            this.debug(category, data);
        } else{
            this.verbose(category, data);
        }
    }

    private _shouldLog(category: string, logLevel: LogLevel) {

        if (logLevel <= this._logLevel) {
            if (this._categories.length > 0 && this._categories.find(c => c.toLowerCase() === category.toLowerCase())) {
                return true;
            } else if (this._categories.length === 0) {
                return true;
            } else {
                return false;
            }
        }

        return false;
    }

    private _getTime(){
        const now = new Date();
        return now.toISOString();
    }
}


text:
#ifndef WebSelector_h
#define WebSelector_h

#include "../platform/WebCommon.h"

namespace blink {

class WebString;

// Terminology from http://dev.w3.org/csswg/selectors4/#structure.
enum WebSelectorType {
  WebSelectorTypeComplex,
  WebSelectorTypeCompound,
  // Not yet implemented:
  // SelectorTypeSimple,
};

// Returns the value that would be returned from CSSStyleRule.selectorText in
// the CSSOM for a rule with this selector (which can be a list), if the
// selector is valid and each component in the list has the type specified in
// |restriction|.
// Returns "" for an invalid selector or a selector that doesn't match the
// restrictions.
// The canonical form is not guaranteed to stay the same over time.
BLINK_EXPORT WebString
canonicalizeSelector(WebString selector,
                     WebSelectorType restriction = WebSelectorTypeComplex);

}  // namespace blink

#endif


text:
With Microsoft Azure Mobile Apps you can add a scalable backend to your connected client applications in minutes. To learn more, visit our [Developer Center](http://azure.microsoft.com/en-us/develop/mobile).

## Getting Started

If you are new to Mobile Services, you can get started by following our tutorials for connecting your Mobile
Services cloud backend to [Android apps](http://azure.microsoft.com/en-us/documentation/articles/mobile-services-android-get-started/).

## Supported Platforms

The current release of the Android SDK for Azure Mobile Apps supports:

* Android releases for API 19 through 26 (KitKat through Oreo)

Other platforms may work, but have not been tested.

## Version Information

There are two major versions of this SDK:

- SDK v2.x.x is used with Azure Mobile Services.
- SDK v3.x.x is used with Azure App Service / Azure Mobile Apps.

Please ensure you are using the right SDK version that matches your backend cloud service.

## Download Source Code

To get the source code of our SDKs and samples via **git** just type:

    git clone https://github.com/Azure/azure-mobile-apps-android-client.git
    cd ./azure-mobile-apps-android-client/

## Reference Documentation
- [Reference documentation (Java docs)](http://azure.github.io/azure-mobile-apps-android-client/)
- [Change Log](CHANGELOG.md)

## Android SDK
Microsoft Azure Mobile Services can be used with an Android-based device using our Android SDK. You can get the Android SDK in one of the following two ways or you can download the source code using the instructions above.

1. For an Android studio project, add the line `compile 'com.microsoft.azure:azure-mobile-android:3.5.1@aar'` to the app's Gradle.build file with your desired SDK version plugged in (you can find the latest versions [here](https://go.microsoft.com/fwLink/?LinkID=525472&clcid=0x409)):
2. Eclipse users can [download the Android SDK](http://go.microsoft.com/fwlink/?LinkID=717033&clcid=0x409) directly or can download the source code using the instructions above.

### Prerequisites
The SDK requires Android Studio.

### Building and Referencing the SDK
1. Open the folder `\azure-mobile-apps-android-client\sdk` using the option `Open an existing Android Studio Project` in Android Studio.
2. Project should be built automatically, In case it does not build, Right click on `sdk` folder and select `Make Module 'sdk'`.
3. The file `sdk-release.aar` should be present at `\azure-mobile-apps-android-client\sdk\src\sdk\build\outputs\aar`.
4. Rename the file `sdk-release.aar` to `sdk-release.zip`.
5. Extract the zip file, `classes.jar` should be present in the root folder.

### Running the Tests

The SDK has a suite of unit tests that you can easily run.

1. Open the folder `\azure-mobile-apps-android-client\sdk` using the option `Open an existing Android Studio Project` in Android Studio.
2. Project should be built automatically, In case it does not build, Right click on `sdk` folder and select `Make Module 'sdk.testapp'`.
3. Expand `sdk.testapp` and sub folder `java`.
4. Right click on `com.microsoft.windowsazure.mobileservices.sdk.testapp`, Select `Run`, Select `Tests in com.microsoft.windowsazure.mobileservices.sdk.testapp` (with Android tests icon).

## Future of Azure Mobile Apps

Microsoft is committed to fully supporting Azure Mobile Apps, including **support for the latest OS release, bug fixes, documentation improvements, and community PR reviews**. Please note that the product team is **not currently investing in any new feature work** for Azure Mobile Apps. We highly appreciate community contributions to all areas of Azure Mobile Apps.

## Useful Resources

* [Quickstarts](https://github.com/Azure/azure-mobile-services-quickstarts)
* [Samples](https://github.com/Azure/mobile-services-samples)
* Tutorials and product overview are available at [Microsoft Azure Mobile Services Developer Center](http://azure.microsoft.com/en-us/develop/mobile).
* Our product team actively monitors the [Mobile Services Developer Forum](http://social.msdn.microsoft.com/Forums/en-US/azuremobile/) to assist you with any troubles.

## Contribute Code or Provide Feedback

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://azure.github.com/guidelines.html).

If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/Azure/azure-mobile-apps-android-client/issues) section of the project.


text:
namespace moui {

void nvgClearColor(NVGcontext* context, const int width, const int height,
                   const NVGcolor& clear_color) {
#ifdef MOUI_GL
  const float kAlpha = static_cast<float>(clear_color.a);
  const float kRed = static_cast<float>(clear_color.r) * kAlpha;
  const float kGreen = static_cast<float>(clear_color.g) * kAlpha;
  const float kBlue = static_cast<float>(clear_color.b) * kAlpha;
  glViewport(0, 0, width, height);
  glClearColor(kRed, kGreen, kBlue, kAlpha);
  glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
#elif MOUI_METAL
  mnvgClearWithColor(context, clear_color);
#endif
}

bool nvgCompareColor(const NVGcolor& color1, const NVGcolor& color2) {
  return color1.r == color2.r && color1.g == color2.g && \
         color1.b == color2.b && color1.a == color2.a;
}

int nvgContextFlags(const bool antialias, const bool stencil_strokes,
                    const int number_of_buffers) {
  int flags = 0;
  if (antialias)
    flags |= NVG_ANTIALIAS;
  if (stencil_strokes)
    flags |= NVG_STENCIL_STROKES;
#ifdef MOUI_METAL
  if (number_of_buffers >= 3)
    flags |= NVG_TRIPLE_BUFFER;
  else if (number_of_buffers == 2)
    flags |= NVG_DOUBLE_BUFFER;
#endif
  return flags;
}

int nvgCreateFontAtPath(NVGcontext* context, const std::string name,
                        const std::string path) {
#ifdef MOUI_ANDROID
  // Loads the image from Android's assets folder.
  std::FILE* file = aasset_fopen(path.c_str(), "r");
  if (file == NULL) {
    return -1;
  }
  const int kDataSize = aasset_fsize(file);
  unsigned char* data = \
      reinterpret_cast<unsigned char*>(std::malloc(kDataSize));
  int font = -1;
  if (aasset_fread(data, 1, kDataSize, file) == kDataSize) {
    font = nvgCreateFontMem(context, name.c_str(), data, kDataSize,
                             true);  // frees data
  }
  aasset_fclose(file);
  return font;
#endif  // MOUI_ANDROID

  return nvgCreateFont(context, name.c_str(), path.c_str());
}

int nvgCreateImageAtPath(NVGcontext* context, const std::string path,
                         const int image_flags) {
#ifdef MOUI_ANDROID
  // Loads the image from Android's assets folder.
  std::FILE* file = aasset_fopen(path.c_str(), "r");
  if (file == NULL) {
    return -1;
  }
  const int kDataSize = aasset_fsize(file);
  unsigned char data[kDataSize];
  int image = -1;
  if (aasset_fread(data, 1, kDataSize, file) == kDataSize) {
    image = nvgCreateImageMem(context, image_flags, data, kDataSize);
  }
  aasset_fclose(file);
  return image;
#endif  // MOUI_ANDROID

  return nvgCreateImage(context, path.c_str(), image_flags);
}

int nvgCreateImageFromPixels(NVGcontext* context, const int width,
                             const int height, const int image_flags,
                             const unsigned char* data) {
  int flags = image_flags | NVG_IMAGE_PREMULTIPLIED;
#ifdef MOUI_GL
  flags |= NVG_IMAGE_FLIPY;
#endif  // MOUI_GL
  return nvgCreateImageRGBA(context, width, height, flags, data);
}

void nvgDeleteImage(NVGcontext* context, int* image) {
  if (*image < 0)
    return;

  nvgDeleteImage(context, *image);
  *image = -1;
}

void nvgDrawDropShadow(NVGcontext* context, const float x, const float y,
                       const float width, const float height,
                       const float radius, float feather,
                       const NVGcolor inner_color,
                       const NVGcolor outer_color) {
  const NVGpaint kShadowPaint = nvgBoxGradient(context, x, y, width, height,
                                               radius, feather, inner_color,
                                               outer_color);
  nvgBeginPath(context);
  nvgRect(context, x - feather, y - feather, width + feather * 2,
          height + feather * 2);
  nvgFillPaint(context, kShadowPaint);
  nvgFill(context);
}

void nvgReadPixels(NVGcontext* context, int image, int x, int y, int width,
                   int height, void* data) {
#if defined(MOUI_GL)
  glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data);
#elif defined(MOUI_METAL)
  mnvgReadPixels(context, image, x, y, width, height, data);
#endif
}

void nvgUnpremultiplyImageAlpha(unsigned char* image, const int width,
                                const int height) {
  const int kStride = width * 4;

  // Unpremultiply.
  for (int y = 0; y < height; y++) {
    unsigned char *row = &image[y * kStride];
    for (int x = 0; x < width; x++) {
      const int kRed = row[0], kGreen = row[1], kBlue = row[2], kAlpha = row[3];
      if (kAlpha != 0) {
        row[0] = static_cast<int>(std::min(kRed * 255 / kAlpha, 255));
        row[1] = static_cast<int>(std::min(kGreen * 255 / kAlpha, 255));
        row[2] = static_cast<int>(std::min(kBlue * 255 / kAlpha, 255));
      }
      row += 4;
    }
  }

  // Defringe.
  for (int y = 0; y < height; y++) {
    unsigned char *row = &image[y * kStride];
    for (int x = 0; x < width; x++) {
      const int kAlpha = row[3];
      int red = 0, green = 0, blue = 0, n = 0;
      if (kAlpha == 0) {
        if (x-1 > 0 && row[-1] != 0) {
          red += row[-4];
          green += row[-3];
          blue += row[-2];
          n++;
        }
        if (x + 1 < width && row[7] != 0) {
          red += row[4];
          green += row[5];
          blue += row[6];
          n++;
        }
        if (y - 1 > 0 && row[-kStride + 3] != 0) {
          red += row[-kStride];
          green += row[-kStride + 1];
          blue += row[-kStride + 2];
          n++;
        }
        if (y + 1 < height && row[kStride + 3] != 0) {
          red += row[kStride];
          green += row[kStride + 1];
          blue += row[kStride + 2];
          n++;
        }
        if (n > 0) {
          row[0] = red / n;
          row[1] = green / n;
          row[2] = blue / n;
        }
      }
      row += 4;
    }
  }
}

}  // namespace moui


text:
import { useSiteStore } from 'context/SiteContext'

function DashboardCreateData() {
  const { site } = useSiteStore()

  const tileContent = [
    {
      icon: 'Word',
      name: 'Create a Word',
      description: 'Add a new word to your dictionary',
      href: 'word',
      iconColor: 'wordText',
      auth: 'SuperAdmin',
    },
    {
      icon: 'Phrase',
      name: 'Create a Phrase',
      description: 'Add a new phrase to your dictionary',
      href: 'phrase',
      iconColor: 'phraseText',
      auth: 'SuperAdmin',
    },
    {
      icon: 'Widget',
      name: 'Create a Widget',
      description: "Add a new Widget to your site's collection",
      href: 'widget',
      iconColor: 'wordText',
      auth: 'RecorderWithApproval',
    },
    {
      icon: 'WebPages',
      name: 'Create a Custom Page',
      description: 'Add a new page to your site',
      href: 'page',
      iconColor: 'wordText',
      auth: 'Admin',
    },
    {
      icon: 'Category',
      name: 'Add a Category',
      description: 'Add a new category to your dictionary',
      href: 'category',
      iconColor: 'wordText',
      auth: 'SuperAdmin',
    },
    {
      icon: 'Speak',
      name: 'Add a Speaker',
      description: 'Add a new speaker to your site',
      href: 'speaker',
      iconColor: 'wordText',
      auth: 'SuperAdmin',
    },
    {
      icon: 'Story',
      name: 'Create a Story',
      description: 'Add a new story to your site',
      href: 'story',
      iconColor: 'storyText',
      auth: 'SuperAdmin',
    },
  ]
  const headerContent = {
    title: 'Create',
    subtitle: 'Create new items for your site.',
    icon: 'Add',
  }

  return {
    headerContent,
    site,
    tileContent,
  }
}

export default DashboardCreateData


text:
This chapter will be dedicated to exploring every aspect of a running Redox system, in gruesome detail.

We will start with the boot system, continuing to the shell and command-line utilities, moving on to the GUI, all while explaining where things happen, and how to change them.

Redox is meant to be an *insanely* customizable system, allowing a user to tear it down to a very small command-line distro, or build it up to a full desktop environment with ease.

- [Boot Process](./ch03-02-boot-process.md)
- [Shell](./ch03-03-shell.md)
- [GUI](./ch03-04-gui.md)


text:
import {CSS} from '../../../build/amp-sidebar-0.1.css';
import {Layout} from '../../../src/layout';
import {dev, user} from '../../../src/log';
import {isExperimentOn} from '../../../src/experiments';
import {platform} from '../../../src/platform';
import {setStyles} from '../../../src/style';
import {vsyncFor} from '../../../src/vsync';
import {timer} from '../../../src/timer';

/** @const */
const EXPERIMENT = 'amp-sidebar';

/** @const */
const TAG = 'amp-sidebar';

/** @const */
const ANIMATION_TIMEOUT = 550;

/** @const */
const IOS_SAFARI_BOTTOMBAR_HEIGHT = '10vh';

/** @const */
const WHITELIST_ = ['AMP-ACCORDION', 'AMP-FIT-TEXT', 'AMP-IMG'];

export class AmpSidebar extends AMP.BaseElement {
  /** @override */
  isLayoutSupported(layout) {
    return layout == Layout.NOLAYOUT;
  }

  /** @override */
  isReadyToBuild() {
    return false;
  }

  /** @override */
  buildCallback() {
    /** @const @private {boolean} */
    this.isExperimentOn_ = isExperimentOn(this.getWin(), EXPERIMENT);

    /** @private @const {!Window} */
    this.win_ = this.getWin();

    /** @private @const {!Document} */
    this.document_ = this.win_.document;

    /** @private @const {!Element} */
    this.documentElement_ = this.document_.documentElement;

    /** @private @const {string} */
    this.side_ = this.element.getAttribute('side');

    /** @private @const {!Viewport} */
    this.viewport_ = this.getViewport();

    /** @private @const {!Element} */
    this.maskElement_ = false;

    /** @const @private {!Vsync} */
    this.vsync_ = vsyncFor(this.win_);

    /** @private @const {boolean} */
    this.isIosSafari_ = platform.isIos() && platform.isSafari();

    /** @private {boolean} */
    this.bottomBarCompensated_ = false;

    if (!this.isExperimentOn_) {
      dev.warn(TAG, `Experiment ${EXPERIMENT} disabled`);
      return;
    }

    this.checkWhitelist_();

    if (this.side_ != 'left' && this.side_ != 'right') {
      const pageDir =
          this.document_.body.getAttribute('dir') ||
          this.documentElement_.getAttribute('dir') ||
          'ltr';
      this.side_ = (pageDir == 'rtl') ? 'right' : 'left';
      this.element.setAttribute('side', this.side_);
    }

    if (this.isIosSafari_) {
      this.fixIosElasticScrollLeak_();
    }

    if (this.isOpen_()) {
      this.open_();
    } else {
      this.element.setAttribute('aria-hidden', 'true');
    }

    this.documentElement_.addEventListener('keydown', event => {
      // Close sidebar on ESC.
      if (event.keyCode == 27) {
        this.close_();
      }
    });
    //TODO (skrish, #2712) Add history support on back button.
    this.registerAction('toggle', this.toggle_.bind(this));
    this.registerAction('open', this.open_.bind(this));
    this.registerAction('close', this.close_.bind(this));
  }

 /**
  * Returns true if the sidebar is opened.
  * @returns {boolean}
  * @private
  */
 isOpen_() {
   return this.element.hasAttribute('open');
 }

  /** @override */
  activate() {
    this.open_();
  }

  /**
   * Toggles the open/close state of the sidebar.
   * @private
   */
  toggle_() {
    if (this.isOpen_()) {
      this.close_();
    } else {
      this.open_();
    }
  }

  /**
   * Reveals the sidebar.
   * @private
   */
  open_() {
    this.viewport_.disableTouchZoom();
    this.vsync_.mutate(() => {
      setStyles(this.element, {
        'display': 'block',
      });
      this.viewport_.addToFixedLayer(this.element);
      this.openMask_();
      if (this.isIosSafari_) {
        this.compensateIosBottombar_();
      }
      this.element./*OK*/scrollTop = 1;
      // Start animation in a separate vsync due to display:block; set above.
      this.vsync_.mutate(() => {
        this.element.setAttribute('open', '');
        this.element.setAttribute('aria-hidden', 'false');
        timer.delay(() => {
          this.scheduleLayout(this.getRealChildren());
        }, ANIMATION_TIMEOUT);
      });
    });
  }

  /**
   * Hides the sidebar.
   * @private
   */
  close_() {
    this.viewport_.restoreOriginalTouchZoom();
    this.vsync_.mutate(() => {
      this.closeMask_();
      this.element.removeAttribute('open');
      this.element.setAttribute('aria-hidden', 'true');
      timer.delay(() => {
        if (!this.isOpen_()) {
          this.viewport_.removeFromFixedLayer(this.element);
          this.vsync_.mutate(() => {
            setStyles(this.element, {
              'display': 'none',
            });
            this.schedulePause(this.getRealChildren());
          });
        }
      }, ANIMATION_TIMEOUT);
    });
  }

  /**
   * @private
   */
  openMask_() {
    if (!this.maskElement_) {
      const mask = this.document_.createElement('div');
      mask.classList.add('-amp-sidebar-mask');
      mask.addEventListener('click', () => {
        this.close_();
      });
      this.element.parentNode.appendChild(mask);
      mask.addEventListener('touchmove', e => {
        e.preventDefault();
      });
      this.maskElement_ = mask;
    }
    setStyles(this.maskElement_, {
      'display': 'block',
    });
  }

  /**
   * @private
   */
  closeMask_() {
    if (this.maskElement_) {
      setStyles(this.maskElement_, {
        'display': 'none',
      });
    }
  }

  /**
   * @private
   */
  fixIosElasticScrollLeak_() {
    this.element.addEventListener('scroll', e => {
      if (this.isOpen_()) {
        if (this.element./*OK*/scrollTop < 1) {
          this.element./*OK*/scrollTop = 1;
          e.preventDefault();
        } else if (this.element./*OK*/scrollHeight ==
              this.element./*OK*/scrollTop +
              this.element./*OK*/offsetHeight) {
          this.element./*OK*/scrollTop =
              this.element./*OK*/scrollTop - 1;
          e.preventDefault();
        }
      }
    });
  }

  /**
   * @private
   */
  compensateIosBottombar_() {
    if (!this.bottomBarCompensated_) {
      // Compensate for IOS safari bottom navbar.
      const div = this.document_.createElement('div');
      setStyles(div, {
        'height': IOS_SAFARI_BOTTOMBAR_HEIGHT,
        'width': '100%',
        'background-color': 'transparent',
      });
      this.element.appendChild(div);
      this.bottomBarCompensated_ = true;
    }
  }

  /**
   * Checks if the sidebar only has the whitlisted custom amp- elements.
   * @private
   */
  checkWhitelist_() {
    const elements = this.element.getElementsByClassName('-amp-element');
    let i = elements.length - 1;
    while (i >= 0) {
      const tagName = elements[i].tagName;
      if (tagName.indexOf('AMP-') == 0) {
        const isWhiteListed = user.assert(
            WHITELIST_.indexOf(tagName) >= 0,
            '%s can only contain the following custom tags: %s',
            this.element, WHITELIST_);
        if (!isWhiteListed) {
          break;
        }
      }
      i--;
    }
  }
}

AMP.registerElement('amp-sidebar', AmpSidebar, CSS);


text:
var Code = require('code');
var _Lab = require('../../../test_runner');

// Declare internals

var internals = {};

// Test shortcuts

var lab = exports.lab = _Lab.script();
var describe = lab.describe;
var it = lab.it;
var expect = Code.expect;

describe('Test CLI 3', function () {

    it('supports negative numbers', function (done) {

        expect(1 - 2).to.equal(-1);
        done();
    });

    it('supports infinity', function (done) {

        expect(Infinity + 1).to.equal(Infinity);
        done();
    });
});


text:
import json
import os
import shutil
import stat
from os import listdir
from os.path import join

from git import Repo
from pkg_resources import Requirement, resource_filename

import enot
from enot.pac_cache.cache import Cache, CacheType
from enot.packages.package import Package
from enot.utils.file_utils import if_dir_exists, ensure_dir, link_if_needed, copy_file
from enot.utils.file_utils import remove_dir
from enot.utils.logger import debug, info

class LocalCache(Cache):
    def __init__(self, temp_dir: str, default_erlang: str, conf):
        cache_url = conf['url']
        path = cache_url[7:]
        super().__init__(conf['name'], temp_dir, path, default_erlang, CacheType.LOCAL)
        if not os.path.exists(path):
            os.makedirs(path)
        ensure_dir(temp_dir)
        ensure_dir(self.tool_dir)
        self._locks = {}
        self.__fill_locks()

    @property
    def tool_dir(self):
        return join(self.path, 'tool')

    @property
    def locks(self) -> dict:
        return self._locks

    @locks.setter
    def locks(self, locks: dict):
        self._locks = locks

    def get_lock(self, name: str) -> str or None:
        return self.locks.get(name, None)

    def set_lock(self, dep: Package, hash_str: str):
        self._locks[dep.fullname] = dep.git_branch + '-' + hash_str

    def get_package_path(self, package: Package, no_null=False) -> str or None:
        if package.git_tag is not None:  # normal tagged dep
            return join(package.fullname, package.git_vsn, self.erlang_version)
        lock = self.get_lock(package.fullname)
        if lock is not None:  # locked branch dep
            return join(package.fullname, lock, self.erlang_version)
        if no_null and package.git_branch is not None:
            return join(package.fullname, package.git_vsn, self.erlang_version)
        return None  # unlocked branch dep, should be fetched

    def exists(self, package: Package) -> bool:
        return self.check_exists(self.get_package_path(package))

    def check_exists(self, path: str) -> bool:
        debug('check ' + self.path + ' ' + str(path))
        return if_dir_exists(self.path, path) is not None

    def tool_exists(self, toolname: str) -> bool:
        return os.path.exists(join(self.tool_dir, toolname))

    # clone git repo to tmp, make package to scan and update it's config
    def fetch_package(self, dep: Package):
        temp_path = join(self.temp_dir, dep.name)
        info('fetch ' + temp_path)
        remove_dir(temp_path)
        vsn, need_lock = self.__get_vsn(dep)
        hash_str = LocalCache.fetch(dep.url, vsn, temp_path)
        dep.update_from_cache(temp_path)
        if need_lock:
            self.set_lock(dep, hash_str)

    # add built package to local cache, update its path
    def add_package(self, package: Package, rewrite=False) -> bool:
        full_dir = join(self.path, self.get_package_path(package, True))
        ensure_dir(full_dir)
        info('add ' + package.fullname)
        path = package.path
        LocalCache.__copy_data(rewrite, full_dir, path, 'ebin')
        LocalCache.__copy_include(rewrite, full_dir, path)
        if package.config.with_source:
            LocalCache.__copy_data(rewrite, full_dir, path, 'src')
        if package.config.with_source and package.has_nifs:
            LocalCache.__copy_data(rewrite, full_dir, path, 'c_src')
        if os.path.exists(join(path, 'priv')):
            LocalCache.__copy_data(rewrite, full_dir, path, 'priv')
        enot_package = join(path, package.name + '.ep')
        if not os.path.isfile(enot_package):
            debug('generate missing package')
            package.generate_package()
        copy_file(join(path, 'enot_config.json'), join(full_dir, 'enot_config.json'))
        copy_file(enot_package, join(full_dir, package.name + '.ep'))
        resource = resource_filename(Requirement.parse(enot.APPNAME), 'enot/resources/EmptyMakefile')
        debug('copy ' + resource + ' to ' + join(full_dir, 'Makefile'))
        copy_file(resource, join(full_dir, 'Makefile'))
        package.path = full_dir  # update package's dir to point to cache
        return True

    def get_erl_versions(self, fullname: str, version: str) -> list:
        vsn_path = join(self.path, fullname, version)
        if not os.path.exists(vsn_path):
            return []
        return listdir(vsn_path)

    def get_versions(self, fullname: str) -> list:
        name_path = join(self.path, fullname)
        if not os.path.exists(name_path):
            return []
        return listdir(name_path)

    def add_tool(self, toolname: str, toolpath: str):
        info('add ' + toolname)
        tool_dst = join(self.tool_dir, toolname)
        copy_file(toolpath, tool_dst)
        st = os.stat(tool_dst)
        os.chmod(tool_dst, st.st_mode | stat.S_IEXEC)

    # link package from local cache to project
    # return true if link was changed (dep was updated)
    def link_package(self, package: Package, dest_path: str) -> bool:
        if not dest_path:
            dest_path = os.getcwd()
        cache_path = join(self.path, self.get_package_path(package))
        dep_dir = join(dest_path, 'deps', package.name)
        ensure_dir(dep_dir)
        debug('link ' + package.name)
        changed = []
        for file in listdir(cache_path):
            if file != package.name + '.ep':
                changed.append(LocalCache.link(cache_path, dest_path, package.name, file))
        return all(changed)  # if all links were changed - it is a new version

    def link_tool(self, package: Package, toolname: str):
        cache_path = join(self.tool_dir, toolname)
        link_if_needed(cache_path, join(package.path, toolname))

    # load package's locks.
    def __fill_locks(self):
        if os.path.isfile('enot_locks.json'):
            with open('enot_locks.json', 'r') as file:
                self._locks = json.load(file)

    # Return git version to use and should lock flag
    def __get_vsn(self, dep: Package):
        if dep.git_tag:  # no need to check lock over tag version
            return dep.git_tag, False
        lock = self.get_lock(dep.name)
        if lock:  # this package's version is locked, return locked commit's hash
            [branch, hash_str] = lock.split('-')
            if branch == dep.git_branch:  # same branch locked
                return hash_str, False
            return dep.git_branch, True  # locked branch was changed
        return dep.git_branch, True

    @staticmethod
    def link(cache_path: str, package_path: str, name: str, dir_to_link: str) -> bool:
        include_src = join(cache_path, dir_to_link)
        include_dst = join(package_path, 'deps', name, dir_to_link)
        return link_if_needed(include_src, include_dst)

    @staticmethod
    def fetch(url, rev, path):
        repo = Repo.clone_from(url, path)
        if repo.bare:
            raise RuntimeError('Empty repo ' + url)
        git = repo.git
        git.checkout(rev)
        repo.create_head(rev)
        return repo.head.object.hexsha

    @staticmethod
    def __copy_include(rewrite, full_dir, path):
        cache_include = join(full_dir, 'include')
        if rewrite or not os.path.exists(cache_include):
            package_include = join(path, 'include')
            if os.path.exists(package_include):
                debug('copy ' + package_include + ' to' + cache_include)
                shutil.copytree(package_include, cache_include)

    @staticmethod
    def __copy_data(rewrite, full_dir, path, source_dir):
        cache_src = join(full_dir, source_dir)
        if rewrite or not os.path.exists(cache_src):
            package_src = join(path, source_dir)
            debug('copy ' + package_src + ' to ' + cache_src)
            shutil.copytree(package_src, cache_src)


text:
var redback = require('./common').createClient(),
    client2 = require('./common').createClient(),
    assert = require('assert');

//Close the Redis connection after 500ms
setTimeout(function () {
    redback.client.quit();
    client2.client.quit();
}, 500);

module.exports = {

    'test channels': function () {
        var channel = redback.createChannel('test_channel'), received = false;

        channel.on('message', function (msg) {
            assert.equal('foo', msg);
            if (msg != 'foo') {
                assert.ok(false);
            }
            received = true;
        });

        channel.subscribe(function () {
            //Bind another client so it doesn't affect the other tests
            channel.setClient(client2.client);
            channel.publish('foo', function (err) {
                assert.ok(true);
            });
        });

        setTimeout(function () {
            channel.unsubscribe(function(){
                assert.ok(true);
            });
            assert.ok(received);
        }, 200);
    }

}


text:
import * as ActionTypes from '../constants/constants';
import Config from '../../../server/config';
import fetch from 'isomorphic-fetch';
import {Map, List} from 'immutable';

const baseURL = typeof window === 'undefined' ? process.env.BASE_URL || (`http://localhost:${Config.port}`) : '';

export function addPost(post) {
  console.log('add posts')
  return {
    type: ActionTypes.ADD_POST,
    name: post.name,
    title: post.title,
    content: post.content,
    slug: post.slug,
    cuid: post.cuid,
    _id: post._id,
  };
}

export function changeSelectedPost(slug) {
  console.log('change selected posts')
  return {
    type: ActionTypes.CHANGE_SELECTED_POST,
    slug,
  };
}

export function addPostRequest(post) {
  console.log('add post request')
  return (dispatch) => {
    fetch(`${baseURL}/api/addPost`, {
      method: 'post',
      body: JSON.stringify({
        post: {
          name: post.name,
          title: post.title,
          content: post.content,
        },
      }),
      headers: new Headers({
        'Content-Type': 'application/json',
      }),
    }).then((res) => res.json()).then(res => {
      console.log(res)
      return dispatch(addPost(res.post))});
  };
}

export function addSelectedPost(post) {
  console.log('hit add selected posts')
  // const imPost = Map(post)
  return {
    type: ActionTypes.ADD_SELECTED_POST,
    post
  };
}

export function getPostRequest(post) {
  console.log('hit get post request')
  return (dispatch) => {
    return fetch(`${baseURL}/api/getPost?slug=${post}`, {
      method: 'get',
      headers: new Headers({
        'Content-Type': 'application/json',
      }),
    }).then((response) => response.json()).then(res => {
      return dispatch(addSelectedPost(res.post))});
  };
}

export function deletePost(post) {
  console.log('hit delete posts')
  console.log(post)
  return {
    type: ActionTypes.DELETE_POST,
    post
  };
}

export function addPosts(posts) {
  console.log('hit add Posts')
  return {
    type: ActionTypes.ADD_POSTS,
    posts
  };
}

export function fetchPosts() {
  console.log('fetch posts')
  return (dispatch) => {
    return fetch(`${baseURL}/api/getPosts`).
      then((response) => response.json()).
      then((response) => {
        return dispatch(addPosts(response.posts))
      });
  };
}

export function deletePostRequest(post) {
  console.log('delete posts request')
  return (dispatch) => {
    fetch(`${baseURL}/api/deletePost`, {
      method: 'post',
      body: JSON.stringify({
        postId: post._id,
      }),
      headers: new Headers({
        'Content-Type': 'application/json',
      }),
    }).then(() => dispatch(deletePost(post)));
  };
}


text:
require "application_system_test_case"

class LayoutHelperTest < ApplicationSystemTestCase
  test "rendered page contains both base and application layouts" do
    visit("/")
    assert_selector("html>head+body")
    assert_selector("body p")
    assert_match(/Home/, page.title)
  end
end


text:
package develop.lib.activity;

import android.annotation.TargetApi;
import android.app.Activity;
import android.app.ActivityOptions;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.transition.Explode;
import android.transition.Fade;
import android.transition.Slide;

/**
 * Created by KKK on 2017/9/4.
 */

public abstract class BaseActivity extends Activity {
    protected Context context;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            setAnimation();
            openImmerseStatasBarMode(this);
        }
        context = this;
        initViews();
        initVariables();
        loadData();
    }

    public static void openImmerseStatasBarMode(Activity activity) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        }
    }

    /**
     * 设置转场效果,如应用此方法请务必调用BaseActivity提供的startActivity方法
     */
    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    private void setAnimation() {
        switch (AppConfig.ACTIVITYANIMATION) {
            //分解
            case 1:
                getWindow().setEnterTransition(new Explode().setDuration(2000));
                getWindow().setExitTransition(new Explode().setDuration(2000));
                break;
            //滑入
            case 2:
                getWindow().setEnterTransition(new Slide().setDuration(2000));
                getWindow().setExitTransition(new Slide().setDuration(2000));
                break;
            //淡入淡出
            case 3:
                getWindow().setEnterTransition(new Fade().setDuration(2000));
                getWindow().setExitTransition(new Fade().setDuration(2000));
                break;
        }
    }

    protected abstract void initViews();

    protected abstract void initVariables();

    protected abstract void loadData();

    /**
     * 适配5.0以上加入转场动画效果
     *
     * @param intent
     */
    public void startActivity(Intent intent) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(BaseActivity.this).toBundle());
        } else {
            startActivity(intent);
        }
    }

    /**
     * 适配5.0以上加入转场动画效果
     *
     * @param aClass
     */
    public void startActivity(Class aClass) {
        Intent intent = new Intent(context, aClass);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(BaseActivity.this).toBundle());
        } else {
            startActivity(intent);
        }
    }
}


text:
#ifndef DEF_CREAM_LIBRARY
#define DEF_CREAM_LIBRARY

extern "C"
{
#include "ThirdParty/CicmWrapper/Sources/cicm_wrapper.h"
}

#define CREAM_MAXITEMS 256

extern "C" void cream_setup(void);
extern "C" void Cream_setup(void);
extern "C" void libpd_loadcream(void);

extern "C" void setup_c0x2ebang(void);
extern "C" void setup_c0x2eblackboard(void);
extern "C" void setup_c0x2ebreakpoints(void);
extern "C" void setup_c0x2ecolorpanel(void);
extern "C" void setup_c0x2edsp_tilde(void);
extern "C" void setup_c0x2egain_tilde(void);
extern "C" void setup_c0x2eincdec(void);
extern "C" void setup_c0x2eknob(void);
extern "C" void setup_c0x2ematrix(void);
extern "C" void setup_c0x2emenu(void);
extern "C" void setup_c0x2emeter_tilde(void);
extern "C" void setup_c0x2enumber(void);
extern "C" void setup_c0x2enumber_tilde(void);
extern "C" void setup_c0x2eplane(void);
extern "C" void setup_c0x2epreset(void);
extern "C" void setup_c0x2eradio(void);
extern "C" void setup_c0x2erslider(void);
extern "C" void setup_c0x2escope_tilde(void);
extern "C" void setup_c0x2eslider(void);
extern "C" void setup_c0x2etab(void);
extern "C" void setup_c0x2etoggle(void);

#ifdef __APPLE__
extern "C" void setup_c0x2ekeyboard(void);
extern "C" void setup_c0x2ecamomile(void);

extern "C" void setup_c0x2ewavesel(void);
#endif

// Deprecated
extern "C" void setup_c0x2econvolve_tilde(void);
extern "C" void setup_c0x2efreeverb_tilde(void);
extern "C" void setup_c0x2epak(void);
extern "C" void setup_c0x2eloadmess(void);
extern "C" void setup_c0x2eprepend(void);
extern "C" void setup_c0x2epatcherargs(void);
extern "C" void setup_c0x2epatcherinfos(void);
extern "C" void setup_c0x2epatchermess(void);

static t_symbol* cream_sym_goppos               = gensym("goppos");
static t_symbol* cream_sym_gopsize              = gensym("gopsize");
static t_symbol* cream_sym_select               = gensym("select");
static t_symbol* cream_sym_delete               = gensym("delete");
static t_symbol* cream_sym_past                 = gensym("paste");

static t_symbol* cream_sym_attr_modified        = gensym("attr_modified");

static t_symbol* cream_sym_background_layer     = gensym("background_layer");
static t_symbol* cream_sym_text_layer           = gensym("text_layer");
static t_symbol* cream_sym_selection_layer      = gensym("selection_layer");
static t_symbol* cream_sym_points_layer         = gensym("points_layer");
static t_symbol* cream_sym_value_layer          = gensym("value_layer");
static t_symbol* cream_sym_knob_layer           = gensym("knob_layer");
static t_symbol* cream_sym_signal_layer         = gensym("signal_layer");
static t_symbol* cream_sym_leds_layer           = gensym("leds_layer");
static t_symbol* cream_sym_items_layer          = gensym("items_layer");
static t_symbol* cream_sym_needle_layer         = gensym("needle_layer");

static t_symbol* cream_sym_bacolor              = gensym("bacolor");
static t_symbol* cream_sym_bgcolor              = gensym("bgcolor");
static t_symbol* cream_sym_bdcolor 				= gensym("bdcolor");
static t_symbol* cream_sym_crcolor 				= gensym("crcolor");
static t_symbol* cream_sym_btcolor              = gensym("btcolor");
static t_symbol* cream_sym_textcolor            = gensym("textcolor");
static t_symbol* cream_sym_ptcolor              = gensym("ptcolor");
static t_symbol* cream_sym_licolor              = gensym("licolor");
static t_symbol* cream_sym_coldcolor            = gensym("coldcolor");
static t_symbol* cream_sym_tepidcolor           = gensym("tepidcolor");
static t_symbol* cream_sym_warmcolor            = gensym("warmcolor");
static t_symbol* cream_sym_hotcolor             = gensym("hotcolor");
static t_symbol* cream_sym_overcolor            = gensym("overcolor");
static t_symbol* cream_sym_wkeycolor            = gensym("wkeycolor");
static t_symbol* cream_sym_bkeycolor            = gensym("bkeycolor");
static t_symbol* cream_sym_skeycolor            = gensym("skeycolor");
static t_symbol* cream_sym_kncolor              = gensym("kncolor");
static t_symbol* cream_sym_itcolor              = gensym("itcolor");
static t_symbol* cream_sym_secolor              = gensym("secolor");
static t_symbol* cream_sym_hocolor              = gensym("hocolor");
static t_symbol* cream_sym_necolor              = gensym("necolor");

static t_symbol* cream_sym_fontsize             = gensym("fontsize");
static t_symbol* cream_sym_fontname             = gensym("fontname");
static t_symbol* cream_sym_fontweight           = gensym("fontweight");
static t_symbol* cream_sym_fontslant            = gensym("fontslant");

static t_symbol* cream_sym_endless              = gensym("endless");
static t_symbol* cream_sym_ptsize               = gensym("ptsize");
static t_symbol* cream_sym_preset               = gensym("preset");
static t_symbol* cream_sym_atpreset             = gensym("@preset");
static t_symbol* cream_sym_atindex              = gensym("@index");
static t_symbol* cream_sym_interpolate          = gensym("interpolate");
static t_symbol* cream_sym_absrange             = gensym("absrange");
static t_symbol* cream_sym_ordrange             = gensym("ordrange");
static t_symbol* cream_sym_atpoints             = gensym("@points");
static t_symbol* cream_sym_function             = gensym("function");
static t_symbol* cream_sym_Linear               = gensym("Linear");
static t_symbol* cream_sym_Cosine               = gensym("Cosine");
static t_symbol* cream_sym_Cubic                = gensym("Cubic");
static t_symbol* cream_sym_outline              = gensym("outline");
static t_symbol* cream_sym_items                = gensym("items");
static t_symbol* cream_sym_orientation          = gensym("orientation");
static t_symbol* cream_sym_lowkey               = gensym("lowkey");
static t_symbol* cream_sym_highkey              = gensym("highkey");

static t_symbol* cream_sym_nothing              = gensym("''");
static t_symbol* cream_sym_left_bracket         = gensym("[");
static t_symbol* cream_sym_right_bracket        = gensym("]");

#endif


text:
/*
 * @include OpenLayers/Format/CSWGetRecords.js
 * @requires GeoExt/Version.js
 */

/**
 * Data reader class to create an array of records from a CSW GetRecords
 * response. The raw response from the OpenLayers parser is available through
 * the jsonData property.
 *
 * Example:
 *
 *     var store = Ext.create('Ext.data.Store', {
 *         proxy: Ext.create('GeoExt.data.proxy.Protocol', {
 *             protocol: new OpenLayers.Protocol.CSW({
 *                 url: "http://demo.geonode.org/geonetwork/srv/en/csw"
 *             })
 *         }),
 *         reader: Ext.create('GeoExt.data.reader.CswRecords')
 *     });
 *
 * @class GeoExt.data.reader.CswRecords
 */
Ext.define('GeoExt.data.reader.CswRecords', {
    alternateClassName: ['GeoExt.data.CSWRecordsReader'],
    extend: 'Ext.data.reader.Json',
    alias: 'reader.gx_cswrecords',
    requires: [
        'GeoExt.Version'
    ],
    /**
     * Creates new Reader.
     *
     * @param {Object} [config] Config object.
     */
    constructor: function(config) {
        if (!this.model) {
            this.setModel('GeoExt.data.CswRecordsModel');
        }
        this.callParent([config]);
        if (!this.format) {
            this.format = new OpenLayers.Format.CSWGetRecords();
        }
    },

    /**
     * @param {XMLHttpRequest/OpenLayers.Protocol.Response} data If a
     *     ProtocolProxy is configured with OpenLayers.Protocol.CSW data will be
     *     OpenLayers.Protocol.Response. Otherwise data will be the
     *     XMLHttpRequest object.
     * @return  {Object} A data block which is used by an Ext.data.Store as a
     *     cache of Ext.data.Model objects.
     * @private
     */
    read: function(data) {
        var o = data.data;
        if (!o) {
            o = data.responseXML;
            if(!o || !o.documentElement) {
                o = data.responseText;
            }
        }
        return this.readRecords(o);
    },

    /**
     * Create a data block containing Ext.data.Records from an XML document.
     *
     * @param {DOMElement/String/Object} data A document element or XHR
     *     response string.  As an alternative to fetching capabilities data
     *     from a remote source, an object representing the capabilities can
     *     be provided given that the structure mirrors that returned from the
     *     capabilities parser.
     * @return  {Object} A data block which is used by an Ext.data.Store
     *     as a cache of Ext.data.Model objects.
     * @private
     */
    readRecords: function(data) {
        if(typeof data === "string" || data.nodeType) {
            data = this.format.read(data);
        }
        var result = this.callParent([data.records]);
        // post-process so we flatten simple objects with a value property
        Ext.each(result.records, function(record) {
            for (var key in record.data) {
                var value = record.data[key];
                if (value instanceof Array) {
                    for (var i=0, ii=value.length; i<ii; ++i) {
                        if (value[i] instanceof Object) {
                            value[i] = value[i].value;
                        }
                    }
                }
            }
        });
        if (data.SearchResults) {
            delete result.totalRecords;
            result.total = data.SearchResults.numberOfRecordsMatched;
        }
        return result;
    }
});


text:
npm install
npm run compile
docker build -t sasuke .