text:
package com.ggstudios.lolcraft;

import java.text.DecimalFormat;

import android.annotation.SuppressLint;
import android.graphics.Color;
import android.graphics.drawable.TransitionDrawable;
import android.os.Bundle;
import android.os.Looper;
import android.support.v4.app.FragmentManager;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
import android.text.style.RelativeSizeSpan;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.Button;
import android.widget.HorizontalScrollView;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.Spinner;
import android.widget.TextView;

import com.actionbarsherlock.app.SherlockFragment;
import com.ggstudios.lolcraft.Build.BuildItem;
import com.ggstudios.lolcraft.Build.BuildObserver;
import com.ggstudios.lolcraft.Build.BuildRune;
import com.ggstudios.lolcraft.ChampionInfo.OnFullyLoadedListener;
import com.ggstudios.utils.DebugLog;
import com.ggstudios.utils.Utils;
import com.ggstudios.views.RearrangeableLinearLayout;
import com.ggstudios.views.RearrangeableLinearLayout.OnEdgeDragListener;
import com.ggstudios.views.RearrangeableLinearLayout.OnItemDragListener;
import com.ggstudios.views.RearrangeableLinearLayout.OnReorderListener;

public class CraftBasicFragment extends SherlockFragment implements BuildObserver {
	private static final String TAG = "CraftBasicFragment";

	public static final String EXTRA_CHAMPION_ID = "champId";

	private static final int MAP_ID_SUMMONERS_RIFT = 1;

	private static final int COLOR_ITEM_BONUS = 0xff0078ff;
	private static final int COLOR_LEVEL_BONUS = 0xff09a818;

	private static final int SCROLL_SPEED_PER_SEC_DP = 5;
	private static final int SEEK_BAR_PADDING_DP = 10;

	private static final int ANIMATION_DURATION = 300;

	private TextView lblPartype;
	private TextView lblPartypeRegen;

	private TextView txtHp;
	private TextView txtHpRegen;
	private TextView txtMs;
	private TextView txtMp;
	private TextView txtMpRegen;
	private TextView txtRange;
	private TextView txtAd;
	private TextView txtAs;
	private TextView txtAp;
	private TextView txtAr;
	private TextView txtMr;
	private Button addItem;
	private Button addRunes;
	private Spinner levelSpinner;
	private RearrangeableLinearLayout buildContainer;
	private HorizontalScrollView buildScrollView;
	private SeekBar seekBar;
	private ImageButton btnTrash;
	private LinearLayout runeContainer;
	private HorizontalScrollView runeScrollView;

	private int scrollSpeed;

	private Build build;

	private ChampionInfo champInfo;

	private int level;

	private LayoutInflater inflater;

	private int seekBarPadding;

	private static final DecimalFormat statFormat = new DecimalFormat("###.##");
	private static final DecimalFormat intStatFormat = new DecimalFormat("###");

	private void setStat(TextView tv, double base, double gain, int level, double itemBonus) {
		setStat(tv, base, gain, level, itemBonus, statFormat);
	}

	private void setStat(TextView tv, double base, double gain, int level, double itemBonus, DecimalFormat df) {
		double levelBonus = gain * level;
		double total = base + levelBonus + itemBonus;

		printStat(tv, total, itemBonus, levelBonus, true, df);
	}

	private void setStatAs(TextView tv, double base, double gain, int level, double itemBonus) {
		double levelBonus = gain * level;
		double total = base * (1 + levelBonus + itemBonus);

		printStat(tv, total, itemBonus, levelBonus, true, statFormat);
	}

	private void setLevelessStat(TextView tv, double base, double gain, int level, double itemBonus) {
		double total = base + itemBonus;

		printStat(tv, total, itemBonus, 0, false, statFormat);
	}

	private void setLevelessStat(TextView tv, double base, double gain, int level, double itemBonus, DecimalFormat df) {
		double total = base + itemBonus;

		printStat(tv, total, itemBonus, 0, false, df);
	}

	private void printStat(TextView tv, double total, double itemBonus, double levelBonus, boolean printLevelStat, DecimalFormat df) {
		SpannableStringBuilder span = new SpannableStringBuilder();
		span.append("" + df.format(total));
		int start = span.length();
		int s1 = span.length();
		span.append("(+" + statFormat.format(itemBonus) + ")");
		span.setSpan(new ForegroundColorSpan(COLOR_ITEM_BONUS), s1 + 1, span.length() - 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
		if (printLevelStat) {
			s1 = span.length();
			span.append("(+" + statFormat.format(levelBonus) + ")");
			span.setSpan(new ForegroundColorSpan(COLOR_LEVEL_BONUS), s1 + 1, span.length() - 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
		}
		span.setSpan(new RelativeSizeSpan(0.7f), start, span.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);

		tv.setText(span);
	}

	boolean edgeDrag = false;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		this.inflater = inflater;

		scrollSpeed = (int) Utils.convertDpToPixel(SCROLL_SPEED_PER_SEC_DP, getActivity());
		seekBarPadding = (int) Utils.convertDpToPixel(SEEK_BAR_PADDING_DP, getActivity());

		build = StateManager.getInstance().getActiveBuild();

		DebugLog.d(TAG, "onCreateView");

		final View rootView = inflater.inflate(R.layout.fragment_craft_basic, container, false);

		final int champId = getArguments().getInt(EXTRA_CHAMPION_ID);
		champInfo = LibraryManager.getInstance().getChampionLibrary().getChampionInfo(champId);

		lblPartype = (TextView) rootView.findViewById(R.id.lblMp);
		lblPartypeRegen = (TextView) rootView.findViewById(R.id.lblMpRegen);
		txtHp = (TextView) rootView.findViewById(R.id.txtHp);
		txtHpRegen = (TextView) rootView.findViewById(R.id.txtHpRegen);
		txtMs = (TextView) rootView.findViewById(R.id.txtMs);
		txtMp = (TextView) rootView.findViewById(R.id.txtMp);
		txtMpRegen = (TextView) rootView.findViewById(R.id.txtMpRegen);
		txtRange = (TextView) rootView.findViewById(R.id.txtRange);
		txtAd = (TextView) rootView.findViewById(R.id.txtAd);
		txtAs = (TextView) rootView.findViewById(R.id.txtAs);
		txtAr = (TextView) rootView.findViewById(R.id.txtAr);
		txtMr = (TextView) rootView.findViewById(R.id.txtMr);
		txtAp = (TextView) rootView.findViewById(R.id.txtAp);
		levelSpinner = (Spinner) rootView.findViewById(R.id.level);
		buildContainer = (RearrangeableLinearLayout) rootView.findViewById(R.id.build);
		buildScrollView = (HorizontalScrollView) rootView.findViewById(R.id.scrollView);
		seekBar = (SeekBar) rootView.findViewById(R.id.seekBar);
		btnTrash = (ImageButton) rootView.findViewById(R.id.btnTrash);
		runeContainer = (LinearLayout) rootView.findViewById(R.id.runes);
		runeScrollView = (HorizontalScrollView) rootView.findViewById(R.id.runeScrollView);

		champInfo.onFullyLoaded(new OnFullyLoadedListener() {

			@Override
			public void onFullyLoaded() {
				switch (champInfo.partype) {
				case ChampionInfo.TYPE_ENERGY:
					lblPartype.setText(R.string.stat_energy);
					lblPartypeRegen.setText(R.string.stat_energy_regen);
					break;
				case ChampionInfo.TYPE_BLOODWELL:
					lblPartype.setText(R.string.stat_bloodwell);
					txtMp.setVisibility(View.INVISIBLE);
					lblPartypeRegen.setVisibility(View.INVISIBLE);
					txtMpRegen.setVisibility(View.INVISIBLE);
					break;
				case ChampionInfo.TYPE_UNKNOWN:
					lblPartype.setText(R.string.stat_unknown);
					txtMp.setVisibility(View.INVISIBLE);
					lblPartypeRegen.setVisibility(View.INVISIBLE);
					txtMpRegen.setVisibility(View.INVISIBLE);
					break;
				default:
					break;
				}
			}

		});

		updateStats();
		updateBuild();
		updateRunes();

		buildContainer.setOnEdgeDragListener(new OnEdgeDragListener() {

			@Override
			public void onEdgeDragLeft() {
				DebugLog.d(TAG, "edgeScroll");
				edgeDrag = true;

				new Thread() {
					@Override
					public void run() {
						while (edgeDrag) {
							try {
								sleep(17);
							} catch (InterruptedException e) {}

							buildScrollView.post(new Runnable() {

								@Override
								public void run() {
									int scrollX = buildScrollView.getScrollX() - scrollSpeed;
									if (scrollX > 0) {
										buildContainer.updateTouchX(-scrollSpeed);
									}
									buildScrollView.scrollBy(-scrollSpeed, 0);
								}

							});
						}
					}
				}.start();
			}

			@Override
			public void onEdgeDragRight() {
				edgeDrag = true;

				new Thread() {
					@Override
					public void run() {
						while (edgeDrag) {
							try {
								sleep(17);
							} catch (InterruptedException e) {}

							buildScrollView.post(new Runnable() {

								@Override
								public void run() {
									int scrollX = buildScrollView.getScrollX() + scrollSpeed;
									if (scrollX < buildContainer.getRight() - buildScrollView.getWidth() - buildContainer.getLeft()) {
										buildContainer.updateTouchX(scrollSpeed);
									}
									buildScrollView.scrollBy(scrollSpeed, 0);
								}

							});
						}
					}
				}.start();
			}

			@Override
			public void onEdgeDragCancel() {
				edgeDrag = false;
			}

		});

		buildContainer.setOnReorderListener(new OnReorderListener() {

			@Override
			public void onReorder(View v, int itemOldPosition,
					int itemNewPosition) {

				build.reorder(itemOldPosition, itemNewPosition);
				refreshAllItemViews();
			}

			@Override
			public void onBeginReorder() {
				hideSeekBar();
				showView(btnTrash);
			}

			@Override
			public void onToss(int itemPosition) {
				build.removeItemAt(itemPosition);
				refreshAllItemViews();
			}

			@Override
			public void onEndReorder() {
				if (build.getBuildSize() > 0) {
					showSeekBar();
				}
				hideView(btnTrash);
				TransitionDrawable transition = (TransitionDrawable) btnTrash.getBackground();
				transition.resetTransition();
			}

		});

		buildContainer.setOnItemDragListener(new OnItemDragListener() {

			@Override
			public void onItemDrag(float x, float y) {}

			@Override
			public void onEnterTossZone(View v) {
				TransitionDrawable transition = (TransitionDrawable) btnTrash.getBackground();
				transition.startTransition(ANIMATION_DURATION);
			}

			@Override
			public void onExitTossZone(View v) {
				TransitionDrawable transition = (TransitionDrawable) btnTrash.getBackground();
				transition.reverseTransition(ANIMATION_DURATION);
			}

		});

		buildContainer.post(new Runnable() {

			@Override
			public void run() {
				buildContainer.setMinimumWidth(buildScrollView.getWidth());
			}

		});

		rootView.getViewTreeObserver().addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
			@SuppressLint("NewApi")
			@SuppressWarnings("deprecation")
			@Override
			public void onGlobalLayout() {
				buildContainer.setEdgeThresholds(buildScrollView.getLeft(), buildScrollView.getRight());
				//...
				//do whatever you want with them
				//...
				//this is an important step not to keep receiving callbacks:
				//we should remove this listener
				//I use the function to remove it based on the api level!

				if(android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN)
					rootView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
				else
					rootView.getViewTreeObserver().removeGlobalOnLayoutListener(this);
			}
		});

