//////////////////////////////////////////////////////////////////////////////////////////
485343
public static StringBuilder removeLast(final StringBuilder builder, final String string) {
		final int lastIndexOf = builder.lastIndexOf(string);
		if (lastIndexOf == -1) {
			return builder;
		}
		return new StringBuilder(builder.substring(0, lastIndexOf));
	}
30550
function overrideDebugFormat () {
  debug.formatArgs = function (args) {
    const prefix = new Date().toISOString() + ' ' + this.namespace + ' '
    args[0] = prefix + args[0].split('\n').join('\n' + prefix)
  }
}
171719
public static void main(String[] args) throws Exception {

		
		CWSTagger cws = new CWSTagger("../models/seg.m");
		tag = new POSTagger(cws,"../models/pos.m");
		
		System.out.println("得到支持的词性标签集合");
		System.out.println(tag.getSupportedTags());
		System.out.println(tag.getSupportedTags().size());
		System.out.println("\n");
		
		String str = "媒体计算研究所成立了，高级数据挖掘很难。乐phone很好！";
		String s = tag.tag(str);
		System.out.println("处理未分词的句子");
		System.out.println(s);
		
		System.out.println("使用英文标签");
		tag.SetTagType("en");		
		System.out.println(tag.getSupportedTags());
		System.out.println(tag.getSupportedTags().size());
		s = tag.tag(str);
		System.out.println(s);		
		System.out.println();
		
		CWSTagger cws2 = new CWSTagger("../models/seg.m", new Dictionary("../models/dict.txt"));
		
		//bool值指定该dict是否用于cws分词（分词和词性可以使用不同的词典）
		tag = new POSTagger(cws2, "../models/pos.m"
				, new Dictionary("../models/dict.txt"), true);//true就替换了之前的dict.txt
		tag.removeDictionary(false);//不移除分词的词典
		tag.setDictionary(new Dictionary("../models/dict.txt"), false);//设置POS词典，分词使用原来设置
		
		String str2 = "媒体计算研究所成立了，高级数据挖掘很难。乐phone很好！";
		String s2 = tag.tag(str2);
		System.out.println("处理未分词的句子，使用词典");
		System.out.println(s2);
		System.out.println();
		
		Dictionary dict = new Dictionary();
		dict.add("媒体计算","mypos1","mypos2");
		dict.add("乐phone","专有名");
		tag.setDictionary(dict, true);
		String s22 = tag.tag(str2);
		System.out.println(s22);
		System.out.println();
		
		POSTagger tag1 = new POSTagger("../models/pos.m");
		String str1 = "媒体计算 研究所 成立 了 , 高级 数据挖掘 很 难";
		String[] w = str1.split(" ");
		String[] s1 = tag1.tagSeged(w);
		System.out.println("直接处理分好词的句子:++++++++++");
		for(int i=0;i<s1.length;i++){
			System.out.print(w[i]+"/"+s1[i]+" ");
		}
		System.out.println("\n");
		
		POSTagger tag3 = new POSTagger("../models/pos.m", new Dictionary("../models/dict.txt"));
		String str3 = "媒体计算 研究所 成立 了 , 高级 数据挖掘 很 难 ";
		String[] w3 = str3.split(" ");
		String[] s3 = tag3.tagSeged(w3);
		System.out.println("直接处理分好词的句子，使用词典");
		for(int i=0;i<s3.length;i++){
			System.out.print(w3[i]+"/"+s3[i]+" ");
		}
		System.out.println("\n");
		
		//????????????????????????????
		
		System.out.println("重新构造");
		cws = new CWSTagger("../models/seg.m");
		tag = new POSTagger(cws,"../models/pos.m");
		str = "媒体计算研究所成立了, 高级数据挖掘很难";
		System.out.println(tag.tag(str));
		String[][] sa = tag.tag2Array(str);
		for(int i = 0; i < sa.length; i++) {
			for(int j = 0; j < sa[i].length; j++) {
					System.out.print(sa[i][j] + " ");
			}
			System.out.println();
		}
		
		String s4 = tag.tagFile("../example-data/data-tag.txt");
		System.out.println("\n处理文件：");
		System.out.println(s4);
	}