		addItem = (Button) rootView.findViewById(R.id.addItem);
		addItem.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				Bundle b = new Bundle();
				b.putInt(ItemPickerDialogFragment.EXTRA_CHAMPION_ID, champId);
				b.putInt(ItemPickerDialogFragment.EXTRA_MAP_ID, MAP_ID_SUMMONERS_RIFT);
				FragmentManager fm = getActivity().getSupportFragmentManager();
				ItemPickerDialogFragment dialog = new ItemPickerDialogFragment();
				dialog.setArguments(b);
				dialog.show(fm, "dialog");
			}

		});

		addRunes = (Button) rootView.findViewById(R.id.addRunes);
		addRunes.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				FragmentManager fm = getActivity().getSupportFragmentManager();
				RunePickerDialogFragment dialog = new RunePickerDialogFragment();
				dialog.show(fm, "dialog");
			}

		});

		levelSpinner.setOnItemSelectedListener(new OnItemSelectedListener() {

			@Override
			public void onItemSelected(AdapterView<?> parent, View view,
					int position, long id) {

				level = position;
				build.setChampionLevel(level);
			}

			@Override
			public void onNothingSelected(AdapterView<?> parent) {}

		});

		seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {

			@Override
			public void onProgressChanged(SeekBar seekBar, int progress,
					boolean fromUser) {

				if (fromUser) {
					build.setEnabledBuildEnd(progress);
					refreshAllItemViews();
				}
			}

			@Override
			public void onStartTrackingTouch(SeekBar seekBar) {}

			@Override
			public void onStopTrackingTouch(SeekBar seekBar) {}

		});

		seekBar.setOnTouchListener(new OnTouchListener() {
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				int action = event.getAction();
				switch (action) {
				case MotionEvent.ACTION_DOWN:
					// Disallow ScrollView to intercept touch events.
					v.getParent().requestDisallowInterceptTouchEvent(true);
					break;

				case MotionEvent.ACTION_UP:
					// Allow ScrollView to intercept touch events.
					v.getParent().requestDisallowInterceptTouchEvent(false);
					break;
				}

				// Handle ListView touch events.
				v.onTouchEvent(event);
				return true;
			}
		});

		return rootView;
	}

	@Override
	public void onDestroyView() {
		super.onDestroyView();

		final int runeCount = build.getRuneCount();

		for (int i = 0; i < runeCount; i++) {
			build.getRune(i).tag = null;
		}
	}

	private void showView(View v) {
		Animation ani = new AlphaAnimation(0f, 1f);
		ani.setDuration(ANIMATION_DURATION);
		v.setVisibility(View.VISIBLE);
		v.startAnimation(ani);
	}

	private void hideView(final View v) {
		Animation ani = new AlphaAnimation(1f, 0f);
		ani.setDuration(ANIMATION_DURATION);
		ani.setAnimationListener(new AnimationListener() {

			@Override
			public void onAnimationStart(Animation animation) {}

			@Override
			public void onAnimationEnd(Animation animation) {
				v.setVisibility(View.INVISIBLE);
			}

			@Override
			public void onAnimationRepeat(Animation animation) {}

		});

		v.startAnimation(ani);
	}

	private void showSeekBar() {
		showView(seekBar);
	}

	private void hideSeekBar() {
		hideView(seekBar);
	}

	@Override
	public void onResume() {
		super.onResume();
		build.registerObserver(this);
	}

	@Override
	public void onPause() {
		super.onPause();
		build.unregisterObserver(this);
	}

	@Override
	public void onBuildChanged(Build build) {
		updateBuild();
	}

	@Override
	public void onItemAdded(Build build, BuildItem item, boolean isNewItem) {
		if (isNewItem) {
			updateBuild(item);
		} else {
			refreshAllItemViews();
		}
	}

	@Override
	public void onRuneAdded(Build build, BuildRune rune) {
		updateRunes(rune);
	}

	@Override
	public void onRuneRemoved(Build build, BuildRune rune) {
		((BuildRuneView) rune.tag).removeSelf();
	}

	@Override
	public void onBuildStatsChanged() {
		updateStats();
	}

	private void updateStats() {
		ChampionInfo info = champInfo;

		setStat(txtHp, 			info.hp, 		info.hpG, 		level, build.getBonusHp(),			intStatFormat);
		setStat(txtHpRegen, 	info.hpRegen, 	info.hpRegenG, 	level, build.getBonusHpRegen());
		setLevelessStat(txtMs, 	info.ms, 		0, 				level, build.getBonusMs(), 	intStatFormat);
		if (info.partype == ChampionInfo.TYPE_MANA) {
			setStat(txtMp, 			info.mp, 		info.mpG, 		level, build.getBonusMp(),			intStatFormat);
			setStat(txtMpRegen, 	info.mpRegen, 	info.mpRegenG, 	level, build.getBonusMpRegen());
		} else if (info.partype == ChampionInfo.TYPE_ENERGY) {
			setStat(txtMp, 			info.mp, 		info.mpG, 		level, build.getBonusEnergy(),		intStatFormat);
			setStat(txtMpRegen, 	info.mpRegen, 	info.mpRegenG, 	level, build.getBonusEnergyRegen());
		}
		setLevelessStat(txtRange, 	info.range, 0, 				level, build.getBonusRange());

		setStat(txtAd, 			info.ad, 		info.adG, 		level, build.getBonusAd(),			intStatFormat);
		setStatAs(txtAs, 		info.as, 		info.asG, 		level, build.getBonusAs());
		setLevelessStat(txtAp, 	0, 				0,		 		level, build.getBonusAp(),			intStatFormat);
		setStat(txtAr, 			info.ar, 		info.arG, 		level, build.getBonusAr(),			intStatFormat);
		setStat(txtMr, 			info.mr, 		info.mrG, 		level, build.getBonusMr(),			intStatFormat);
	}

	private void updateBuild() {
		updateBuild(null);
	}

	private void refreshAllItemViews() {
		final int count = buildContainer.getChildCount();

		for (int i = 0; i < count; i++) {
			View v = buildContainer.getChildAt(i);
			BuildItem item = build.getItem(i);
			ItemViewHolder holder = (ItemViewHolder) v.getTag();

			if (item.group != -1) {
				holder.groupIndicator.setBackgroundColor(Build.getSuggestedColorForGroup(item.group));
			} else {
				if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
					holder.groupIndicator.setBackgroundDrawable(null);
				} else {
					holder.groupIndicator.setBackground(null);
				}
			}

			if (item.count != 1) {
				holder.count.setVisibility(View.VISIBLE);
				holder.count.setText("" + item.count);
			} else {
				holder.count.setVisibility(View.INVISIBLE);
			}

			if (i >= build.getEnabledBuildEnd()) {
				setAlphaForView(v, 0.5f);
			} else {
				setAlphaForView(v, 1f);
			}

			if (item.active) {
				v.setBackgroundColor(Color.GRAY);
			} else {
				if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
					v.setBackgroundDrawable(null);
				} else {
					v.setBackground(null);
				}
			}

		}
	}

	private void setAlphaForView(View v, float alpha) {
		if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB) {
			AlphaAnimation animation = new AlphaAnimation(alpha, alpha);
			animation.setDuration(0);
			animation.setFillAfter(true);
			v.startAnimation(animation);
		} else {
			v.setAlpha(alpha);
		}
	}

	private View getChildView() {
		View v = inflater.inflate(R.layout.item_in_build, buildContainer, false);
		ItemViewHolder holder = new ItemViewHolder();
		holder.groupIndicator = v.findViewById(R.id.groupIndicator);
		holder.count = (TextView) v.findViewById(R.id.count);
		v.setTag(holder);

		return v;
	}

	private void updateBuild(BuildItem item) {
		if (item == null) {
			// update whole build
			buildContainer.removeAllViews();

			final int buildItemCount = build.getBuildSize();

			for (int i = 0; i < buildItemCount; i++) {
				item = build.getItem(i);
				View v = getChildView();
				ImageView icon = (ImageView) v.findViewById(R.id.icon);

				icon.setImageDrawable(item.info.icon);

				buildContainer.addView(v);
			}

			seekBar.setMax(build.getBuildSize());
			seekBar.setProgress(build.getEnabledBuildEnd());
		} else {
			View v = getChildView();
			ImageView icon = (ImageView) v.findViewById(R.id.icon);

			icon.setImageDrawable(item.info.icon);

			buildContainer.addView(v);
			buildScrollView.post(new Runnable() {

				@Override
				public void run() {
					buildScrollView.smoothScrollTo(buildContainer.getWidth(), 0);
				}

			});

			boolean wasFull = seekBar.getProgress() == seekBar.getMax() || build.getBuildSize() == 1;
			seekBar.setMax(build.getBuildSize());

			if (wasFull) {
				seekBar.setProgress(seekBar.getMax());
			}
		}

		if (build.getBuildSize() > 0) {
			seekBar.setVisibility(View.VISIBLE);

			seekBar.post(new Runnable() {

				@Override
				public void run() {
					DebugLog.d(TAG, "Right: " + buildContainer.getChildAt(buildContainer.getChildCount() - 1).getRight());
					seekBar.getLayoutParams().width = buildContainer.getChildAt(buildContainer.getChildCount() - 1).getRight() + seekBarPadding;
					seekBar.requestLayout();
				}

			});
		} else {
			seekBar.setVisibility(View.INVISIBLE);
		}

		refreshAllItemViews();
	}

	private void updateRunes() {
		updateRunes(null);
	}

	private void updateRunes(BuildRune rune) {
		if (rune == null) {
			runeContainer.removeAllViews();

			final int runeCount = build.getRuneCount();

			for (int i = 0; i < runeCount; i++) {
				rune = build.getRune(i);
				BuildRuneView v = (BuildRuneView) inflater.inflate(R.layout.item_rune_in_build, runeContainer, false);
				v.bindBuildRune(rune);

				runeContainer.addView(v);
				rune.tag = v;
			}
		} else {
			BuildRuneView v = (BuildRuneView) inflater.inflate(R.layout.item_rune_in_build, runeContainer, false);
			v.bindBuildRune(rune);

			runeContainer.addView(v);
			runeScrollView.post(new Runnable() {

				@Override
				public void run() {
					runeScrollView.smoothScrollTo(runeContainer.getWidth(), 0);
				}

			});

			rune.tag = v;
		}
	}

	private class ItemViewHolder {
		View groupIndicator;
		TextView count;
	}
}


text:
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="Cache-Control"content="no-cache"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
  <title>Chem Editor Demo</title>
  <style>
    html, body
    {
      padding: 0;
      margin: 0;
      width: 100%;
      height: 100%;
      overflow: hidden;
      touch-action: none;
    }
    iframe
    {
      /*
      width: 100%;
      height: 100%;
      */
      margin: 0;
      border: none;
      touch-action: none;
    }
  </style>
  <script>
    var MIN_WIDTH = 510;
    var MIN_HEIGHT = 350;
    var editorFrame;
    function getClientDimension(document)
    {
      if (document.compatMode == "BackCompat")
      {
        return {
          'width': document.body.clientWidth,
          'height': document.body.clientHeight
        }
      }
      else
      {
        return	{
          'width': document.documentElement.clientWidth,
          'height': document.documentElement.clientHeight
        }
      }
    }
    function adjustSize()
    {
      var dim = getClientDimension(document);

      var ratioWidth = dim.width / MIN_WIDTH, ratioHeight = dim.height / MIN_HEIGHT;
      var scale = (ratioWidth <= ratioHeight)? ratioWidth: ratioHeight;
      var editorWidth, editorHeight, transformScale;
      if (scale >= 1)
      {
        editorWidth = dim.width;
        editorHeight = dim.height;
        transformScale = 1;
      }
      else
      {
        editorWidth = dim.width / scale;
        editorHeight = dim.height / scale;
        transformScale = scale;
      }

      var style = editorFrame.style;
      style.width = editorWidth + 'px';
      style.height = editorHeight + 'px';
      style.transformOrigin = '0 0';
      style.transform = 'scale(' + transformScale + ')';
      console.log('zoom: ', editorWidth + ' : ', editorHeight);
      console.log(dim);
    }
    function init()
    {
      editorFrame = document.getElementById('editorFrame');
      adjustSize();
      window.onresize = adjustSize;
    }
  </script>