933997
public short[] getStrictDurations() {
	  Vector durations = new Vector();
	  short currentDuration = 0;
	  for (int i=0; i<m_notes.size(); i++) {
		  currentDuration = ((Note)(m_notes.elementAt(i))).getStrictDuration();
		  if (durations.indexOf(new Short(currentDuration))==-1)
			  durations.addElement(currentDuration);
	  }
	  if (durations.size()==0)
		  return null;
	  else {
		  //sort the durations
		  Vector sortedDurations = new Vector();
		  for (int i=0; i<durations.size(); i++) {
			  int j=0;
			  while (j<sortedDurations.size()
					  && (Short) sortedDurations.elementAt(j) <
					  ((Short) durations.elementAt(i))
					  )
				  j++;
			  sortedDurations.insertElementAt(durations.elementAt(i),j);
		  }
		  short[] durationsAsArray = new short[sortedDurations.size()];
		  for (int i=0; i<sortedDurations.size(); i++)
			  durationsAsArray [i] = (Short) sortedDurations.elementAt(i);
		  return durationsAsArray;
	  }
  }
1119450
function () {

/*Line 57 - 'AtomDispatcher.js' */                //if (window.console) {
/*Line 58 - 'AtomDispatcher.js' */                //    window.console.log("Starting Web Atoms");
/*Line 59 - 'AtomDispatcher.js' */                //}

/*Line 61 - 'AtomDispatcher.js' */                var a = $('[data-atom-type],[atom-type]').first()[0];
/*Line 62 - 'AtomDispatcher.js' */                if (a.atomControl != undefined && a.atomControl != null)
/*Line 63 - 'AtomDispatcher.js' */                    return;
/*Line 64 - 'AtomDispatcher.js' */                var ct = AtomUI.getAtomType(a);
/*Line 65 - 'AtomDispatcher.js' */                $(a).removeAttr("atom-type");
/*Line 66 - 'AtomDispatcher.js' */                $(a).removeAttr("data-atom-type");
/*Line 67 - 'AtomDispatcher.js' */                var ctrl = new (WebAtoms[ct])(a);
/*Line 68 - 'AtomDispatcher.js' */                ctrl.setup();

/*Line 70 - 'AtomDispatcher.js' */            }
606185
function didTabOrderChange($currTabLis, updatedTabs, propNames) {
      var isTabOrderChanged = false;
  
      $currTabLis.each(function (currDomIdx) {
        var newIdx = getTabIndexByPaneId(updatedTabs, propNames.paneId, $(this).data('tab')[propNames.paneId]);
  
        if ((newIdx > -1) && (newIdx !== currDomIdx)) { // tab moved
          isTabOrderChanged = true;
          return false; // exit .each() loop
        }
      });
  
      return isTabOrderChanged;
    }
421714
public static void main(String[] args) {
    LoggingConfiguration.setLevelFor(RectangleArranger.class.getName(), Level.FINEST.getName());
    RectangleArranger<String> r = new RectangleArranger<>(1.3);
    r.put(4., 1., "Histogram");
    r.put(4., 4., "3D view");
    r.put(1., 1., "Meta 1");
    r.put(1., 1., "Meta 2");
    r.put(1., 1., "Meta 3");
    r.put(2., 2., "Meta 4");
    r.put(2., 2., "Meta 5");

    r = new RectangleArranger<>(3., 3.);
    r.put(1., 2., "A");
    r.put(2., 1., "B");
    r.put(1., 2., "C");
    r.put(2., 1., "D");
    r.put(2., 2., "E");

    r = new RectangleArranger<>(4 - 2.6521739130434785);
    r.put(4., .5, "A");
    r.put(4., 3., "B");
    r.put(4., 1., "C");
    r.put(1., .1, "D");
  }
149934
@Override
    protected void doHandle(CommandContext ctx) throws CommandLineException {
        final List<String> names = ctx.getParsedCommandLine().getOtherProperties();
        if(names.isEmpty()) {
            throw new CommandFormatException("Variable name is missing");
        }

        for (String name : names) {
            if (name.charAt(0) == '$') {
                name = name.substring(1);
                if (name.isEmpty()) {
                    throw new CommandFormatException("Variable name is missing after '$'");
                }
            }
            ctx.setVariable(name, null);
        }
    }