</head>
<body onload="init()">
  <iframe id="editorFrame" src="chemEditorCore.html"></iframe>
</body>
</html>

redpajama_set_name: RedPajamaGithub


text:
       //
       // Sunpro 5.2 and earler:
       //
       // although sunpro 5.2 supports the syntax for
       // inline initialization it often gets the value
       // wrong, especially where the value is computed
       // from other constants (J Maddock 6th May 2001)
#      define NDNBOOST_NO_INCLASS_MEMBER_INITIALIZATION

       // Although sunpro 5.2 supports the syntax for
       // partial specialization, it often seems to
       // bind to the wrong specialization.  Better
       // to disable it until suppport becomes more stable
       // (J Maddock 6th May 2001).
#      define NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#    endif

#    if (__SUNPRO_CC <= 0x530)
       // Requesting debug info (-g) with Boost.Python results
       // in an internal compiler error for "static const"
       // initialized in-class.
       //    >> Assertion:   (../links/dbg_cstabs.cc, line 611)
       //         while processing ../test.cpp at line 0.
       // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002)
#      define NDNBOOST_NO_INCLASS_MEMBER_INITIALIZATION

       // SunPro 5.3 has better support for partial specialization,
       // but breaks when compiling std::less<shared_ptr<T> >
       // (Jens Maurer 4 Nov 2001).

       // std::less specialization fixed as reported by George
       // Heintzelman; partial specialization re-enabled
       // (Peter Dimov 17 Jan 2002)

//#      define NDNBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

       // integral constant expressions with 64 bit numbers fail
#      define NDNBOOST_NO_INTEGRAL_INT64_T
#    endif

#    if (__SUNPRO_CC < 0x570)
#      define NDNBOOST_NO_TEMPLATE_TEMPLATES
       // see http://lists.boost.org/MailArchives/boost/msg47184.php
       // and http://lists.boost.org/MailArchives/boost/msg47220.php
#      define NDNBOOST_NO_INCLASS_MEMBER_INITIALIZATION
#      define NDNBOOST_NO_SFINAE
#      define NDNBOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
#    endif
#    if (__SUNPRO_CC <= 0x580)
#      define NDNBOOST_NO_IS_ABSTRACT
#    endif

#    if (__SUNPRO_CC <= 0x5100)
       // Sun 5.10 may not correctly value-initialize objects of
       // some user defined types, as was reported in April 2010
       // (CR 6947016), and confirmed by Steve Clamage.
       // (Niels Dekker, LKEB, May 2010).
#      define NDNBOOST_NO_COMPLETE_VALUE_INITIALIZATION
#    endif

//
// Dynamic shared object (DSO) and dynamic-link library (DLL) support
//
#if __SUNPRO_CC > 0x500
#  define NDNBOOST_SYMBOL_EXPORT __global
#  define NDNBOOST_SYMBOL_IMPORT __global
#  define NDNBOOST_SYMBOL_VISIBLE __global
#endif

//
// Issues that effect all known versions:
//
#define NDNBOOST_NO_TWO_PHASE_NAME_LOOKUP
#define NDNBOOST_NO_ADL_BARRIER

//
// C++0x features
//
#  define NDNBOOST_HAS_LONG_LONG

#define NDNBOOST_NO_CXX11_AUTO_DECLARATIONS
#define NDNBOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
#define NDNBOOST_NO_CXX11_CHAR16_T
#define NDNBOOST_NO_CXX11_CHAR32_T
#define NDNBOOST_NO_CXX11_CONSTEXPR
#define NDNBOOST_NO_CXX11_DECLTYPE
#define NDNBOOST_NO_CXX11_DECLTYPE_N3276
#define NDNBOOST_NO_CXX11_DEFAULTED_FUNCTIONS
#define NDNBOOST_NO_CXX11_DELETED_FUNCTIONS
#define NDNBOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
#define NDNBOOST_NO_CXX11_EXTERN_TEMPLATE
#define NDNBOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define NDNBOOST_NO_CXX11_HDR_INITIALIZER_LIST
#define NDNBOOST_NO_CXX11_LAMBDAS
#define NDNBOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
#define NDNBOOST_NO_CXX11_NOEXCEPT
#define NDNBOOST_NO_CXX11_NULLPTR
#define NDNBOOST_NO_CXX11_RANGE_BASED_FOR
#define NDNBOOST_NO_CXX11_RAW_LITERALS
#define NDNBOOST_NO_CXX11_RVALUE_REFERENCES
#define NDNBOOST_NO_CXX11_SCOPED_ENUMS
#define NDNBOOST_NO_SFINAE_EXPR
#define NDNBOOST_NO_CXX11_STATIC_ASSERT
#define NDNBOOST_NO_CXX11_TEMPLATE_ALIASES
#define NDNBOOST_NO_CXX11_UNICODE_LITERALS
#define NDNBOOST_NO_CXX11_VARIADIC_TEMPLATES
#define NDNBOOST_NO_CXX11_VARIADIC_MACROS
#define NDNBOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
#define NDNBOOST_NO_CXX11_USER_DEFINED_LITERALS

//
// Version
//

#define NDNBOOST_COMPILER "Sun compiler version " NDNBOOST_STRINGIZE(__SUNPRO_CC)

//
// versions check:
// we don't support sunpro prior to version 4:
#if __SUNPRO_CC < 0x400
#error "Compiler not supported or configured - please reconfigure"
#endif
//
// last known and checked version is 0x590:
#if (__SUNPRO_CC > 0x590)
#  if defined(NDNBOOST_ASSERT_CONFIG)
#     error "Unknown compiler version - please run the configure tests and report the results"
#  endif
#endif


text:
As of Mekanism 9.7.0 it is now possible to view all recipe strings of the Solar Neutron Activator through the command `/ct mekrecipes solarneutronactivator`

## Сложение

```zenscript
mods.mekanism.solarneutronactivator.addRecipe(IGasStack gasInput, IGasStack gasOutput);

mods.mekanism.solarneutronactivator.addRecipe(<gas:sulfurdioxide>, <gas:sulfurtrioxide>);
```

## Removal

```zenscript
mods.mekanism.solarneutronactivator.removeRecipe(IIngredient gasInput, @Optional IIngredient gasOutput);

mods.mekanism.solarneutronactivator.removeRecipe(<gas:lithium>, <gas:tritium>);
mods.mekanism.solarneutronactivator.removeRecipe(<gas:lithium>);
```

Specifying an output parameter will only remove the specific recipe that results in that output from that input. Omitting the output parameter will remove all recipes that the input item can produce.

## Removing all recipes

As of Mekanism 9.7.0 it is now possible to remove all Solar Neutron Activator recipes. (This excludes any recipes added via CraftTweaker)

```zenscript
mods.mekanism.solarneutronactivator.removeAllRecipes();
```


text:
A real-time collaborative code editing environment. This project was created for my Hack Reactor 2-day MVP sprint.

## MVP Features ##
- Multiple users can edit the same file
- Syntax highlighting
- Multiple users can work on separate files