1243692
function () {
                // Simple things first
                if(this._from.substr(this._at, 4) === 'null') {
                    this._at += 4;
                    return null;
                } else if(this._from.substr(this._at, 9) === 'undefined') {
                    this._at += 9;
                    return undefined;
                } else if(this._from.substr(this._at, 4) === 'true') {
                    this._at += 4;
                    return true;
                } else if(this._from.substr(this._at, 5) === 'false') {
                    this._at += 5;
                    return false;
                } else if(this._from.substr(this._at, 3) === 'NaN') {
                    this._at += 3;
                    return NaN;
                } else if(this._from.substr(this._at, 8) === 'Infinity') {
                    this._at += 8;
                    return Infinity;
                } else if(this._from.substr(this._at, 9) === '-Infinity') {
                    this._at += 9;
                    return -Infinity;
                }
                // JSON escaped string?
                if(this._from.charAt(this._at) === '"') {
                    var end = this._at + 1;
                    while(end < this._from.length) {
                        if(this._from.charAt(end) === '\\') {
                            end += 1;
                        } else if(this._from.charAt(end) === '"') {
                            break;
                        }
                        end += 1;
                    }
                    if(end < this._from.length) {
                        var s = this._from.substr(this._at, end - this._at + 1);
                        this._at = end + 1;
                        return JSON.parse(s);
                    }
                }
                // Reference?
                if(this._from.charAt(this._at) === '<' && this._from.charAt(this._at + 1 + shared.utils.uidStringLength) === '>') {
                    var id = this._from.substr(this._at + 1, shared.utils.uidStringLength);
                    this._at += (2 + shared.utils.uidStringLength);
                    return new Reference(shared.utils.makeUID(id));
                }
                // Maybe a number
                var l = this.numberLength();
                if(l) {
                    var n = parseFloat(this._from.substr(this._at));
                    shared.utils.dassert(!isNaN(n));
                    this._at += l;
                    return n;
                }
                shared.utils.defaultLogger().fatal('Unexpected value encoding: %s', this._from.substr(this._at));
            }
393731
private void checkJodaConstructor2() {
        int COUNT = COUNT_VERY_FAST;
        DateTime dt = new DateTime(12345L, GJChronology.getInstance());
        for (int i = 0; i < AVERAGE; i++) {
            start("Joda", "new(millis)");
            for (int j = 0; j < COUNT; j++) {
                dt = new DateTime(12345L, GJChronology.getInstance());
                if (dt == null) {System.out.println("Anti optimise");}
            }
            end(COUNT);
        }
    }
81132
private void checkJodaConstructor3() {
        int COUNT = COUNT_SLOW;
        DateTime dt = new DateTime(1972, 10, 1, 0, 0, 0, 0,
                                   GJChronology.getInstance());
        for (int i = 0; i < AVERAGE; i++) {
            start("Joda", "new(YMD)");
            for (int j = 0; j < COUNT; j++) {
                dt = new DateTime(1972, 10, 1, 0, 0, 0, 0,
                                  GJChronology.getInstance());
                if (dt == null) {System.out.println("Anti optimise");}
            }
            end(COUNT);
        }
    }
68053
function (item) {
        let x;
        switch (item.type) {
            case Type.STRING:
            case Type.NUMBER:
            case Type.BOOLEAN:
            case Type.UNDEFINED:
                return item.value;
            case Type.ARRAY:
                x = [];
                item.value.forEach(function (e) {
                    let key = e.key.substring(e.key.lastIndexOf('[') + 1, e.key.lastIndexOf(']'));
                    x[parseInt(key, 10)] = _fromPersistable(e);
                });
                return x;
            case Type.OBJECT:
                x = {};
                item.value.forEach(function (e) {
                    let key = e.key.substring(e.key.lastIndexOf('[') + 1, e.key.lastIndexOf(']'));
                    x[key] = _fromPersistable(e);
                });
                return x;
            default:
                _logUnknownType(item.type);
        }
    }
377555
private void readCalendars()
   {
      Table cal = m_tables.get("CAL");
      for (MapRow row : cal)
      {
         ProjectCalendar calendar = m_projectFile.addCalendar();
         m_calendarMap.put(row.getInteger("CALENDAR_ID"), calendar);
         Integer[] days =
         {
            row.getInteger("SUNDAY_HOURS"),
            row.getInteger("MONDAY_HOURS"),
            row.getInteger("TUESDAY_HOURS"),
            row.getInteger("WEDNESDAY_HOURS"),
            row.getInteger("THURSDAY_HOURS"),
            row.getInteger("FRIDAY_HOURS"),
            row.getInteger("SATURDAY_HOURS")
         };

         calendar.setName(row.getString("NAME"));
         readHours(calendar, Day.SUNDAY, days[0]);
         readHours(calendar, Day.MONDAY, days[1]);
         readHours(calendar, Day.TUESDAY, days[2]);
         readHours(calendar, Day.WEDNESDAY, days[3]);
         readHours(calendar, Day.THURSDAY, days[4]);
         readHours(calendar, Day.FRIDAY, days[5]);
         readHours(calendar, Day.SATURDAY, days[6]);

         int workingDaysPerWeek = 0;
         for (Day day : Day.values())
         {
            if (calendar.isWorkingDay(day))
            {
               ++workingDaysPerWeek;
            }
         }

         Integer workingHours = null;
         for (int index = 0; index < 7; index++)
         {
            if (days[index].intValue() != 0)
            {
               workingHours = days[index];
               break;
            }
         }

         if (workingHours != null)
         {
            int workingHoursPerDay = countHours(workingHours);
            int minutesPerDay = workingHoursPerDay * 60;
            int minutesPerWeek = minutesPerDay * workingDaysPerWeek;
            int minutesPerMonth = 4 * minutesPerWeek;
            int minutesPerYear = 52 * minutesPerWeek;

            calendar.setMinutesPerDay(Integer.valueOf(minutesPerDay));
            calendar.setMinutesPerWeek(Integer.valueOf(minutesPerWeek));
            calendar.setMinutesPerMonth(Integer.valueOf(minutesPerMonth));
            calendar.setMinutesPerYear(Integer.valueOf(minutesPerYear));
         }
      }
   }