## Tech Stack ##
### Front-end ###
- [Feathers.js](http://feathersjs.com/)
- [Socket.io](http://socket.io/)
- [React](https://facebook.github.io/react/)
- [React-Bootstrap](https://react-bootstrap.github.io/)
- [CodeMirror](https://github.com/codemirror/codemirror)
- [React-CodeMirror](https://github.com/JedWatson/react-codemirror)

### Back-end ###
- [Node.js](https://nodejs.org/en/)
- [Feathers.js](http://feathersjs.com/)
- [mongoDB](https://www.mongodb.com/)
- [mongoose](http://mongoosejs.com/)

## Getting Started ##
Clone the app with ``git clone https://github.com/mikelduffy/codewithus.git``. Install MongoDB globally on a mac with ``brew install mongo`` and run it in the background with ``mongod --dbpath ./data --syslog --fork``. Then run ``npm install && npm start`` and enjoy collaborative code editing!


text:
from django.conf.urls import url
from swiftbrowser.views import containerview, objectview, download,\
    delete_object, login, tempurl, upload, create_pseudofolder,\
    create_container, delete_container, public_objectview, toggle_public,\
    edit_acl

urlpatterns = (
    url(r'^login/$', login, name="login"),
    url(r'^$', containerview, name="containerview"),
    url(r'^public/(?P<account>.+?)/(?P<container>.+?)/(?P<prefix>(.+)+)?$',
        public_objectview, name="public_objectview"),
    url(r'^toggle_public/(?P<container>.+?)/$', toggle_public,
        name="toggle_public"),
    url(r'^tempurl/(?P<container>.+?)/(?P<objectname>.+?)$', tempurl,
        name="tempurl"),
    url(r'^upload/(?P<container>.+?)/(?P<prefix>.+)?$', upload, name="upload"),
    url(r'^create_pseudofolder/(?P<container>.+?)/(?P<prefix>.+)?$',
        create_pseudofolder, name="create_pseudofolder"),
    url(r'^create_container$', create_container, name="create_container"),
    url(r'^delete_container/(?P<container>.+?)$', delete_container,
        name="delete_container"),
    url(r'^download/(?P<container>.+?)/(?P<objectname>.+?)$', download,
        name="download"),
    url(r'^delete/(?P<container>.+?)/(?P<objectname>.+?)$', delete_object,
        name="delete_object"),
    url(r'^objects/(?P<container>.+?)/(?P<prefix>(.+)+)?$', objectview,
        name="objectview"),
    url(r'^acls/(?P<container>.+?)/$', edit_acl, name="edit_acl"),
)


text:
package mongodb

import (
	"github.com/Jeffail/benthos/v3/internal/docs"
	"github.com/Jeffail/benthos/v3/internal/impl/mongodb/client"
	"github.com/Jeffail/benthos/v3/public/service"
)

func processorOperationDocs(defaultOperation client.Operation) docs.FieldSpec {
	fs := outputOperationDocs(defaultOperation)
	return fs.HasOptions(append(fs.Options, string(client.OperationFindOne))...)
}

func outputOperationDocs(defaultOperation client.Operation) docs.FieldSpec {
	return docs.FieldCommon(
		"operation",
		"The mongodb operation to perform.",
	).HasOptions(
		string(client.OperationInsertOne),
		string(client.OperationDeleteOne),
		string(client.OperationDeleteMany),
		string(client.OperationReplaceOne),
		string(client.OperationUpdateOne),
	).HasDefault(defaultOperation)
}

func writeConcernDocs() docs.FieldSpecs {
	return docs.FieldSpecs{
		docs.FieldCommon("w", "W requests acknowledgement that write operations propagate to the specified number of mongodb instances."),
		docs.FieldCommon("j", "J requests acknowledgement from MongoDB that write operations are written to the journal."),
		docs.FieldCommon("w_timeout", "The write concern timeout."),
	}
}

func mapExamples() []interface{} {
	examples := []interface{}{"root.a = this.foo\nroot.b = this.bar"}
	return examples
}

var urlField = service.NewStringField("url").
	Description("The URL of the target MongoDB DB.").
	Example("mongodb://localhost:27017")

var queryField = service.NewBloblangField("query").Description("Bloblang expression describing MongoDB query.").Example(`
      root.from = {"$lte": timestamp_unix()}
      root.to = {"$gte": timestamp_unix()}
`)


text:
package org.onosproject.rest.resources;

import com.fasterxml.jackson.databind.node.ObjectNode;
import org.onlab.packet.IpAddress;
import org.onosproject.cluster.ClusterMetadataService;
import org.onosproject.cluster.ClusterService;
import org.onosproject.cluster.ControllerNode;
import org.onosproject.core.CoreService;
import org.onosproject.core.Version;
import org.onosproject.net.device.DeviceService;
import org.onosproject.net.flow.FlowRuleService;
import org.onosproject.net.host.HostService;
import org.onosproject.net.intent.IntentService;
import org.onosproject.net.link.LinkService;
import org.onosproject.net.topology.TopologyService;
import org.onosproject.rest.AbstractWebResource;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryUsage;
import java.lang.management.ThreadMXBean;
import java.util.Set;

/**
 * Provides high-level system information, version, basic sumaries, memory usage, etc.
 */
@Path("system")
public class SystemInfoWebResource extends AbstractWebResource {

    private long activeNodes(Set<ControllerNode> nodes) {
        ClusterService clusterService = get(ClusterService.class);
        return nodes.stream()
                .map(node -> clusterService.getState(node.id()))
                .filter(ControllerNode.State::isActive)
                .count();
    }

    /**
     * Get high-level system information, version, basic sumaries, memory usage, etc.
     *
     * @return 200 OK with a system summary
     */
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Response getSystemInfo() {
        IpAddress nodeIp = get(ClusterService.class).getLocalNode().ip();
        Version version = get(CoreService.class).version();
        long numNodes = activeNodes(get(ClusterService.class).getNodes());
        int numDevices = get(DeviceService.class).getDeviceCount();
        int numLinks = get(LinkService.class).getLinkCount();
        int numHosts = get(HostService.class).getHostCount();
        int numScc = get(TopologyService.class).currentTopology().clusterCount();
        int numFlows = get(FlowRuleService.class).getFlowRuleCount();
        long numIntents = get(IntentService.class).getIntentCount();
        String clusterId = get(ClusterMetadataService.class).getClusterMetadata().getName();

        ObjectNode root = mapper().createObjectNode()
                .put("node", nodeIp.toString())
                .put("version", version.toString())
                .put("clusterId", clusterId)
                .put("nodes", numNodes)
                .put("devices", numDevices)
                .put("links", numLinks)
                .put("hosts", numHosts)
                .put("sccs", numScc)
                .put("flows", numFlows)
                .put("intents", numIntents);

        MemoryUsage mem = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
        newObject(root, "mem")
                .put("current", mem.getUsed())
                .put("max", mem.getMax())
                .put("committed", mem.getCommitted());

        ThreadMXBean threads = ManagementFactory.getThreadMXBean();
        newObject(root, "threads")
                .put("live", threads.getThreadCount())
                .put("daemon", threads.getDaemonThreadCount())
                .put("peak", threads.getPeakThreadCount());

        return ok(root).build();
    }

}


text:
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using Xunit;

#if false
namespace Roslyn.Services.Editor.UnitTests.CodeGeneration
{
    public class NameGenerationTests : AbstractCodeGenerationTests
    {
        [WpfFact]
        public void TestIdentifierName()
        {
            TestName(
                f => f.CreateIdentifierName("a"),
                cs: "a",
                vb: "a");
        }

        [WpfFact]
        public void TestIdentifierNameCSharpKeyword()
        {
            TestName(
                f => f.CreateIdentifierName("int"),
                cs: "@int",
                vb: "int");
        }

        [WpfFact]
        public void TestIdentifierNameVisualBasicKeyword()
        {
            TestName(
                f => f.CreateIdentifierName("Integer"),
                cs: "Integer",
                vb: "[Integer]");
        }

        [WpfFact]
        public void TestGenericName1()
        {
            TestName(
                f => f.CreateGenericName("Outer", CreateClass("Inner1")),
                cs: "Outer<Inner1>",
                vb: "Outer(Of Inner1)");
        }

        [WpfFact]
        public void TestGenericName2()
        {
            TestName(
                f => f.CreateGenericName("Outer", CreateClass("Inner1"), CreateClass("Inner2")),
                cs: "Outer<Inner1, Inner2>",
                vb: "Outer(Of Inner1, Inner2)");
        }

        [WpfFact]
        public void TestGenericNameCSharpKeyword()
        {
            TestName(
                f => f.CreateGenericName("int", CreateClass("string"), CreateClass("bool")),
                cs: "@int<@string, @bool>",
                vb: "int(Of [string], bool)");
        }

        [WpfFact]
        public void TestGenericNameVisualBasicKeyword()
        {
            TestName(
                f => f.CreateGenericName("Integer", CreateClass("String"), CreateClass("Boolean")),
                cs: "Integer<String, Boolean>",
                vb: "[Integer](Of [String], [Boolean])");
        }

        [WpfFact]
        public void TestQualifiedName1()
        {
            TestName(
                f => f.CreateQualifiedName(f.CreateIdentifierName("Outer"), f.CreateIdentifierName("Inner1")),
                cs: "Outer.Inner1",
                vb: "Outer.Inner1");
        }

        [WpfFact]
        public void TestQualifiedNameCSharpKeywords1()
        {
            TestName(
                f => f.CreateQualifiedName(f.CreateIdentifierName("int"), f.CreateIdentifierName("string")),
                cs: "@int.@string",
                vb: "int.string");
        }

        [WpfFact]
        public void TestQualifiedNameVBKeywords1()
        {
            TestName(
                f => f.CreateQualifiedName(f.CreateIdentifierName("Integer"), f.CreateIdentifierName("String")),
                cs: "Integer.String",
                vb: "[Integer].String");
        }

        [WpfFact]
        public void TestQualifiedGenericName1()
        {
            TestName(
                f => f.CreateQualifiedName(
                    f.CreateIdentifierName("One"),
                    f.CreateGenericName("Outer",
                        CreateClass("Inner1"),
                        CreateClass("Inner2"))),
                cs: "One.Outer<Inner1, Inner2>",
                vb: "One.Outer(Of Inner1, Inner2)");
        }

        [WpfFact]
        public void TestQualifiedGenericName2()
        {
            TestName(
                f => f.CreateQualifiedName(
                    f.CreateGenericName("Outer",
                        CreateClass("Inner1"),
                        CreateClass("Inner2")),
                    f.CreateIdentifierName("One")),
                cs: "Outer<Inner1, Inner2>.One",
                vb: "Outer(Of Inner1, Inner2).One");
        }
    }
}
#endif


text:
@extends('frontend.layouts.master')

@section('content')

Reset Password

					{!! Form::open(['to' => 'password/reset', 'class' => 'form-horizontal', 'role' => 'form']) !!}

						<input type="hidden" name="token" value="{{ $token }}">

							E-mail Address

								{!! Form::input('email', 'email', old('email'), ['class' => 'form-control']) !!}

							Password

								{!! Form::input('password', 'password', null, ['class' => 'form-control']) !!}

							Confirm Password

								{!! Form::input('password', 'password_confirmation', null, ['class' => 'form-control']) !!}

								{!! Form::submit('Reset Password', ['class' => 'btn btn-primary']) !!}

					{!! Form::close() !!}

@endsection


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ys.samples.infrastructure.groups;
using ys.samples.services;

namespace ys.samples.infrastructure {
    public interface IGroupService : IDomainService<GroupModel> {
    }
}


text:
import static java.lang.System.*;

public class ServiceManager
{

  public ServiceManager(String [] serviceNames, int maxSize) {

    this.maxSize = maxSize;

    services = new ServiceQueue[serviceNames.length];

    for(int i=0; i<serviceNames.length; i++) {
      services[i] = new ServiceQueue(serviceNames[i], maxSize);
      services[i].beingServed = null;
    }
  }

  // verifica se o nome de um serviço é válido
  public boolean validServiceName(String serviceName) {
    int s = findService(serviceName);
    return s<services.length;
  }

  // verifica se existe um ou mais clientes à espera
  // de atendimento num dado serviço
  public boolean clientPending(String serviceName) {

    int s = findService(serviceName);
    assert s<services.length;

    return clientPending(s);
  }

  private boolean clientPending(int s) {
    return services[s].clientPendingExcept(beingServed());
  }

  // Verifica se a fila de um serviço está cheia
  public boolean serviceFull(String serviceName) {
    int s = findService(serviceName);
    assert s<services.length;

    return services[s].isFull();
  }

  // clear service manager
  public void clear() {
    for(int s=0; s<services.length; s++) {
      services[s].clear();
      services[s].beingServed = null;
    }
    first = null;
  }

  // retorna o índice do serviço no vector de serviços;
  // caso o serviço não exista, retorna o comprimento do vector
  private int findService(String serviceName) {

    int i = 0;
    while ( i<services.length  &&
        !services[i].serviceName().equals(serviceName) )
      i++;
    return i;
  }

  // Lista dos clientes que estão a ser servidos nos vários serviços
  private String [] beingServed() {
    int nBeingServed = 0;

    for(int i=0; i<services.length; i++)
      if (services[i].beingServed!=null) nBeingServed++;
    String [] a = new String[nBeingServed];
    int n = 0;
    for(int i=0; i<services.length; i++) {
      if (services[i].beingServed!=null) {
        a[n] = services[i].beingServed;
        n++;
      }
    }
    return a;
  }

  // Acrescentar dados de um serviço ao histórico de serviços
  private void logServiceData(int index,String client,int time) {
    HistoryNode n = new HistoryNode();
    n.time = time;
    n.serviceIndex = index;
    n.client = client;
    n.next = first;
    first = n;
  }

  // verifica se uma cadeia de caracteres existe num vector
  private static boolean inStringArray(String x, String [] a) {
    for(int i=0; i<a.length; i++)
      if (a[i].equals(x)) return true;
    return false;
  }

  // funde dois subvectores ordenados
  private static void mergeSubarrays(String[] a,int start,int middle,int end)
  {
    String[] b = new String[end-start];
    int i1 = start;
    int i2 = middle;
    int j = 0;
    while(i1 < middle && i2 < end) {
      if (a[i1].compareTo(a[i2]) < 0)
        b[j++] = a[i1++];
      else
        b[j++] = a[i2++];
    }
    while(i1 < middle)
      b[j++] = a[i1++];
    while(i2 < end)
      b[j++] = a[i2++];
    arraycopy(b, 0, a, start, end-start);
  }

  private ServiceQueue [] services;
  private int maxSize;

  private HistoryNode first = null;

  // ----------------- funções pedidas ------------------------
	public void queueFor(String clientName, String serviceName){
		assert validServiceName(serviceName);
		assert !serviceFull(serviceName);
		services[findService(serviceName)].in(clientName);
	}

	public void serveNext(String serviceName){
		ServiceQueue queue = services[findService(serviceName)];
		String[] clients = beingServed(); //List of clients being served
		boolean foundNext = false; //Found next client to serve
		String nextClient = "";
		while(!foundNext){
			foundNext = true;
			nextClient = queue.peek();
			queue.out();
			//Checks if the client is being served in another service
			for(String client : clients){
				if(client.equals(nextClient)){
					foundNext = false;
					break;
				}
			}
		}
		queue.beingServed = nextClient;
	}

	public void endService(String serviceName, int time){
		int index = findService(serviceName);
		ServiceQueue queue = services[index];
		logServiceData(index, queue.beingServed, time);
		queue.beingServed = null;
	}

	public int maxServiceTime(){
		return maxServiceTime(first, -1);
	}

	private int maxServiceTime(HistoryNode n, int max){
		if(n == null)
			return max;
		if(n.time > max)
			max = n.time;
		return maxServiceTime(n.next,max);
	}

	public boolean validServiceNameRec(String serviceName){
		return findServiceNameRec(serviceName, 0)<services.length;
	}
	//Returns the index of serviceName. Returns service.length in case it doesn't find the service
	private int findServiceNameRec(String serviceName, int index){
		if(index == services.length || services[index].serviceName().equals(serviceName))
			return index;
		return findServiceNameRec(serviceName,++index);
	}

	private void sort(String[] a, int start, int end){
		if(end - start > 1){
			int middle = (end + start) / 2;
			sort(a, start, middle);
			sort(a, middle, end);
			mergeSubarrays(a, start, middle, end);
		}
	}

	public String[] alphabeticalClientList(String serviceName){
		String[] a = services[findService(serviceName)].clientsInQueue();
		sort(a, 0, a.length);
		return a;
	}

}


text:
<?php

namespace App;

use DB;
use Illuminate\Database\Eloquent\Model;

class Subscribe extends Model
{
    /**
     * A subscribe belong to a user
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function owner() {
        return $this->belongsTo('App\User', 'user_id');
    }

    /**
     * A subscribe has subscribed question
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
     */
    public function questions() {
        return $this->belongsToMany('App\Question', 'subscribe_question')->withTimestamps();
    }

    /**
     * A subscribe has subscribed topics
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
     */
    public function topics() {
        return $this->belongsToMany('App\Topic', 'subscribe_topic')->withTimestamps();
    }

    /**
     * A subscribe has subscribed users
     *
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
     */
    public function users() {
        return $this->belongsToMany('App\User', 'subscribe_user')->withTimestamps();
    }

    public function bookmarks() {
        return $this->belongsToMany('App\Bookmark', 'subscribe_bookmark')->withTimestamps();
    }

    /**
     * Check has subscribed to a specific model
     *
     * @param $model_id
     * @param $type
     * @return bool
     */
    public function checkHasSubscribed($model_id, $type) {
        switch ($type) {
            case 'question' :
                return DB::table('subscribe_question')
                    ->whereSubscribeId($this->id)
                    ->whereQuestionId($model_id)
                    ->count() > 0;
            case 'topic' :
                return DB::table('subscribe_topic')
                    ->whereSubscribeId($this->id)
                    ->whereTopicId($model_id)
                    ->count() > 0;
            case 'user' :
                return DB::table('subscribe_user')
                    ->whereSubscribeId($this->id)
                    ->whereUserId($model_id)
                    ->count() > 0;
            case 'bookmark' :
                return DB::table('subscribe_bookmark')
                    ->whereSubscribeId($this->id)
                    ->whereBookmarkId($model_id)
                    ->count() > 0;
            default :
                return false;
        }
    }

}


text:
NSString *const kBookBookId = @"bookId";
NSString *const kBookName = @"name";
NSString *const kBookInfoDic = @"infoDic";
NSString *const kBookAuthor = @"author";

@interface Book ()

- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;

@end

@implementation Book

@synthesize _pk_bookId = _bookId;

#pragma mark - load
+ (void)load
{
    [[self getDataBase] addRegisteClass:self];
}

#pragma mark - NBDBTableModelProtocol
+ (NBDataBase *)getDataBase
{
    return [NBCommonDataBase sharedInstance];
}

+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
{
    return [[self alloc] initWithDictionary:dict];
}

- (instancetype)initWithDictionary:(NSDictionary *)dict
{
    self = [super init];

    // This check serves to make sure that a non-NSDictionary object
    // passed into the model class doesn't break the parsing.
    if(self && [dict isKindOfClass:[NSDictionary class]]) {
            self.bookId = [self objectOrNilForKey:kBookBookId fromDictionary:dict];
            self.name = [self objectOrNilForKey:kBookName fromDictionary:dict];
        self.infoDic = [self objectOrNilForKey:kBookInfoDic fromDictionary:dict];
        self.author = [User modelObjectWithDictionary:[dict objectForKey:kBookAuthor]];

    }

    return self;

}

- (NSDictionary *)dictionaryRepresentation
{
    NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
    [mutableDict setValue:self.bookId forKey:kBookBookId];
    [mutableDict setValue:self.name forKey:kBookName];
    [mutableDict setValue:self.infoDic forKey:kBookInfoDic];
    [mutableDict setValue:[self.author dictionaryRepresentation] forKey:kBookAuthor];

    return [NSDictionary dictionaryWithDictionary:mutableDict];
}

- (NSString *)description
{
    return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}

#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
{
    id object = [dict objectForKey:aKey];
    return [object isEqual:[NSNull null]] ? nil : object;
}

#pragma mark - NSCoding Methods

- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];

    self.bookId = [aDecoder decodeObjectForKey:kBookBookId];
    self.name = [aDecoder decodeObjectForKey:kBookName];
    self.infoDic = [aDecoder decodeObjectForKey:kBookInfoDic];
    self.author = [aDecoder decodeObjectForKey:kBookAuthor];
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{

    [aCoder encodeObject:_bookId forKey:kBookBookId];
    [aCoder encodeObject:_name forKey:kBookName];
    [aCoder encodeObject:_infoDic forKey:kBookInfoDic];
    [aCoder encodeObject:_author forKey:kBookAuthor];

}

- (id)copyWithZone:(NSZone *)zone
{
    Book *copy = [[Book alloc] init];

    if (copy) {

        copy.bookId = [self.bookId copyWithZone:zone];
        copy.name = [self.name copyWithZone:zone];
        copy.infoDic = [self.infoDic copyWithZone:zone];
        copy.author = [self.author copyWithZone:zone];

    }

    return copy;
}

@end


text:
Lexicon.add('ranch/Samson.Breeding.1', {

  layout: 'event',
  links: [
    { name:'Yes', action:'event:samsonBreeding_2' },
    { name:'No', action:'event:complete' },
  ],

  body:[
    { tag:"p", text:"The big tiger wipes the sweat off his brow and takes a seat on a nearby hay bale. \"Glad you "+
            "dropped by. So I take it you're new to the whole ranching business? Looking to set up a little slave "+
            "farm of your own? Well if you have a while I can go over what it is we do here. I know you're heard the "+
            "short version: 'We spend all day fucking the livestock.' Yeah, hard work I know. You interested in "+
            "hearing the long version?\"" },
  ],

});


text:
'use strict';

/**
 * Requirements
 * @ignore
 */
const Parser = require('../Parser.js').Parser;
const DocBlockParser = require('./DocBlockParser.js').DocBlockParser;
const DocumentationExample = require('../../model/documentation/DocumentationExample.js').DocumentationExample;
const ContentType = require('../../model/ContentType.js').ContentType;
const ContentKind = require('../../model/ContentKind.js').ContentKind;
const ErrorHandler = require('../../error/ErrorHandler.js').ErrorHandler;
const co = require('co');
const trimMultiline = require('../../utils/string.js').trimMultiline;

/**
 * A basic example to documentation parser
 */
class ExampleParser extends Parser
{
    /**
     * @param {Object} options
     */
    constructor(options)
    {
        super(options);

        // Assign options
        this._parser = new DocBlockParser();
    }

    /**
     * @inheritDocs
     */
    static get className()
    {
        return 'parser.documentation/ExampleParser';
    }

    /**
     * @type {parser.Parser}
     */
    get parser()
    {
        return this._parser;
    }

    /**
     * @param {string} content
     * @param {string} options
     * @returns {Promise<Array>}
     */
    parse(content, options)
    {
        if (!content || content.trim() === '')
        {
            Promise.resolve(false);
        }

        const scope = this;
        const promise = co(function*()
        {
            // Prepare
            let result;
            const contentType = options ? options.contentType || ContentType.JINJA : ContentType.JINJA;
            const contents = trimMultiline(content, [{ start: '{##', end: '#}' }]);

            // Parse first docblock
            let exampleRegex;
            if (contentType == ContentType.JINJA)
            {
                exampleRegex = /\{##((.|[\r\n\s])*?)#\}/ig;
            }
            else
            {
                exampleRegex = /\/\*\*([^*]|[\r\n\s]|(\*+([^*/]|[\r\n\s])))*\*+\//ig;
            }
            const exampleMatch = exampleRegex.exec(contents);
            if (exampleMatch)
            {
                result = yield scope.parser.parse(exampleMatch[0], { contentType: contentType, hint: 'example' });
            }
            else
            {
                result = new DocumentationExample();
            }

            // Set kind
            result.contentKind = ContentKind.EXAMPLE;

            return result;
        }).catch(ErrorHandler.handler(scope));

        return promise;
    }
}

/**
 * Exports
 * @ignore
 */
module.exports.ExampleParser = ExampleParser;


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Bot. Mag. 73: t. 4299. 1847

#### Original name
null

### Remarks
null


text:
"""
This program is to collect some AWS stuff
"""
import boto3
import threading

from local_helpers.config import accounts_db
from local_helpers import assume_role, get_session, misc
from local_helpers import elb_helper

if __name__ == "__main__":
    """main"""

    """bucket to hold results"""
    output_bucket = []

    """out of accounts_db, get list of available regions from first account"""
    regions = get_session.regions()

    if regions:
        """generate output header"""
        output_bucket.append(elb_helper.sg_rule_sets_by_elb_header())

        """go through each account and traverse each region"""
        """------------------------------------------------"""
        multi_thread = []

        """get tuple: account -> dict:, temp role creds -> dict:"""
        for account in accounts_db.accounts:
            """get temp creds from trusting roles"""
            role = assume_role.new_role(account)

            if role:
                for region in regions.get('Regions'):

                    """make an elb type client connection"""
                    elb = get_session.connect(
                    role,
                    'elb',
                    region_name=region.get('RegionName'))

                    """make an ec2 type client connection"""
                    ec2 = get_session.connect(
                    role,
                    'ec2',
                    region_name=region.get('RegionName'))

                    """
                    call elb.describe_load_balancers() in multithreading mode
                    for better performance. otherwise performance sucks.
                    """
                    thread_call = threading.Thread(
                         target=elb_helper.sg_rule_sets_by_elb,
                         args=(elb, ec2, account, region, output_bucket))
                    multi_thread.append(thread_call)
                    thread_call.start()

        """wait for all threads to finish"""
        for t in multi_thread:
            t.join()

        """output or export results"""
        if output_bucket:
            misc.output_lines(output_bucket)


text:
<?php
/**
 * [PHPFOX_HEADER]
 */

defined('PHPFOX') or exit('NO DICE!');

/**
 *
 *
 * @copyright		[PHPFOX_COPYRIGHT]
 * @author  		Raymond Benc
 * @package 		Phpfox_Service
 * @version 		$Id: register.class.php 3077 2011-09-12 18:27:31Z Raymond_Benc $
 */
class User_Service_Register extends Phpfox_Service
{
	public function getValidation($sStep = null)
	{
		$aValidation = array();

		if ($sStep == 1 || $sStep === null)
		{
			$aValidation['full_name'] = Phpfox::getPhrase('user.provide_your_full_name');
			$aValidation['email'] = array(
				'def' => 'email',
				'title' => Phpfox::getPhrase('user.provide_a_valid_email_address')
			);
			$aValidation['password'] = array(
				'def' => 'password',
				'title' => Phpfox::getPhrase('user.provide_a_valid_password')
			);

			if (Phpfox::getParam('user.new_user_terms_confirmation'))
			{
				$aValidation['agree'] = array(
					'def' => 'checkbox',
					'title' => Phpfox::getPhrase('user.check_our_agreement_in_order_to_join_our_site')
				);
			}

			if (!Phpfox::getParam('user.profile_use_id') && !Phpfox::getParam('user.disable_username_on_sign_up'))
			{
				$aValidation['user_name'] = array(
					'def' => 'username',
					'title' => Phpfox::getPhrase('user.provide_a_valid_user_name', array('min' => Phpfox::getParam('user.min_length_for_username'), 'max' => Phpfox::getParam('user.max_length_for_username')))
				);
			}
		}

		if ($sStep == 2 || $sStep === null)
		{
			if (Phpfox::getParam('core.registration_enable_dob'))
			{
				$aValidation['month'] = Phpfox::getPhrase('user.select_month_of_birth');
				$aValidation['day'] = Phpfox::getPhrase('user.select_day_of_birth');
				$aValidation['year'] = Phpfox::getPhrase('user.select_year_of_birth');
			}
			if (Phpfox::getParam('core.registration_enable_location'))
			{
				$aValidation['country_iso'] = Phpfox::getPhrase('user.select_current_location');
			}
			if (Phpfox::getParam('core.registration_enable_gender'))
			{
				$aValidation['gender'] = Phpfox::getPhrase('user.select_your_gender');
			}
		}

		if (Phpfox::isModule('captcha') && Phpfox::getParam('user.captcha_on_signup') && $sStep === null)
		{
			$aValidation['image_verification'] = Phpfox::getPhrase('captcha.complete_captcha_challenge');
		}

		return $aValidation;
	}

	/**
	 * If a call is made to an unknown method attempt to connect
	 * it to a specific plug-in with the same name thus allowing
	 * plug-in developers the ability to extend classes.
	 *
	 * @param string $sMethod is the name of the method
	 * @param array $aArguments is the array of arguments of being passed
	 */
	public function __call($sMethod, $aArguments)
	{
		/**
		 * Check if such a plug-in exists and if it does call it.
		 */
		if ($sPlugin = Phpfox_Plugin::get('user.service_register__call'))
		{
			return eval($sPlugin);
		}

		/**
		 * No method or plug-in found we must throw a error.
		 */
		Phpfox_Error::trigger('Call to undefined method ' . __CLASS__ . '::' . $sMethod . '()', E_USER_ERROR);
	}
}

?>


text:
package org.xtuml.bp.core.ui;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;

import org.xtuml.bp.core.CorePlugin;
import org.xtuml.bp.core.Domain_c;
import org.xtuml.bp.core.Ooaofooa;
import org.xtuml.bp.core.SystemModel_c;
import org.xtuml.bp.core.common.ClassQueryInterface_c;
import org.xtuml.bp.core.common.ComponentResourceListener;
import org.xtuml.bp.core.common.IDConvertor;
import org.xtuml.bp.core.common.IdAssigner;
import org.xtuml.bp.core.common.PersistableModelComponent;
import org.xtuml.bp.core.common.PersistenceManager;
import org.xtuml.bp.core.common.UUIDMap;
import org.xtuml.bp.core.util.UIUtil;

public class ConvertToMultifileWizard extends Wizard {
	public static final String copyright = "(c) Copyright 2005-2014 by Mentor Graphics Corporation.  All rights reserved.";

	private IProject project;

	private ConvertToMultifileWizardPage1 page1;

	private PersistenceManager manager;

	public ConvertToMultifileWizard(IProject projectToConvert) {
		if (projectToConvert == null) {
			throw new IllegalArgumentException(
					"Argument project cannot be null");
		}
		setNeedsProgressMonitor(true);
		project = projectToConvert;
	}

	public void addPages() {
		createListPage();
	}

	public IProject getSelectedProject() {
		return project;
	}

	private void createListPage() {
		page1 = new ConvertToMultifileWizardPage1("Convert To Multifile", this);
		page1.setTitle("Model Migration Wizard");
		page1
				.setDescription("Select the model(s) to convert to multifile format.");
		this.addPage(page1);
	}

	public List getModelFiles() {
		List<String> filesList = new ArrayList<String>(10);
		if (project != null) {
			IFolder mdl_folder = (IFolder) project
					.findMember(Ooaofooa.MODELS_DIRNAME);
			IResource[] mdl_content = null;
			if (mdl_folder != null) {
				if (!mdl_folder.isSynchronized(IResource.DEPTH_INFINITE)) {
					try { // Refresh the folder in case the user modified the contents in the file system
						mdl_folder.refreshLocal(IResource.DEPTH_INFINITE,
								new NullProgressMonitor());
					} catch (CoreException e) {
						CorePlugin.logError("Problem refreshing project : "
								+ mdl_folder.getName(), e);
					}
				}
				try {
					mdl_content = ((IFolder) mdl_folder).members();
				} catch (Exception e) {
					CorePlugin.logError("Problem accessing workspace ", e);
				}
				if (mdl_content != null) {
					IFolder dom_parent = (IFolder) mdl_folder
							.findMember(project.getName());
					for (int j = 0; j < mdl_content.length; ++j) {
						if (mdl_content[j] instanceof IFile) {
							IFile dom_file = (IFile) mdl_content[j];
							if (dom_file.getFileExtension().equals(
									Ooaofooa.MODELS_EXT)) {
								String fileName = dom_file.getFullPath()
										.removeFileExtension().lastSegment();
								if (dom_parent == null
										|| dom_parent.findMember(fileName) == null)
									filesList.add(dom_file.getName());
							}
						}
					} //END For
				}
			}
		}
		return filesList;
	}

	public boolean canFinish() {
		//String[] selectedNames = page1.getSelectedFilesList();
		//return (selectedNames != null && selectedNames.length > 0);
		return page1.isPageComplete();
	}

	public IWizardPage getNextPage(IWizardPage page) {
		return null;
	}

	public IWizardPage getPreviousPage(IWizardPage page) {
		return null;
	}

	private class myWRunnable implements IWorkspaceRunnable {
		public boolean returnResult;

		public void run(IProgressMonitor monitor) {
			// returns true to indicate the finish request was accepted, and false to indicate that the finish request was refused
			returnResult = true;

			Shell shell = getShell();
			shell
					.setCursor(shell.getDisplay().getSystemCursor(
							SWT.CURSOR_WAIT));
			manager = PersistenceManager.getDefaultInstance();

			SystemModel_c systemModel = SystemModel_c.SystemModelInstance(
					Ooaofooa.getDefaultInstance(), new ClassQueryInterface_c() {
						public boolean evaluate(Object candidate) {
							SystemModel_c selected = (SystemModel_c) candidate;
							return selected.getName().equals(project.getName());
						}
					});

			PersistableModelComponent sysModelComponent;

			if (systemModel != null) {
				sysModelComponent = PersistenceManager
						.getComponent(systemModel);
			} else {
				systemModel = new SystemModel_c(Ooaofooa.getDefaultInstance());
				systemModel.setName(project.getName());
				sysModelComponent = PersistenceManager.createRootComponent(
						project, systemModel);
			}

			boolean toPersist = !sysModelComponent.isPersisted();

			if (IdAssigner.isUUIDDummy(systemModel.getSys_id())) {
				toPersist = true;
				IdAssigner idAssigner = systemModel.getIdAssigner();
				Object oldKey = systemModel.getInstanceKey();
				systemModel.setSys_id(idAssigner.createUUID());
                systemModel.updateInstanceKey(oldKey, systemModel.getInstanceKey());
			}

			UUIDMap inputMap = new UUIDMap(null);

			if (toPersist) {
				try {
					sysModelComponent.persist();
				} catch (CoreException e) {
					CorePlugin.logError(
							"Problem while creating system model for project: "
									+ project.getName(), e);
					showErrorMessage(project.getName());
				}
			}

			String[] selectedFilesList = page1.getSelectedFilesList();
			boolean bDelete = page1.isDeleteSource();

			IFolder modelsFolder = getSelectedProject().getFolder(
					Ooaofooa.MODELS_DIRNAME);

			for (int j = 0; j < selectedFilesList.length; ++j) {
				IFile content = modelsFolder.getFile(selectedFilesList[j]);
				Ooaofooa mr = Ooaofooa.getInstance(content, true);
				Domain_c dom = Domain_c.DomainInstance(mr);
				IDConvertor.getInstance().convertToUUID(dom, inputMap);
				PersistableModelComponent component = PersistenceManager
						.getComponent(dom);
				try {
					if (component == null) {
						component = manager.registerModel(dom, project);
					}
					if (!component.isLoaded()) {
						dom.relateAcrossR28To(systemModel);
					}
					NewDomainWizard.persistSelfAndChildren(dom, new NullProgressMonitor());
					NewDomainWizard.displayDuplicateDialog();
					if (bDelete)
						content.delete(true, true, new NullProgressMonitor());
					returnResult = true;
				} catch (Throwable e) {
					CorePlugin.logError("Problem while migrating domain: "
							+ selectedFilesList[j], e);
					returnResult = false;
				} finally {
					NewDomainWizard.duplicateNames.clear();
				}
			}// END For

			UIUtil.refresh(systemModel); // refresh Model Explorer to show
			// converted domain
			shell.setCursor(shell.getDisplay()
					.getSystemCursor(SWT.CURSOR_ARROW));

			if (!returnResult) {
				showErrorMessage("Problem encountered while migrating, see error log for more information.");
			}
		}
	}

	public boolean performFinish() {
		// wrap with-in a WorkspaceRunnable so that created resources
		// have notifications sent in a batch
		myWRunnable wrunnable = new myWRunnable();
		ComponentResourceListener.setIgnoreResourceChanges(true);
		try {
			IWorkspace workspace = ResourcesPlugin.getWorkspace();
			ISchedulingRule rule = workspace.getRuleFactory().modifyRule(
					project);
			workspace.run(wrunnable, rule, IWorkspace.AVOID_UPDATE,
					new NullProgressMonitor());
		} catch (CoreException e) {
			CorePlugin.logError(
					"Unable to create multi-file models for project.", e);
		}
		return wrunnable.returnResult;
	}

	// helper method of performFinish to show error during conversion while wizard dialog is still open
	private void showErrorMessage(String fileName) {
		page1.setErrorMessage("Problem while creating system model(s) for "
				+ fileName + "\n" + "See console for further information");

	}
}


text:
import { createTable } from "../common/helpers";
import {StringCommandParameter} from "../common/command-params";

export class ListiOSApps implements ICommand {
	constructor(private $injector: IInjector,
		private $itmsTransporterService: IITMSTransporterService,
		private $logger: ILogger,
		private $prompter: IPrompter,
		private $stringParameterBuilder: IStringParameterBuilder) { }

	public allowedParameters: ICommandParameter[] = [new StringCommandParameter(this.$injector), new StringCommandParameter(this.$injector)];

	public execute(args: string[]): IFuture<void> {
		return (() => {
			let username = args[0],
				password = args[1];

			if(!username) {
				username = this.$prompter.getString("Apple ID", { allowEmpty: false }).wait();
			}

			if(!password) {
				password = this.$prompter.getPassword("Apple ID password").wait();
			}

			let iOSApplications = this.$itmsTransporterService.getiOSApplications({username, password}).wait();

			if (!iOSApplications || !iOSApplications.length) {
				this.$logger.out("Seems you don't have any applications yet.");
			} else {
				let table: any = createTable(["Application Name", "Bundle Identifier", "Version"], iOSApplications.map(element => {
					return [element.name, element.bundleId, element.version];
				}));

				this.$logger.out(table.toString());
			}
		}).future<void>()();
	}
}

$injector.registerCommand("appstore|*list", ListiOSApps);


text:
if defined?(ChefSpec)
  def setup_chef_server_image(resource_name)
    ChefSpec::Matchers::ResourceMatcher.new(:chef_server_image, :setup, resource_name)
  end
end


text:
The GenericCollection is an abstract implementation of many common methods of
collections.

The generic collection's methods depend on the implementation to provide
`constructClone`, `reduce`, `add`, `delete`, and `one` methods; and optionally
a `contentCompare` method for ordered collections.
From these methods, the generic collection derrives, `addEach`, `deleteEach`,
`forEach`, `map`, `filter`, `enumerate`, `group`, `every`, `some`, `toArray`,
`toObject`, `min`, `max`, `sum`, `average`, `concat`, `flatten`, `zip`, `join`,
`sorted`, `reversed`, `clone`, and `only`.

```
npm install @collections/generic-collection
```

## Collections

This package is part of the [collections][] project, one of many maintained in
its shared repository.

[collections]: https://github.com/kriskowal/collections

## License and Copyright

Copyright (c) 2015 Kristopher Michael Kowal and contributors.
All rights reserved.
MIT License


text:
package org.uma.jmetal.lab.experiment.component.impl;

import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.uma.jmetal.lab.experiment.Experiment;
import org.uma.jmetal.lab.experiment.component.ExperimentComponent;
import org.uma.jmetal.lab.experiment.util.ExperimentAlgorithm;
import org.uma.jmetal.lab.experiment.util.ExperimentProblem;
import org.uma.jmetal.qualityindicator.QualityIndicator;
import org.uma.jmetal.qualityindicator.impl.GenericIndicator;
import org.uma.jmetal.solution.Solution;
import org.uma.jmetal.util.JMetalException;
import org.uma.jmetal.util.JMetalLogger;
import org.uma.jmetal.util.front.Front;
import org.uma.jmetal.util.front.impl.ArrayFront;
import org.uma.jmetal.util.front.util.FrontNormalizer;
import org.uma.jmetal.util.front.util.FrontUtils;
import org.uma.jmetal.util.point.PointSolution;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.IntStream;

import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;

/**
 * This class computes the {@link QualityIndicator}s of an org.uma.jmetal.experiment. Once the algorithms of an
 * org.uma.jmetal.experiment have been executed through running an instance of class {@link ExecuteAlgorithms},
 * the list of indicators in obtained from the {@link ExperimentComponent #getIndicatorsList()} method.
 * Then, for every combination algorithm + problem, the indicators are applied to all the FUN files and
 * the resulting values are store in a file called as {@link QualityIndicator #getName()}, which is located
 * in the same directory of the FUN files.
 *
 * @author Antonio J. Nebro <antonio@lcc.uma.es>
 */
public class ComputeQualityIndicators<S extends Solution<?>, Result extends List<S>> implements ExperimentComponent {
  private final Experiment<S, Result> experiment;

  public ComputeQualityIndicators(Experiment<S, Result> experiment) {
    this.experiment = experiment;
  }

  @Override
  public void run() throws IOException {
    experiment.removeDuplicatedAlgorithms();
    resetIndicatorFiles();

    for (GenericIndicator<S> indicator : experiment.getIndicatorList()) {
      JMetalLogger.logger.info("Computing indicator: " + indicator.getName());

      for (ExperimentAlgorithm<?, Result> algorithm : experiment.getAlgorithmList()) {
        String algorithmDirectory;
        algorithmDirectory = experiment.getExperimentBaseDirectory() + "/data/" + algorithm.getAlgorithmTag();
        for (ExperimentProblem<?> problem : experiment.getProblemList()) {
          String problemDirectory = algorithmDirectory + "/" + problem.getTag();

          String referenceFrontDirectory = experiment.getReferenceFrontDirectory();

          String referenceFrontName = referenceFrontDirectory + "/" + problem.getReferenceFront();

          JMetalLogger.logger.info("RF: " + referenceFrontName);

          Front referenceFront = new ArrayFront(referenceFrontName, ",");

          FrontNormalizer frontNormalizer = new FrontNormalizer(referenceFront);
          Front normalizedReferenceFront = frontNormalizer.normalize(referenceFront);

          String qualityIndicatorFile = problemDirectory + "/" + indicator.getName();

          indicator.setReferenceParetoFront(normalizedReferenceFront);

          double[] indicatorValues = new double[experiment.getIndependentRuns()];
          IntStream.range(0, experiment.getIndependentRuns()).forEach(run -> {
            String frontFileName = problemDirectory + "/" +
                    experiment.getOutputParetoFrontFileName() + run + ".csv";
            Front front = null;
            try {
              front = new ArrayFront(frontFileName, ",");
            } catch (FileNotFoundException e) {
              e.printStackTrace();
            }
            Front normalizedFront = frontNormalizer.normalize(front);
            List<PointSolution> normalizedPopulation = FrontUtils.convertFrontToSolutionList(normalizedFront);
            Double indicatorValue = indicator.evaluate((List<S>) normalizedPopulation);
            JMetalLogger.logger.info(indicator.getName() + ": " + indicatorValue);
            indicatorValues[run] = indicatorValue;
          });

          for (double indicatorValue : indicatorValues) {
            writeQualityIndicatorValueToFile(indicatorValue, qualityIndicatorFile);
          }

          /*
          for (int run = 0; run < experiment.getIndependentRuns(); run++) {
            String frontFileName = problemDirectory + "/" +
                experiment.getOutputParetoFrontFileName() + run + ".csv";

            Front front = new ArrayFront(frontFileName, ",");
            Front normalizedFront = frontNormalizer.normalize(front);
            List<PointSolution> normalizedPopulation = FrontUtils.convertFrontToSolutionList(normalizedFront);
            Double indicatorValue = (Double) indicator.evaluate((List<S>) normalizedPopulation);
            JMetalLogger.logger.info(indicator.getName() + ": " + indicatorValue);

            writeQualityIndicatorValueToFile(indicatorValue, qualityIndicatorFile);
          }
           */
        }
      }
    }
    findBestIndicatorFronts(experiment);
    writeSummaryFile(experiment);
  }

  private void writeQualityIndicatorValueToFile(Double indicatorValue, String qualityIndicatorFile) {

    try (FileWriter os = new FileWriter(qualityIndicatorFile, true)) {
      os.write("" + indicatorValue + "\n");
    } catch (IOException ex) {
      throw new JMetalException("Error writing indicator file" + ex);
    }
  }

  public void findBestIndicatorFronts(Experiment<?, Result> experiment) throws IOException {
    for (GenericIndicator<?> indicator : experiment.getIndicatorList()) {
      for (ExperimentAlgorithm<?, Result> algorithm : experiment.getAlgorithmList()) {
        String algorithmDirectory;
        algorithmDirectory = experiment.getExperimentBaseDirectory() + "/data/" +
                algorithm.getAlgorithmTag();

        for (ExperimentProblem<?> problem : experiment.getProblemList()) {
          String indicatorFileName =
                  algorithmDirectory + "/" + problem.getTag() + "/" + indicator.getName();
          Path indicatorFile = Paths.get(indicatorFileName);

          List<String> fileArray;
          fileArray = Files.readAllLines(indicatorFile, StandardCharsets.UTF_8);

          List<Pair<Double, Integer>> list = new ArrayList<>();

          for (int i = 0; i < fileArray.size(); i++) {
            Pair<Double, Integer> pair = new ImmutablePair<>(Double.parseDouble(fileArray.get(i)), i);
            list.add(pair);
          }

          list.sort(Comparator.comparingDouble(pair -> Math.abs(pair.getLeft())));
          String bestFunFileName;
          String bestVarFileName;
          String medianFunFileName;
          String medianVarFileName;

          String outputDirectory = algorithmDirectory + "/" + problem.getTag();

          bestFunFileName = outputDirectory + "/BEST_" + indicator.getName() + "_FUN.csv";
          bestVarFileName = outputDirectory + "/BEST_" + indicator.getName() + "_VAR.csv";
          medianFunFileName = outputDirectory + "/MEDIAN_" + indicator.getName() + "_FUN.csv";
          medianVarFileName = outputDirectory + "/MEDIAN_" + indicator.getName() + "_VAR.csv";
          if (indicator.isTheLowerTheIndicatorValueTheBetter()) {
            String bestFunFile = outputDirectory + "/" +
                    experiment.getOutputParetoFrontFileName() + list.get(0).getRight() + ".csv";
            String bestVarFile = outputDirectory + "/" +
                    experiment.getOutputParetoSetFileName() + list.get(0).getRight() + ".csv";

            Files.copy(Paths.get(bestFunFile), Paths.get(bestFunFileName), REPLACE_EXISTING);
            Files.copy(Paths.get(bestVarFile), Paths.get(bestVarFileName), REPLACE_EXISTING);
          } else {
            String bestFunFile = outputDirectory + "/" +
                    experiment.getOutputParetoFrontFileName() + list.get(list.size() - 1).getRight() + ".csv";
            String bestVarFile = outputDirectory + "/" +
                    experiment.getOutputParetoSetFileName() + list.get(list.size() - 1).getRight() + ".csv";

            Files.copy(Paths.get(bestFunFile), Paths.get(bestFunFileName), REPLACE_EXISTING);
            Files.copy(Paths.get(bestVarFile), Paths.get(bestVarFileName), REPLACE_EXISTING);
          }

          int medianIndex = list.size() / 2;
          String medianFunFile = outputDirectory + "/" +
                  experiment.getOutputParetoFrontFileName() + list.get(medianIndex).getRight() + ".csv";
          String medianVarFile = outputDirectory + "/" +
                  experiment.getOutputParetoSetFileName() + list.get(medianIndex).getRight() + ".csv";

          Files.copy(Paths.get(medianFunFile), Paths.get(medianFunFileName), REPLACE_EXISTING);
          Files.copy(Paths.get(medianVarFile), Paths.get(medianVarFileName), REPLACE_EXISTING);
        }
      }
    }
  }

  /**
   * Deletes the files containing the indicator values if the exist.
   */
  private void resetIndicatorFiles() {
    for (GenericIndicator<S> indicator : experiment.getIndicatorList()) {
      for (ExperimentAlgorithm<?, Result> algorithm : experiment.getAlgorithmList()) {
        for (ExperimentProblem<?> problem : experiment.getProblemList()) {
          String algorithmDirectory;
          algorithmDirectory = experiment.getExperimentBaseDirectory() + "/data/" + algorithm.getAlgorithmTag();
          String problemDirectory = algorithmDirectory + "/" + problem.getTag();
          String qualityIndicatorFile = problemDirectory + "/" + indicator.getName();

          resetFile(qualityIndicatorFile);
        }
      }
    }
  }

  /**
   * Deletes a file or directory if it does exist
   *
   * @param file
   */
  private void resetFile(String file) {
    File f = new File(file);
    if (f.exists()) {
      JMetalLogger.logger.info("Already existing file " + file);

      if (f.isDirectory()) {
        JMetalLogger.logger.info("Deleting directory " + file);
        if (f.delete()) {
          JMetalLogger.logger.info("Directory successfully deleted.");
        } else {
          JMetalLogger.logger.info("Error deleting directory.");
        }
      } else {
        JMetalLogger.logger.info("Deleting file " + file);
        if (f.delete()) {
          JMetalLogger.logger.info("File successfully deleted.");
        } else {
          JMetalLogger.logger.info("Error deleting file.");
        }
      }
    } else {
      JMetalLogger.logger.info("File " + file + " does NOT exist.");
    }
  }

  private void writeSummaryFile(Experiment<S, Result> experiment) {
    JMetalLogger.logger.info("Writing org.uma.jmetal.experiment summary file");
    String headerOfCSVFile = "Algorithm,Problem,IndicatorName,ExecutionId,IndicatorValue";
    String csvFileName = this.experiment.getExperimentBaseDirectory() + "/QualityIndicatorSummary.csv";
    resetFile(csvFileName);

    try (FileWriter os = new FileWriter(csvFileName, true)) {
      os.write("" + headerOfCSVFile + "\n");

      for (GenericIndicator<?> indicator : experiment.getIndicatorList()) {
        for (ExperimentAlgorithm<?, Result> algorithm : experiment.getAlgorithmList()) {
          String algorithmDirectory;
          algorithmDirectory = experiment.getExperimentBaseDirectory() + "/data/" +
                  algorithm.getAlgorithmTag();

          for (ExperimentProblem<?> problem : experiment.getProblemList()) {
            String indicatorFileName =
                    algorithmDirectory + "/" + problem.getTag() + "/" + indicator.getName();
            Path indicatorFile = Paths.get(indicatorFileName);
            if (indicatorFile == null) {
              throw new JMetalException("Indicator file " + indicator.getName() + " doesn't exist");
            }
            System.out.println("-----");
            System.out.println(indicatorFileName);

            List<String> fileArray;
            fileArray = Files.readAllLines(indicatorFile, StandardCharsets.UTF_8);
            System.out.println(fileArray);
            System.out.println("++++++");

            for (int i = 0; i < fileArray.size(); i++) {
              String row = algorithm.getAlgorithmTag() + "," + problem.getTag() + "," + indicator.getName() + "," + i + "," + fileArray.get(i);
              os.write("" + row + "\n");
            }
          }
        }
      }
    } catch (IOException ex) {
      throw new JMetalException("Error writing indicator file" + ex);
    }
  }
}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.11.30 at 08:24:17 PM JST
//

package eu.datex2.schema._2_0rc1._2_0;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for WidthCharacteristic complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="WidthCharacteristic">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="comparisonOperator" type="{http://datex2.eu/schema/2_0RC1/2_0}ComparisonOperatorEnum"/>
 *         <element name="vehicleWidth" type="{http://datex2.eu/schema/2_0RC1/2_0}MetresAsFloat"/>
 *         <element name="widthCharacteristicExtension" type="{http://datex2.eu/schema/2_0RC1/2_0}ExtensionType" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WidthCharacteristic", propOrder = {
    "comparisonOperator",
    "vehicleWidth",
    "widthCharacteristicExtension"
})
public class WidthCharacteristic {

    @XmlElement(required = true)
    @XmlSchemaType(name = "string")
    protected ComparisonOperatorEnum comparisonOperator;
    protected float vehicleWidth;
    protected ExtensionType widthCharacteristicExtension;

    /**
     * Gets the value of the comparisonOperator property.
     *
     * @return
     *     possible object is
     *     {@link ComparisonOperatorEnum }
     *
     */
    public ComparisonOperatorEnum getComparisonOperator() {
        return comparisonOperator;
    }

    /**
     * Sets the value of the comparisonOperator property.
     *
     * @param value
     *     allowed object is
     *     {@link ComparisonOperatorEnum }
     *
     */
    public void setComparisonOperator(ComparisonOperatorEnum value) {
        this.comparisonOperator = value;
    }

    /**
     * Gets the value of the vehicleWidth property.
     *
     */
    public float getVehicleWidth() {
        return vehicleWidth;
    }

    /**
     * Sets the value of the vehicleWidth property.
     *
     */
    public void setVehicleWidth(float value) {
        this.vehicleWidth = value;
    }

    /**
     * Gets the value of the widthCharacteristicExtension property.
     *
     * @return
     *     possible object is
     *     {@link ExtensionType }
     *
     */
    public ExtensionType getWidthCharacteristicExtension() {
        return widthCharacteristicExtension;
    }

    /**
     * Sets the value of the widthCharacteristicExtension property.
     *
     * @param value
     *     allowed object is
     *     {@link ExtensionType }
     *
     */
    public void setWidthCharacteristicExtension(ExtensionType value) {
        this.widthCharacteristicExtension = value;
    }

}


text:
import { connect } from 'react-redux';
import { makeSelectClaimForUri, makeSelectTitleForUri } from 'lbry-redux';
import SocialShare from './view';
import { selectUserInviteReferralCode, selectUser } from 'redux/selectors/user';
import { makeSelectContentPositionForUri } from 'redux/selectors/content';

const select = (state, props) => ({
  claim: makeSelectClaimForUri(props.uri)(state),
  referralCode: selectUserInviteReferralCode(state),
  user: selectUser(state),
  title: makeSelectTitleForUri(props.uri)(state),
  position: makeSelectContentPositionForUri(props.uri)(state),
});

export default connect(select)(SocialShare);


text:
import unittest

from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer

class CognitiveServicesApiPropertiesTests(ScenarioTest):
    @ResourceGroupPreparer()
    def test_cognitiveservices_account_capabilities(self, resource_group):
        sname = self.create_random_name(prefix='cs_cli_test_', length=16)

        self.kwargs.update({
            'sname': sname,
            'kind': 'FormRecognizer',
            'sku': 'F0',
            'location': 'centraluseuap'
        })

        # test to create cognitive services account
        self.cmd('az cognitiveservices account create -n {sname} -g {rg} --kind {kind} --sku {sku} -l {location} --yes',
                 checks=[self.check('name', '{sname}'),
                         self.check('location', '{location}'),
                         self.check('sku.name', '{sku}')])
        account = self.cmd('az cognitiveservices account show -n {sname} -g {rg}').get_output_in_json()
        self.assertTrue(account['properties']['capabilities'] is not None)
        self.assertTrue(len(account['properties']['capabilities']) > 0)
        self.assertTrue(account['properties']['capabilities'][0]['name'] is not None)
        self.assertTrue(account['properties']['capabilities'][0]['name'] != '')

        # delete the cognitive services account
        ret = self.cmd('az cognitiveservices account delete -n {sname} -g {rg}')
        self.assertEqual(ret.exit_code, 0)

    @ResourceGroupPreparer()
    def test_cognitiveservices_account_public_network_access(self, resource_group):
        sname = self.create_random_name(prefix='cs_cli_test_', length=16)

        self.kwargs.update({
            'sname': sname,
            'kind': 'Face',
            'sku': 'S0',
            'location': 'centraluseuap'
        })

        # test to create cognitive services account
        self.cmd('az cognitiveservices account create -n {sname} -g {rg} --kind {kind} --sku {sku} -l {location} --yes',
                 checks=[self.check('name', '{sname}'),
                         self.check('location', '{location}'),
                         self.check('sku.name', '{sku}')])
        account = self.cmd('az cognitiveservices account show -n {sname} -g {rg}').get_output_in_json()
        print(account)
        self.assertEqual(account['properties']['publicNetworkAccess'], 'Enabled')

        import time
        for i in range(10):
            time.sleep(15)
            account = self.cmd('az cognitiveservices account show -n {sname} -g {rg}').get_output_in_json()
            if 'Creating' != account['properties']['provisioningState']:
                break

        # delete the cognitive services account
        ret = self.cmd('az cognitiveservices account delete -n {sname} -g {rg}')
        self.assertEqual(ret.exit_code, 0)

if __name__ == '__main__':
    unittest.main()


text:
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CSGCylinder3D" inherits="CSGPrimitive3D" version="4.0">
	<brief_description>
		A CSG Cylinder shape.
	</brief_description>
	<description>
		This node allows you to create a cylinder (or cone) for use with the CSG system.
	</description>
	<tutorials>
	</tutorials>
	<members>
		<member name="cone" type="bool" setter="set_cone" getter="is_cone" default="false">
			If [code]true[/code] a cone is created, the [member radius] will only apply to one side.
		</member>
		<member name="height" type="float" setter="set_height" getter="get_height" default="1.0">
			The height of the cylinder.
		</member>
		<member name="material" type="Material" setter="set_material" getter="get_material">
			The material used to render the cylinder.
		</member>
		<member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0">
			The radius of the cylinder.
		</member>
		<member name="sides" type="int" setter="set_sides" getter="get_sides" default="8">
			The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder.
		</member>
		<member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces" default="true">
			If [code]true[/code] the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If [code]false[/code] the cylinder will have a flat shaded look.
		</member>
	</members>
</class>


text:
import compose from 'koa-compose'

/**
 * Compose multiple instances of koa-router
 * into a single `use`-able middleware.
 *
 * @param  {Object[] | ...Object} routers
 * @return {GeneratorFunction}
 */
export default function combineRouters (routers) {
  if (!Array.isArray(routers)) {
    routers = Array.prototype.slice.call(arguments)
  }

  var middleware = []

  routers.forEach(function (router) {
    middleware.push(router.routes())
    middleware.push(router.allowedMethods())
  })

  return compose(middleware)
}


text:
## Selectize API – Plugins

Via the [microplugin](https://github.com/brianreavis/microplugin.js) interface,
features can be added to Selectize without modifying the main library.
This is great because it protects against code bloat, allows for lean builds,
and allows for addons to be sanely isolated. The plugin system isn't meant
to be sexy; it's lean, makes very few assumptions, and gives the developer
complete control.

[**Example Plugins**](../src/plugins)

**A few notes:**
- All plugins live in their own folders in ["src/plugins"](../src/plugins).
- Plugin names should be in follow the format: `/[a-z_]+$`
- JS source should live in a "plugin.js" file (required).
- CSS should live in a "plugin.less" file (optional). It will be bundled at build time.
- Plugins are initialized right before the control is setup.
  This means that if you want to listen for events on any of the control's
  elements, you should override the `setup()` method (see ["DOM Events"](#dom-events)).

### Boilerplate

```js
Selectize.define('plugin_name', function(options) {
	// options: plugin-specific options
	// this: Selectize instance
});
```

#### Adding Dependencies

```js
Selectize.define('plugin_name', function(options) {
	this.require('another_plugin');
});
```

## Overriding Methods

Methods should be extended by [wrapping them](http://coreymaynard.com/blog/extending-a-javascript-function/):

```js
var self = this;
this.someMethod = (function() {
	var original = self.someMethod;
	return function() {
		// do your logic
		return original.apply(this, arguments);
	};
})();
```

**Important:** If the method you're overriding returns a value, make sure the
overridden function returns a value as well.

## DOM Events

Because all elements for the control are created within the `setup()` method (which is
invoked after the plugin initialized) events should be added by overriding the setup method,
like so:

```js
Selectize.define('plugin_name', function(options) {
	var self = this;

	// override the setup method to add an extra `click`  handler
	this.setup = (function() {
		var original = self.setup;
		return function() {
			original.apply(this, arguments);
			this.$control.on('click', 'div', function(e) {
				alert('A div was clicked!');
			});
		};
	})();

});
```

## Plugin Usage

#### List (without options)

```js
$('select').selectize({
	plugins: ['plugin_a', 'plugin_b']
});
```

#### List (with options)

```js
$('select').selectize({
	plugins: {
		'plugin_a': { /* ... */ },
		'plugin_b': { /* ... */ }
	}
});
```

For a more detailed description of plugin option formats and how the plugin system works, check out the [microplugin](https://github.com/brianreavis/microplugin.js) documentation.


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC  "-//CL//DTD XHTML 1.0 Transitional plus Embed//EN"
  "http://www.w3.org/Graphics/xhtml1-transitional-plus-embed.dtd">

      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <meta name="keywords" content="W3C SVG 1.1 2nd Edition Test Suite"/>
      <meta name="description" content="W3C SVG 1.1 2nd Edition Embedded Test Suite"/>
      <title>
SVG 1.1 2nd Edition Test (<embed>): paths-data-13-t.svg
      </title>

      <link rel="prev" href="paths-data-12-t.html" />
      <link rel="index" href="index.html" />
      <link rel="next" href="paths-data-14-t.html" />

Specification link: 8.3 Path Data

    paths-data-12-t ←
    index
    → paths-data-14-t

    Tests that contain the draft-watermark are under development and may be incorrectly testing a feature.

paths-data-13-t.svg

            SVG Image

            PNG Image

            <embed src="../../svg/paths-data-13-t.svg" width="480" height="360"/>

      Operator Script

      Run the test. No interaction required.

    Pass Criteria

The test is passed if there is one horizontal green line and one vertical blue line.

    Test Description

          Test multiple coordinates for V and H.

    paths-data-12-t ←
    index
    → paths-data-14-t