953231
function (docId, name, value, changedByUserId, destroyedAt, recordedAt, updatedAt,
  seq, quorum, userUUID, colId, docUUID, forUserId, forUserUUID,
  recordedByUserId, colName, recordedByUUID) {
  this.docId = docId;
  this.name = name;
  this.value = value;
  this.changedByUserId = changedByUserId;
  this.destroyedAt = destroyedAt;
  this.recordedAt = recordedAt;
  this.updatedAt = updatedAt;
  this.seq = seq;
  this.quorum = quorum;
  this.userUUID = userUUID;
  this.colId = colId;
  this.docUUID = docUUID;
  this.forUserId = forUserId;
  this.forUserUUID = forUserUUID;
  this.recordedByUserId = recordedByUserId;
  this.colName = colName;
  this.recordedByUUID = recordedByUUID;
}
756970
function () {

/*Line 48 - 'AtomViewStack.js' */                var element = this._element;
/*Line 49 - 'AtomViewStack.js' */                var childEn = new ChildEnumerator(element);

/*Line 51 - 'AtomViewStack.js' */                var selectedIndex = this.get_selectedIndex();
/*Line 52 - 'AtomViewStack.js' */                var previousIndex = this._previousIndex;

/*Line 54 - 'AtomViewStack.js' */                var queue = WebAtoms.dispatcher;
/*Line 55 - 'AtomViewStack.js' */                queue.pause();

/*Line 57 - 'AtomViewStack.js' */                var i = -1;

/*Line 59 - 'AtomViewStack.js' */                var self = this;

/*Line 61 - 'AtomViewStack.js' */                var selectedElement, previousElement;

/*Line 63 - 'AtomViewStack.js' */                while (childEn.next()) {
/*Line 64 - 'AtomViewStack.js' */                    i = i + 1;
/*Line 65 - 'AtomViewStack.js' */                    var item = childEn.current();
/*Line 66 - 'AtomViewStack.js' */                    var $item = $(item);
/*Line 67 - 'AtomViewStack.js' */                    $item.addClass("view-stack-child");
/*Line 68 - 'AtomViewStack.js' */                    if (previousIndex == -1) {
/*Line 69 - 'AtomViewStack.js' */                        $item.addClass("hidden");
/*Line 70 - 'AtomViewStack.js' */                    }
/*Line 71 - 'AtomViewStack.js' */                    if (i == selectedIndex) {
/*Line 72 - 'AtomViewStack.js' */                        selectedElement = item;
/*Line 73 - 'AtomViewStack.js' */                    } else if (i == previousIndex) {
/*Line 74 - 'AtomViewStack.js' */                        previousElement = item;
/*Line 75 - 'AtomViewStack.js' */                    } else {
/*Line 76 - 'AtomViewStack.js' */                        $item.addClass("hidden");
/*Line 77 - 'AtomViewStack.js' */                    }
/*Line 78 - 'AtomViewStack.js' */                }

/*Line 80 - 'AtomViewStack.js' */                if (selectedElement) {
/*Line 81 - 'AtomViewStack.js' */                    var width = $(element).innerWidth();
/*Line 82 - 'AtomViewStack.js' */                    var height = $(element).innerHeight();

/*Line 84 - 'AtomViewStack.js' */                    this._selectedChild = selectedElement;
/*Line 85 - 'AtomViewStack.js' */                    var $selectedElement = $(selectedElement);
/*Line 86 - 'AtomViewStack.js' */                    AtomUI.setItemRect($selectedElement,selectedElement, { width: width, height: height });
/*Line 87 - 'AtomViewStack.js' */                    var sac = selectedElement.atomControl;
/*Line 88 - 'AtomViewStack.js' */                    if (sac) {
/*Line 89 - 'AtomViewStack.js' */                        sac.updateUI();
/*Line 90 - 'AtomViewStack.js' */                    }

/*Line 92 - 'AtomViewStack.js' */                    if (previousElement && previousElement != selectedElement) {
/*Line 93 - 'AtomViewStack.js' */                        var self = this;

/*Line 95 - 'AtomViewStack.js' */                        var $previousElement = $(previousElement);

/*Line 97 - 'AtomViewStack.js' */                        var sd = this._swipeDirection;
/*Line 98 - 'AtomViewStack.js' */                        if (sd != null && /none/i.test(sd)) {
/*Line 99 - 'AtomViewStack.js' */                            $previousElement.addClass("hidden");
/*Line 100 - 'AtomViewStack.js' */                            $selectedElement.removeClass("hidden");
/*Line 101 - 'AtomViewStack.js' */                        } else {
/*Line 102 - 'AtomViewStack.js' */                            // animate...
/*Line 103 - 'AtomViewStack.js' */                            var ael = [selectedElement, previousElement];
/*Line 104 - 'AtomViewStack.js' */                            $(ael).removeClass("hidden");
/*Line 105 - 'AtomViewStack.js' */                            this._isAnimating = true;
/*Line 106 - 'AtomViewStack.js' */                            if (selectedIndex < previousIndex) {
/*Line 107 - 'AtomViewStack.js' */                                $selectedElement.css("left", -width);
/*Line 108 - 'AtomViewStack.js' */                                //log("left: -" + width);
/*Line 109 - 'AtomViewStack.js' */                            } else {
/*Line 110 - 'AtomViewStack.js' */                                $selectedElement.css("left", width);
/*Line 111 - 'AtomViewStack.js' */                                //log("left: " + width);
/*Line 112 - 'AtomViewStack.js' */                            }
/*Line 113 - 'AtomViewStack.js' */                            $(ael).addClass("animate-left-property");
/*Line 114 - 'AtomViewStack.js' */                            setTimeout(function () {
/*Line 115 - 'AtomViewStack.js' */                                $selectedElement.css("left", 0);
/*Line 116 - 'AtomViewStack.js' */                                //log("left: 0");
/*Line 117 - 'AtomViewStack.js' */                                if (selectedIndex < previousIndex) {
/*Line 118 - 'AtomViewStack.js' */                                    $previousElement.css("left", width);
/*Line 119 - 'AtomViewStack.js' */                                } else {
/*Line 120 - 'AtomViewStack.js' */                                    $previousElement.css("left", -width);
/*Line 121 - 'AtomViewStack.js' */                                }
/*Line 122 - 'AtomViewStack.js' */                                setTimeout(function () {
/*Line 123 - 'AtomViewStack.js' */                                    self._isAnimating = false;
/*Line 124 - 'AtomViewStack.js' */                                    $(ael).removeClass("animate-left-property");
/*Line 125 - 'AtomViewStack.js' */                                    $previousElement.addClass("hidden");
/*Line 126 - 'AtomViewStack.js' */                                }, 800);
/*Line 127 - 'AtomViewStack.js' */                            }, 50);
/*Line 128 - 'AtomViewStack.js' */                        }
/*Line 129 - 'AtomViewStack.js' */                    } else {
/*Line 130 - 'AtomViewStack.js' */                        $selectedElement.removeClass("hidden");
/*Line 131 - 'AtomViewStack.js' */                    }
/*Line 132 - 'AtomViewStack.js' */                }

/*Line 134 - 'AtomViewStack.js' */                queue.start();

/*Line 136 - 'AtomViewStack.js' */            }
1276241
function (dataByCoordSys) {
        var lastCoordSys = this._lastDataByCoordSys;
        var contentNotChanged = !!lastCoordSys
            && lastCoordSys.length === dataByCoordSys.length;

        contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) {
            var lastDataByAxis = lastItemCoordSys.dataByAxis || {};
            var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {};
            var thisDataByAxis = thisItemCoordSys.dataByAxis || [];
            contentNotChanged &= lastDataByAxis.length === thisDataByAxis.length;

            contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) {
                var thisItem = thisDataByAxis[indexAxis] || {};
                var lastIndices = lastItem.seriesDataIndices || [];
                var newIndices = thisItem.seriesDataIndices || [];

                contentNotChanged
                    &= lastItem.value === thisItem.value
                    && lastItem.axisType === thisItem.axisType
                    && lastItem.axisId === thisItem.axisId
                    && lastIndices.length === newIndices.length;

                contentNotChanged && each(lastIndices, function (lastIdxItem, j) {
                    var newIdxItem = newIndices[j];
                    contentNotChanged
                        &= lastIdxItem.seriesIndex === newIdxItem.seriesIndex
                        && lastIdxItem.dataIndex === newIdxItem.dataIndex;
                });
            });
        });

        this._lastDataByCoordSys = dataByCoordSys;

        return !!contentNotChanged;
    }
170415
function () {
/*Line 153 - 'AtomBinding.js' */                if (this.twoWays) {
/*Line 154 - 'AtomBinding.js' */                    if (this.jq) {
/*Line 155 - 'AtomBinding.js' */                        this.bindEvent(this.element, "change", "onValChanged");
/*Line 156 - 'AtomBinding.js' */                        this.bindEvent(this.element, "blur", "onValChanged");
/*Line 157 - 'AtomBinding.js' */                        if (this.events) {
/*Line 158 - 'AtomBinding.js' */                            var list = new AtomEnumerator(this.events.split(","));
/*Line 159 - 'AtomBinding.js' */                            while (list.next()) {
/*Line 160 - 'AtomBinding.js' */                                this.bindEvent(this.element, list.current(), "onValChanged");
/*Line 161 - 'AtomBinding.js' */                            }
/*Line 162 - 'AtomBinding.js' */                        }
/*Line 163 - 'AtomBinding.js' */                    } else {
/*Line 164 - 'AtomBinding.js' */                        this.bindEvent(this.control, "WatchHandler", "onPropChanged", this.key);
/*Line 165 - 'AtomBinding.js' */                    }
/*Line 166 - 'AtomBinding.js' */                }

/*Line 168 - 'AtomBinding.js' */                this.onDataChanged(this, null);

/*Line 170 - 'AtomBinding.js' */            }