text:
package com.gem.xperiaxposed.home;

import static com.gem.xperiaxposed.Conditionals.*;
import static com.gem.xperiaxposed.XposedMain.*;
import static com.gem.xperiaxposed.systemui.SystemUIResources.*;
import static com.gem.xposed.ReflectionUtils.*;
import static de.robv.android.xposed.XposedBridge.*;
import static de.robv.android.xposed.XposedHelpers.*;

import java.util.Map;
import java.util.WeakHashMap;

import android.appwidget.AppWidgetProviderInfo;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import com.gem.xposed.AutoHook;
import com.sonymobile.flix.components.Component;
import com.sonymobile.flix.components.Image;
import com.sonymobile.flix.components.Scene;
import com.sonymobile.flix.util.Animation;
import com.sonymobile.grid.GridRect;
import com.sonymobile.home.HomeFragment;
import com.sonymobile.home.MainView;
import com.sonymobile.home.apptray.AppTray;
import com.sonymobile.home.apptray.AppTrayDrawerView;
import com.sonymobile.home.apptray.AppTrayPageIndicatorView;
import com.sonymobile.home.apptray.AppTrayPageView;
import com.sonymobile.home.apptray.AppTrayPresenter;
import com.sonymobile.home.apptray.AppTrayView;
import com.sonymobile.home.bitmap.MirrorBitmapDrawable;
import com.sonymobile.home.cui.CuiWidgetLoadHelper;
import com.sonymobile.home.data.Item;
import com.sonymobile.home.desktop.Desktop;
import com.sonymobile.home.desktop.DesktopPageIndicatorView;
import com.sonymobile.home.desktop.DesktopPresenter;
import com.sonymobile.home.desktop.DesktopView;
import com.sonymobile.home.folder.FolderOpener;
import com.sonymobile.home.folder.OpenFolderAdapter;
import com.sonymobile.home.presenter.view.ActivityItemView;
import com.sonymobile.home.presenter.view.AdvWidgetItemView;
import com.sonymobile.home.presenter.view.IconLabelView;
import com.sonymobile.home.presenter.view.ItemViewCreatorBase;
import com.sonymobile.home.presenter.view.ShortcutItemView;
import com.sonymobile.home.stage.StageView;
import com.sonymobile.home.textview.TextViewUtilities;
import com.sonymobile.home.ui.pageview.PageViewInteractionListener;
import com.sonymobile.home.ui.widget.AdvWidgetProviderHelper;
import com.sonymobile.home.ui.widget.HomeAdvWidget;
import com.sonymobile.home.ui.widget.HomeAdvWidgetManager;
import com.sonymobile.home.ui.widget.HomeAppWidgetManager;
import com.sonymobile.ui.support.SystemUiVisibilityWrapper;

import de.robv.android.xposed.XC_MethodHook.MethodHookParam;
import de.robv.android.xposed.XC_MethodReplacement;
import de.robv.android.xposed.callbacks.XC_LoadPackage;

////////////////////////////////////////////////////////////

public class HomeHooks
{

////////////////////////////////////////////////////////////

  public static Desktop desktop;
  public static AppTray appTray;
  public static DesktopPresenter desktopPresenter;
  public static AppTrayPresenter appTrayPresenter;

////////////////////////////////////////////////////////////

  @SuppressWarnings("unused")
  public static void hookInitial(XC_LoadPackage.LoadPackageParam param)
  {
    new AutoHook()
    {
      public void after_all_constructors(Desktop thiz)
      {
        desktop = thiz;
      }
      public void after_all_constructors(AppTray thiz)
      {
        appTray = thiz;
      }
      public void after_all_constructors(DesktopPresenter thiz)
      {
        desktopPresenter = thiz;
      }
      public void after_all_constructors(AppTrayPresenter thiz)
      {
        appTrayPresenter = thiz;
      }
    };
  }

////////////////////////////////////////////////////////////

  @SuppressWarnings("unused")
  public static void hookTransparency(XC_LoadPackage.LoadPackageParam param)
  {
    final int system_ui_transparent_background = prefs.getInt("key_systemui_translucent_background", SYSTEM_UI_TRANSPARENT_BACKGROUND);
    new AutoHook()
    {
      public Object before_getSystemUiBackgroundColor(com.sonymobile.home.util.SystemUiExtensions thiz, Context c)
      {
        return system_ui_transparent_background;
      }
    };

    if(JELLYBEAN_LAUNCHER && !prefs.getBoolean("key_menu_dark_bars", false))
    {
      new AutoHook()
      {
        public Object before_setSystemUiTransparent(AppTrayPresenter thiz, boolean b)
        {
          return VOID;
        }
      };
    }

    final boolean transparentDesktop = prefs.getBoolean("key_transparent_desktop", false);
    final boolean transparentDrawer = prefs.getBoolean("key_transparent_drawer", false);

    if(JELLYBEAN && (transparentDesktop || transparentDrawer))
    {
      new AutoHook()
      {
        public void after_all_constructors(MainView thiz)
        {
          setFullTransparent(thiz, transparentDesktop);
        }

        public void after_showApptray(MainView thiz, boolean show)
        {
          if(show)
            setFullTransparent(thiz, transparentDrawer);
        }

        public void after_showDesktop(MainView thiz, boolean show)
        {
          if(show)
            setFullTransparent(thiz, transparentDesktop);
        }

        public void after_setFocused(HomeFragment thiz, boolean focused)
        {
          if(focused)
          {
            MainView mainView = thiz.getMainView();
            if(mainView != null)
            {
              if((Boolean)callMethod(mainView, "isDesktopOpen"))
                setFullTransparent(mainView, transparentDesktop);
              else if((Boolean)callMethod(mainView, "isAppTrayOpen"))
                setFullTransparent(mainView, transparentDrawer);
            }
          }
        }

        public void before_apply(SystemUiVisibilityWrapper thiz)
        {
          Object mainView = getObjectField(thiz, "mView");
          if(mainView != null)
          {
            if((Boolean)callMethod(mainView, "isDesktopOpen"))
            {
              if(transparentDesktop)
                callMethod(thiz, "setFlag", SYSTEM_UI_FLAG_FULL_TRANSPARENCY, true);
            }
            else if((Boolean)callMethod(mainView, "isAppTrayOpen"))
            {
              if(transparentDrawer)
                callMethod(thiz, "setFlag", SYSTEM_UI_FLAG_FULL_TRANSPARENCY, true);
            }
          }
        }

        private void setFullTransparent(View view, boolean value)
        {
          if(value)
            view.setSystemUiVisibility(view.getSystemUiVisibility() | SYSTEM_UI_FLAG_FULL_TRANSPARENCY);
          else
            view.setSystemUiVisibility(view.getSystemUiVisibility() & ~SYSTEM_UI_FLAG_FULL_TRANSPARENCY);
        }
      };
    }
  }

////////////////////////////////////////////////////////////

  @SuppressWarnings("unused")
  public static void hookFont(XC_LoadPackage.LoadPackageParam param)
  {
    if(prefs.getBoolean("key_condensed_font", false))
    {
      new AutoHook()
      {
        Typeface CONDENSED_FONT = Typeface.createFromFile("/system/fonts/RobotoCondensed-Regular.ttf");

        public void after_createTextView(TextViewUtilities thiz, Context c, float f, int i, MethodHookParam param)
        {
          ((TextView)param.getResult()).getPaint().setTypeface(CONDENSED_FONT);
        }

        public void after_createTextView(TextViewUtilities thiz, Context c, String s, float f, int i1, int i2, Rect r, Typeface t, int i3, MethodHookParam param)
        {
          ((TextView)param.getResult()).getPaint().setTypeface(CONDENSED_FONT);
        }
      };
    }
  }

////////////////////////////////////////////////////////////

  @SuppressWarnings("unused")
  public static void hookLayout(XC_LoadPackage.LoadPackageParam param)
  {
    if(JELLYBEAN && prefs.getBoolean("key_fullscreen_layout", false))
    {
      new AutoHook()
      {
        public void before_showMainView(HomeFragment thiz)
        {
          DisplayData.updateConfiguration(thiz.getActivity(), thiz.getResources(), thiz.getActivity().getWindowManager().getDefaultDisplay());
        }

        public void before_onSceneCreated(MainView thiz, Scene scene, int paramInt1, int paramInt2)
        {
          scene.setOuterPadding(0, -DisplayData.getTopOffset(), -DisplayData.getRightOffset(), -DisplayData.getBottomOffset());
          scene.move((0-DisplayData.getRightOffset()) / 2.0f, (DisplayData.getTopOffset()-DisplayData.getBottomOffset()) / 2.0f);
        }

        public void before_onSceneSizeChanged(MainView thiz, Scene scene, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
        {
          scene.setOuterPadding(0, -DisplayData.getTopOffset(), -DisplayData.getRightOffset(), -DisplayData.getBottomOffset());
          scene.move((0-DisplayData.getRightOffset()) / 2.0f, (DisplayData.getTopOffset()-DisplayData.getBottomOffset()) / 2.0f);
        }

        @EnableIf("KITKAT_LAUNCHER")
        public Object before_updateSceneMargins(MainView thiz)
        {
          return VOID;
        }

        public void after_initialize(AppTrayDrawerView thiz, float f1, float f2, float f3)
        {
          ListView listView = getField(thiz, "mListView");
          listView.setPadding(Math.round(f1 - f3), DisplayData.getTopOffset(), 0, DisplayData.getBottomOffset());
        }

        public void after_onDrawerSizeChanged(AppTrayDrawerView thiz, float f1, float f2, float f3)
        {
          ListView listView = getField(thiz, "mListView");
          listView.setPadding(Math.round(f1 - f3), DisplayData.getTopOffset(), 0, DisplayData.getBottomOffset());
          thiz.getViewWrapper().move(0, -(DisplayData.getTopOffset()-DisplayData.getBottomOffset()) / 2.0f);
        }

        public Object after_getWorldY(Component thiz, MethodHookParam param)
        {
          Scene scene = thiz.getScene();
          if(scene != null)
            return (Float)param.getResult() + scene.getOuterPadding().top;
          else
            return NONE;
        }

        public void before_apply(SystemUiVisibilityWrapper thiz)
        {
          Object mainView = getObjectField(thiz, "mView");
          if(mainView != null)
            callMethod(thiz, "setFlag", View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, true);
        }
      };
    }

    final boolean desktop_disable_pagination = prefs.getBoolean("key_desktop_disable_pagination", false);
    final boolean drawer_disable_pagination = prefs.getBoolean("key_drawer_disable_pagination", false);
    if(desktop_disable_pagination || drawer_disable_pagination)
    {
      new AutoHook()
      {
        public void after_onSceneCreated(MainView thiz, Scene scene, int i1, int i2)
        {
          if(desktop_disable_pagination)
          {
            DesktopView view = getField(desktop, "mDesktopView");
            DesktopPageIndicatorView pageIndicator = getField(desktopPresenter, "mPageIndicatorView");
            view.removeChild(pageIndicator);
          }
          if(drawer_disable_pagination)
          {
            AppTrayView view = getField(appTray, "mAppTrayView");
            AppTrayPageIndicatorView pageIndicator = getField(appTrayPresenter, "mPageIndicatorView");
            view.removeChild(pageIndicator);
          }
        }
      };
    }

    final boolean desktop_disable_labels = prefs.getBoolean("key_desktop_disable_labels", false);
    final boolean folder_disable_labels = prefs.getBoolean("key_folder_disable_labels", false);
    final boolean drawer_disable_labels = prefs.getBoolean("key_drawer_disable_labels", false);
    if(desktop_disable_labels || folder_disable_labels || drawer_disable_labels)
    {
      new AutoHook()
      {
        public Object after_includedLabel(ItemViewCreatorBase thiz, Item item)
        {
          String name = item.getPageViewName();
          if(desktop_disable_labels && "desktop".equals(name))
            return false;
          if(folder_disable_labels && "folder".equals(name))
            return false;
          if(drawer_disable_labels && "apptray".equals(name))
            return false;
          else
            return NONE;
        }

        public Object before_setMaxTextSize(IconLabelView thiz, int size)
        {
          if(! getBooleanField(thiz, "mIncludedLabel"))
            return VOID;
          else
            return NONE;
        }
      };
    }

    final int iconSize = prefs.getInt("key_launcher_icon_size", 100);
    if(iconSize != 100)
    {
      new AutoHook()
      {
        public void after_scaleIconToMaxSize(IconLabelView thiz)
        {
          Image image = thiz.getImage();
          if(image != null && image.getBitmap() != null)
            image.setScaling(image.getScalingX() * iconSize / 100.0f);
        }
      };
    }
  }

////////////////////////////////////////////////////////////

  @SuppressWarnings("unused")
  public static void hookDesktop(XC_LoadPackage.LoadPackageParam param)
  {
    if(KITKAT && Integer.parseInt(prefs.getString("key_desktop_rows", "4")) != 4)
    {
      new AutoHook()
      {
        @DisableIf("Z3_KITKAT_LAUNCHER")
        public void before_layoutDesktop(MainView thiz)
        {
          setFloatField(thiz, "mDesktopPaginationVerticalOffset", getFloatField(thiz, "mDesktopPaginationVerticalOffset")*0.75f);
        }
      };
    }

    final int desktop_animation = Integer.valueOf(prefs.getString("key_desktop_animation", Integer.toString(Animations.DESKTOP_DEFAULT)));
    if(desktop_animation != Animations.DESKTOP_DEFAULT)
    {
      if(LAUNCHER_HAS_ANIMATIONS && (desktop_animation != Animations.SIMPLE))
      {
        new AutoHook()
        {
          public void after_all_constructors(DesktopView thiz)
          {
            setIntField(thiz, "mAnimNbr", desktop_animation);
          }
        };
      }
      else
      {
        new AutoHook()
        {
          private Animations animations = null;

          public void after_all_constructors(DesktopView thiz)
          {
            animations = new Animations(thiz);
          }

          public Object before_updateFromTouch(DesktopView thiz, boolean b)
          {
            if(animations != null)
            {
              animations.animate(b, desktop_animation);
              return VOID;
            }
            return NONE;
          }
        };
      }
    }

    final int drawer_animation = Integer.valueOf(prefs.getString("key_drawer_animation", Integer.toString(Animations.DRAWER_DEFAULT)));
    if(drawer_animation != Animations.DRAWER_DEFAULT)
    {
      new AutoHook()
      {
        private Animations animations = null;

        public void after_all_constructors(AppTrayView thiz)
        {
          animations = new Animations(thiz);
        }

        public Object before_updateFromTouch(AppTrayView thiz, boolean b)
        {
          if(animations != null)
          {
            animations.animate(b, drawer_animation);
            return VOID;
          }
          return NONE;
        }
      };
    }
  }

////////////////////////////////////////////////////////////

  @SuppressWarnings("unused")
  public static void hookDock(XC_LoadPackage.LoadPackageParam param)
  {
    if(JELLYBEAN_LAUNCHER && prefs.getBoolean("key_disable_dock_stage", false))
    {
      new AutoHook()
      {
        public void after_updateBackground(StageView thiz)
        {
          ((Image)getObjectField(thiz, "mBackground")).setBitmap(null);
        }
      };
    }

    if(JELLYBEAN_LAUNCHER && prefs.getBoolean("key_disable_dock_reflection", false))
    {
      new AutoHook()
      {
        public void after_all_constructors(MirrorBitmapDrawable thiz)
        {
          thiz.setMirrorEnabled(false);
        }
      };
    }
  }

////////////////////////////////////////////////////////////

  @SuppressWarnings("unused")
  public static void hookDrawer(XC_LoadPackage.LoadPackageParam param)
  {
    if(KITKAT && Integer.parseInt(prefs.getString("key_drawer_rows", "5")) != 5)
    {
      new AutoHook()
      {
        @DisableIf("Z3_KITKAT_LAUNCHER")
        public void before_layoutAppTray(MainView thiz)
        {
          setFloatField(thiz, "mApptrayPaginationVerticalOffset", getFloatField(thiz, "mApptrayPaginationVerticalOffset")*0.75f);
        }
      };
    }

    final boolean transparentDrawer = JELLYBEAN && prefs.getBoolean("key_transparent_drawer", false);
    final boolean enableDrawerBackground = prefs.getBoolean("key_enable_drawer_background", false);
    if(transparentDrawer || enableDrawerBackground)
    {
      final int backgroundColor = enableDrawerBackground ? prefs.getInt("key_drawer_background", 0) : 0;
      new AutoHook()
      {
        public void after_all_constructors(AppTrayView thiz)
        {
          setIntField(thiz, "mBackgroundColor", backgroundColor);
        }
      };
    }

    if(JELLYBEAN_LAUNCHER && prefs.getBoolean("key_disable_drawer_backplate", false))
    {
      new AutoHook()
      {
        public void after_all_constructors(AppTrayPageView thiz)
        {
          thiz.getContent().removeChild((Component)getObjectField(thiz, "mDefaultBackplate"));
          thiz.getContent().removeChild((Component)getObjectField(thiz, "mUninstallBackplate"));
        }
      };
    }

    if(prefs.getBoolean("key_remember_drawer_page", false))
    {
      new AutoHook()
      {
        public Object before_gotoDefaultPage(AppTrayView thiz)
        {
          return VOID;
        }
      };
    }

    final int drawer_menu_opacity = prefs.getInt("key_drawer_menu_opacity", 100);
    if(drawer_menu_opacity != 100)
    {
      new AutoHook()
      {
        public void after_initialize(AppTrayDrawerView thiz, float f1, float f2, float f3)
        {
          ((View)getObjectField(thiz, "mListView")).getBackground().setAlpha((int)(2.55 * drawer_menu_opacity));
        }
      };
    }

    if(prefs.getBoolean("key_drawer_autohide_pagination", false))
    {
      new AutoHook()
      {
        public void after_all_constructors(AppTrayPageIndicatorView thiz)
        {
          thiz.setAutoHide(true);
        }

        public void after_setView(final AppTrayPresenter thiz, AppTrayView view)
        {
          view.addInteractionListener(new PageViewInteractionListener()
          {
            @Override
            public void onInteractionStart()
            {
              thiz.getPageIndicatorView().onInteractionStart();
            }
            @Override
            public void onInteractionEnd()
            {
              thiz.getPageIndicatorView().onInteractionEnd();
            }
          });
        }

        public void after_setTitle(final AppTrayPageIndicatorView thiz, String title)
        {
          thiz.onInteractionStart();
          ((Animation)getObjectField(thiz, "mPageIndicatorAnimation")).addListener(new Animation.Listener()
          {
            @Override
            public void onStart(Animation arg0)
            {
            }
            @Override
            public void onFinish(Animation arg0)
            {
              thiz.onInteractionEnd();
            }
          });
        }

        public Object before_onAppTrayDrawerVisibilityChanged(AppTrayPresenter thiz, float visibility)
        {
          if(JELLYBEAN_LAUNCHER)
            callMethod(thiz, "setSystemUiTransparent", visibility <= 0.05);
          return VOID;
        }
      };
    }
  }

////////////////////////////////////////////////////////////

  @SuppressWarnings("unused")
  public static void hookFolders(XC_LoadPackage.LoadPackageParam param)
  {
    if(prefs.getBoolean("key_folder_auto_close", false))
    {
      new AutoHook()
      {
        public void after_doHandleClick(ActivityItemView thiz, Context context)
        {
          closeFolder(thiz);
        }

        public void after_doHandleClick(ShortcutItemView thiz, Context context)
        {
          closeFolder(thiz);
        }

        private void closeFolder(Component view)
        {
          MainView mainView = (MainView)view.getScene().getView();
          FolderOpener folderOpener = getField(mainView, "mFolderOpener");
          if(folderOpener != null)
            folderOpener.close(true);
        }
      };
    }

    if(prefs.getBoolean("key_folder_multiline_labels", false))
    {
      new AutoHook()
      {
        public void after_getItemView(OpenFolderAdapter thiz, int i, MethodHookParam param)
        {
          try
          {
            setBooleanField(param.getResult(), "mCenterVertically", false);
          }
          catch(Throwable ex)
          {
          }
        }

        public Object after_getItemViewTextLines(ItemViewCreatorBase thiz, String s)
        {
          if("folder".equals(s))
            return 2;
          else
            return NONE;
        }
      };
    }

    if(prefs.getBoolean("key_folder_disable_background_dim", false))
    {
      try {
      findAndHookMethod("com.sonymobile.home.folder.OpenFolderView$DimAnimation", param.classLoader, "onUpdate", float.class, float.class, new XC_MethodReplacement()
      {
        @Override
        protected Object replaceHookedMethod(MethodHookParam param) throws Throwable
        {
          return null;
        }
      });
      } catch(Throwable ex) { log(ex); }
    }
  }

////////////////////////////////////////////////////////////

  @SuppressWarnings("unused")
  public static void hookWidgets(XC_LoadPackage.LoadPackageParam param)
  {
    if(prefs.getBoolean("key_all_widgets_resizable", false))
    {
      new AutoHook()
      {
        private Map<HomeAdvWidget, int[]> advWidgetSizes = new WeakHashMap<HomeAdvWidget, int[]>();

        public Object after_getResizeMode(HomeAppWidgetManager thiz, int i)
        {
          return AppWidgetProviderInfo.RESIZE_BOTH;
        }

        @DisableIf("Z3_KITKAT_LAUNCHER")
        public void after_createAppWidgetInfo(HomeAdvWidget thiz, PackageManager pm)
        {
          AppWidgetProviderInfo info = (AppWidgetProviderInfo)getObjectField(thiz, "mAppWidgetProviderInfo");
          info.resizeMode = AppWidgetProviderInfo.RESIZE_BOTH;
        }

        @EnableIf("JELLYBEAN_LAUNCHER")
        public void before_getVanillaSpanXY(CuiWidgetLoadHelper thiz, Context context, AppWidgetProviderInfo info)
        {
          info.resizeMode = AppWidgetProviderInfo.RESIZE_BOTH;
        }

        @EnableIf("JELLYBEAN_LAUNCHER")
        public void before_setAdvancedWidget(AdvWidgetItemView thiz, HomeAdvWidget w, HomeAdvWidgetManager wm, boolean b)
        {
          GridRect grid = thiz.getItem().getLocation().grid;
          advWidgetSizes.put(w, new int[] { grid.colSpan, grid.rowSpan });
        }

        @EnableIf("JELLYBEAN_LAUNCHER")
        public Object after_getSpanXY(HomeAdvWidget thiz)
        {
          int[] span = advWidgetSizes.get(thiz);
          if(span != null)
            return span;
          else
            return NONE;
        }
      };

      if(Z3_KITKAT_LAUNCHER)
      {
        new AutoHook()
        {
          @EnableIf("Z3_KITKAT_LAUNCHER")
          public int before_getResizeMode(AdvWidgetProviderHelper thiz, ActivityInfo activityInfo, Resources resources)
          {
            return AppWidgetProviderInfo.RESIZE_BOTH;
          }
        };
      }
    }
  }

////////////////////////////////////////////////////////////

  public static void hookExperimental(XC_LoadPackage.LoadPackageParam param) throws Exception
  {
    if(prefs.getBoolean("key_enable_experimental", false))
      new com.gem.xperiaxposed.home.ExperimentalHooks();
  }

////////////////////////////////////////////////////////////

}

////////////////////////////////////////////////////////////


text:
var noriu = require('noriu')
var utility = require('./utility')

exports.test = function (test) {
	return utility.testUnchanged(noriu, test, './')
}

redpajama_set_name: RedPajamaGithub


text:
class CreateVoterLists < ActiveRecord::Migration
  def change
    create_table :voter_lists do |t|
      t.references :user, index: true
      t.references :selection_process, index: true
      t.integer :estado

      t.timestamps
    end
  end
end


text:
package com.zhy.utils;

import android.content.Context;
import android.util.TypedValue;

/**
 * 常用单位转换的辅助类
 *
 * @author Tailyou
 *
 */
public class DensityUtils {
	private DensityUtils() {
		/* cannot be instantiated */
		throw new UnsupportedOperationException("cannot be instantiated");
	}

	/**
	 * dp转px
	 *
	 * @param context
	 * @param val
	 * @return
	 */
	public static int dp2px(Context context, float dpVal) {
		return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
				dpVal, context.getResources().getDisplayMetrics());
	}

	/**
	 * sp转px
	 *
	 * @param context
	 * @param val
	 * @return
	 */
	public static int sp2px(Context context, float spVal) {
		return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP,
				spVal, context.getResources().getDisplayMetrics());
	}

	/**
	 * px转dp
	 *
	 * @param context
	 * @param pxVal
	 * @return
	 */
	public static float px2dp(Context context, float pxVal) {
		final float scale = context.getResources().getDisplayMetrics().density;
		return (pxVal / scale);
	}

	/**
	 * px转sp
	 *
	 * @param fontScale
	 * @param pxVal
	 * @return
	 */
	public static float px2sp(Context context, float pxVal) {
		return (pxVal / context.getResources().getDisplayMetrics().scaledDensity);
	}

}


text:
using System.Collections.Generic;
using System.Text;

namespace ModelGraphSTD
{/*

 */
    public partial class Chef
    {
        static internal string BlankName = "???"; // indicates blank or missing name
        static internal string InvalidItem = "######"; // indicates invalid reference

        static internal ValueUnknown ValuesUnknown = new ValueUnknown();
        static internal ValueInvalid ValuesInvalid = new ValueInvalid();
        static internal ValueCircular ValuesCircular = new ValueCircular();
        static internal ValueUnresolved ValuesUnresolved = new ValueUnresolved();
        static internal LiteralUnresolved LiteralUnresolved = new LiteralUnresolved();

        #region ResetCacheValues  =============================================
        private void ResetCacheValues()
        {
            foreach (var cx in ComputeXStore.Items) { cx.Value.Clear(); }
        }
        #endregion

        #region <Get/Set>SelectString  ========================================
        internal string GetWhereProperty(ComputeX cx)
        {
            if (!ComputeX_QueryX.TryGetChild(cx, out QueryX qx)) return InvalidItem;

            return (qx.HasWhere) ? qx.WhereString : null;
        }
        internal bool TrySetWhereProperty(ComputeX cx, string value)
        {
            if (!ComputeX_QueryX.TryGetChild(cx, out QueryX qx)) return false;

            return TrySetWhereProperty(qx, value);
        }
        internal string GetSelectProperty(ComputeX cx)
        {
            if (!ComputeX_QueryX.TryGetChild(cx, out QueryX qx)) return InvalidItem;

            return (qx.HasSelect) ? qx.SelectString : null;
        }
        internal bool TrySetSelectProperty(ComputeX cx, string value)
        {
            if (!ComputeX_QueryX.TryGetChild(cx, out QueryX qx)) return false;

            return TrySetSelectProperty(qx, value);
        }
        #endregion

        #region TrySet...Property  ============================================
        private bool TrySetComputeTypeProperty(ComputeX cx, int val)
        {
            var type = (CompuType)val;
            if (cx.CompuType != type)
            {
                cx.CompuType = type;
                cx.Value.Clear();
                AllocateValueCache(cx);
            }
            return true;
        }
        #endregion

        #region TryGetComputedValue  ==========================================
        internal bool TryGetComputedValue(ComputeX cx, Item key)
        {/*
            This method is called by valueDictionary when a key-value-pair does
            not exist for the callers key.
         */
            if (!ComputeX_QueryX.TryGetChild(cx, out QueryX qx) || cx.Value.IsEmpty)
                return false;

            switch (cx.CompuType)
            {
                case CompuType.RowValue: return TryGetRowValue();

                case CompuType.RelatedValue: return TryGetRelated();

                case CompuType.CompositeString: return TryGetCompositeString();

                case CompuType.CompositeReversed: return TryGetCompositeReversed();
            }
            return false;

            //= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

            bool TryGetRowValue()
            {
                if (!qx.HasValidSelect) return false;
                if (!qx.Select.GetValue(key, out string val)) return false;

                cx.Value.SetValue(key, val);
                return true;
            }

            bool TryGetRelated()
            {
                var selectors = new List<Query>();
                if (!TryGetForest(cx, key, selectors, out Query[] forest) || selectors.Count == 0) return false;

                return cx.Value.LoadCache(cx, key, selectors);
            }

            bool TryGetCompositeString(bool reverse = false)
            {
                var selectors = new List<Query>();
                if (!TryGetForest(cx, key, selectors, out _) || selectors.Count == 0) return false;

                var sb = new StringBuilder(128);

                if (reverse) selectors.Reverse();

                var seperator = cx.Separator;
                if (string.IsNullOrEmpty(seperator)) seperator = null;

                foreach (var q in selectors)
                {
                    if (q.Items == null) continue;
                    var qt = q.QueryX;

                    foreach (var k in q.Items)
                    {
                        if (k == null) continue;
                        if (!qt.Select.GetValue(k, out string text)) continue;
                        if (string.IsNullOrEmpty(text)) text = " ? ";
                        if (sb.Length > 0 && seperator != null)
                            sb.Append(seperator);
                        sb.Append(text);
                    }
                }

                return cx.Value.SetValue(key, sb.ToString());
            }

            bool TryGetCompositeReversed()
            {
                return TryGetCompositeString(true);
            }

        }
        #endregion

        #region AllocateValueCache  ===========================================
        // called when the computeX needs to produce a value, but its ValueCache is null
        internal ValType AllocateValueCache(ComputeX cx)
        {
            switch (cx.CompuType)
            {
                case CompuType.RowValue:

                    if (!ComputeX_QueryX.TryGetChild(cx, out QueryX vx) || vx.Select == null || vx.Select.ValueType == ValType.IsInvalid)
                        cx.Value = ValuesInvalid;
                    else
                        AllocateCache(vx);
                    break;

                case CompuType.RelatedValue:

                    cx.Value = Value.Create(GetRelatedValueType(cx));
                    break;

                case CompuType.CompositeString:

                    cx.Value = Value.Create(ValType.String);
                    break;

                case CompuType.CompositeReversed:

                    cx.Value = Value.Create(ValType.String);
                    break;
            }
            cx.Value.SetOwner(cx);
            return cx.Value.ValType;

            void AllocateCache(QueryX vx)
            {
                var type = vx.Select.ValueType;
                if (type < ValType.MaximumType)
                    cx.Value = Value.Create(type);
                else if (type == ValType.IsUnknown)
                    cx.Value = ValuesUnknown;
                else if (type == ValType.IsCircular)
                    cx.Value = ValuesCircular;
                else if (type == ValType.IsUnresolved)
                    cx.Value = ValuesUnresolved;
                else
                    cx.Value = ValuesInvalid;
            }
        }
        #endregion

        #region GetRelatedValueType  ==========================================
        ValType GetRelatedValueType(ComputeX cx)
        {
            if (!ComputeX_QueryX.TryGetChild(cx, out QueryX qx))
                return ValType.IsInvalid; //computeX must have a root queryX reference

            if (!QueryX_QueryX.TryGetChildren(qx, out IList<QueryX> list1))
                return ValType.IsInvalid; //computeX must have atleast one queryX reference

            var workQueue = new Queue<QueryX>(list1);
            var isMultiple = list1.Count > 1;

            var vTypes = new HashSet<ValType>();

            while(workQueue.Count > 0)
            {/*
                deapth first traversal of queryX true
             */
                var qt = workQueue.Dequeue();

                if (Relation_QueryX.TryGetParent(qt, out Relation r) && (r.Pairing == Pairing.ManyToMany || (!qt.IsReversed && r.Pairing == Pairing.OneToMany)))
                    isMultiple = true;

                if (qt.HasValidSelect && qt.Select.ValueType < ValType.MaximumType)
                {
                    vTypes.Add(qt.Select.ValueType);
                }

                if (QueryX_QueryX.TryGetChildren(qt, out IList<QueryX> list2))
                {
                    isMultiple |= list2.Count > 1;
                    foreach (var child in list2) { workQueue.Enqueue(child); }
                }
            }

            if (vTypes.Count == 0)
                return ValType.IsInvalid; //computeX must have atleast one valid related value

            var vType = ValType.IsInvalid;
            var vGroup = ValGroup.None;
            foreach (var vt in vTypes)
            {
                vGroup |= Value.GetValGroup(vt); // compose an aggregate of value group bit flags
                if (vType == ValType.IsInvalid) vType = vt; // get the first valType
            }
            if (vGroup == ValGroup.None)
                return ValType.IsInvalid; //computeX must have atleast one valid related value

            if (vGroup.HasFlag(ValGroup.ArrayGroup))
                isMultiple = true;

            if (vTypes.Count == 1)
            {
                if (isMultiple)
                    vType |= ValType.IsArray;
                else
                    vType &= ~ValType.IsArray;
            }
            else
            {
                if (vGroup == ValGroup.DateTime )
                {
                    vType = (isMultiple) ? ValType.DateTimeArray : ValType.DateTime;
                }
                else if (vGroup == ValGroup.DateTimeArray)
                {
                    vType = ValType.DateTimeArray;
                }
                else if (vGroup.HasFlag(ValGroup.DateTime) || vGroup.HasFlag(ValGroup.DateTimeArray))
                {
                    vType = ValType.StringArray;
                }
                else if (vGroup.HasFlag(ValGroup.ScalarGroup) && !vGroup.HasFlag(ValGroup.ArrayGroup))
                {
                    if (vGroup.HasFlag(ValGroup.String))
                        vType = ValType.StringArray;
                    else if (vGroup.HasFlag(ValGroup.Double))
                        vType = ValType.DoubleArray;
                    else if (vGroup.HasFlag(ValGroup.Long))
                        vType = ValType.Int64Array;
                    else if (vGroup.HasFlag(ValGroup.Int))
                        vType = ValType.Int32Array;
                    else if (vGroup.HasFlag(ValGroup.Bool))
                        vType = ValType.BoolArray;
                }
                else
                {
                    vType = ValType.StringArray;
                }
            }

            return vType;
        }
        #endregion

        #region GetSelectorName  ==============================================
        string GetSelectorName(ComputeX item)
        {
            return Store_ComputeX.TryGetParent(item, out Store tbl) ? GetIdentity(tbl, IdentityStyle.Single) : "Select";
        }
        int GetValueType(QueryX qx)
        {
            if (qx.Select == null) return (int)ValType.IsUnknown;
            return (int)qx.Select.ValueType;
        }
        #endregion
    }
}


text:
<?php

namespace Starmade\APIBundle\Model;

class Ship {

    public function __construct(
    $uniqueid
    , $name
    , $creatorid
    , $mass
    , $power
    , $shields
    , $sector
    , $aIConfig
    ) {
        $this->uniqueid = $uniqueid;
        $this->name = $name;
        $this->creatorid = $creatorid;
        $this->mass = $mass;
        $this->power = $power;
        $this->shields = $shields;
        $this->sector = $sector;
        $this->aIConfig = $aIConfig;
    }

    /**
     * @var int
     */
    public $uniqueid;

    /**
     * @var string
     */
    public $secret;

    /**
     * @var string The ship name
     */
    public $name;

    /**
     * @var string The ship creator id
     */
    public $creatorid;

    /**
     * @var double The ship's mass
     */
    public $mass;

    /**
     * @var integer The ship's power capacity
     */
    public $power;

    /**
     * @var integer The ship's shield capacity
     */
    public $shields;

    /**
     * @var Sector The ship's current sector
     */
    public $sector;

    /**
     * @var AIConfig The ship's AI config
     */
    public $aIConfig;

    /**
     * @var string The original version
     */
    public $version = 1;

    /**
     * @var string This version will be used since 1.1
     */
    public $new_version = 1.1;

    /**
     * String representation for a ship
     *
     * @return string
     */
    public function __toString() {
        return $this->name;
    }

}


text:
.class public final Landroid/nfc/NfcEvent;
.super Ljava/lang/Object;
.source "NfcEvent.java"

# instance fields
.field public final nfcAdapter:Landroid/nfc/NfcAdapter;

.field public final peerLlcpMajorVersion:I

.field public final peerLlcpMinorVersion:I

# direct methods
.method constructor <init>(Landroid/nfc/NfcAdapter;B)V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Landroid/nfc/NfcEvent;->nfcAdapter:Landroid/nfc/NfcAdapter;

    and-int/lit16 v0, p2, 0xf0

    shr-int/lit8 v0, v0, 0x4

    iput v0, p0, Landroid/nfc/NfcEvent;->peerLlcpMajorVersion:I

    and-int/lit8 v0, p2, 0xf

    iput v0, p0, Landroid/nfc/NfcEvent;->peerLlcpMinorVersion:I

    return-void
.end method


text:
export PERL_MM_USE_DEFAULT=1

# If it has Build.PL use that, otherwise use Makefile.PL
if [ -f Build.PL ]; then
    perl Build.PL
    ./Build
    # Don't run tests as we don't want to install all the binaries (including
    # those we can't include in BioBuilds) just to run the build system.
    #./Build test
    # Make sure this goes in site
    ./Build install --installdirs site
elif [ -f Makefile.PL ]; then
    # Make sure this goes in site
    perl Makefile.PL INSTALLDIRS=site
    make
    # Don't run tests as we don't want to install all the binaries (including
    # those we can't include in BioBuilds) just to run the build system.
    #make test
    make install
else
    echo 'Unable to find Build.PL or Makefile.PL. You need to modify build.sh.'
    exit 1
fi


text:
/*
Analog Clock Settings
*/
.clock{
    position:relative;
    height:200px;
    overflow:hidden;
    background:rgba(0,0,0,0.46);
    border:3px dotted rgba(0,0,0,0.68);
}
.clock-background{
    position:absolute;
    width:200px;
    height:200px;
    top:0;
    left:0;
    display:block;
    background:url('images/clock.png');
    background-size:200px 200px;
}
.clock-pointer{
    position:absolute;
    top:0;
    left:100px;
    background:rgba(0,0,0,1);
    -webkit-transform-origin:center bottom;
    -moz-transform-origin:center bottom;
    -o-transform-origin:center bottom;
    -ms-transform-origin:center bottom;
    transform-origin:center bottom;
}
.clock-pointer-seconds{
    width:2px;
    height:100px;
    -webkit-transform:rotate(90deg);
    -moz-transform:rotate(90deg);
    -o-transform:rotate(90deg);
    -ms-transform:rotate(90deg);
    transform:rotate(90deg);
}
.clock-pointer-minutes{
    width:4px;
    height:72px;
    top:28px;
    -webkit-transform:rotate(60deg);
    -moz-transform:rotate(60deg);
    -o-transform:rotate(60deg);
    -ms-transform:rotate(60deg);
    transform:rotate(60deg);
}
.clock-pointer-hours{
    width:6px;
    height:36px;
    top:64px;
    -webkit-transform:rotate(30deg);
    -moz-transform:rotate(30deg);
    -o-transform:rotate(30deg);
    -ms-transform:rotate(30deg);
    transform:rotate(30deg);
}


text:
package com.dianping.cat.report.page;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.unidal.lookup.ContainerLoader;
import org.unidal.web.mvc.Action;
import org.unidal.web.mvc.ActionContext;
import org.unidal.web.mvc.ViewModel;

import com.dianping.cat.Cat;
import com.dianping.cat.core.dal.Project;
import com.dianping.cat.report.ReportPage;
import com.dianping.cat.report.view.DomainNavManager;
import com.dianping.cat.report.view.DomainNavManager.Department;
import com.dianping.cat.report.view.HistoryNav;
import com.dianping.cat.report.view.UrlNav;
import com.dianping.cat.service.HostinfoService;

public abstract class AbstractReportModel<A extends Action, M extends ActionContext<?>> extends
      ViewModel<ReportPage, A, M> {

	private Date m_creatTime;

	private String m_customDate;

	private long m_date;

	private SimpleDateFormat m_dateFormat = new SimpleDateFormat("yyyyMMddHH");

	private SimpleDateFormat m_dayFormat = new SimpleDateFormat("yyyyMMdd");

	private String m_displayDomain;

	private Throwable m_exception;

	private String m_ipAddress;

	private String m_reportType;

	private DomainNavManager m_manager;

	private HostinfoService m_hostinfoService;

	public AbstractReportModel(M ctx) {
		super(ctx);
		try {
			m_manager = ContainerLoader.getDefaultContainer().lookup(DomainNavManager.class);
			m_hostinfoService = ContainerLoader.getDefaultContainer().lookup(HostinfoService.class);
		} catch (Exception e) {
			Cat.logError(e);
		}
	}

	public String getBaseUri() {
		return buildPageUri(getPage().getPath(), null);
	}

	public Date getCreatTime() {
		return m_creatTime;
	}

	// required by current tag()
	public HistoryNav getCurrentNav() {
		return HistoryNav.getByName(m_reportType);
	}

	// required by report tag
	public Date getCurrentTime() {
		return new Date();
	}

	public String getCustomDate() {
		return m_customDate;
	}

	// required by report tag
	public String getDate() {
		if (m_reportType != null && m_reportType.length() > 0) {
			return m_dayFormat.format(new Date(m_date));
		}
		return m_dateFormat.format(new Date(m_date));
	}

	public String getDepartment() {
		String domain = getDomain();

		if (domain != null && m_manager != null) {
			Project project = m_manager.getProjectByName(domain);
			if (project != null) {
				return project.getDepartment();
			}
		}
		return "Default";
	}

	public String getDisplayDomain() {
		return m_displayDomain;
	}

	public String getDisplayHour() {
		Calendar cal = Calendar.getInstance();
		cal.setTimeInMillis(m_date);
		int hour = cal.get(Calendar.HOUR_OF_DAY);
		if (hour < 10) {
			return "0" + Integer.toString(hour);
		} else {
			return Integer.toString(hour);
		}
	}

	public abstract String getDomain();

	public Map<String, Department> getDomainGroups() {
		return m_manager.getDepartment(getDomains());
	}

	public abstract Collection<String> getDomains();

	// required by report tag
	public Throwable getException() {
		return m_exception;
	}

	// required by report tag
	// required by report history tag
	public HistoryNav[] getHistoryNavs() {
		return HistoryNav.values();
	}

	public String getIpAddress() {
		return m_ipAddress;
	}

	public List<String> getIps() {
		return new ArrayList<String>();
	}

	public Map<String, String> getIpToHostname() {
		List<String> ips = getIps();
		Map<String, String> ipToHostname = new HashMap<String, String>();

		for (String ip : ips) {
			String hostname = m_hostinfoService.queryHostnameByIp(ip);

			if (hostname != null && !hostname.equalsIgnoreCase("null")) {
				ipToHostname.put(ip, hostname);
			}
		}

		return ipToHostname;
	};

	public String getIpToHostnameStr() {
		return new JsonBuilder().toJson(getIpToHostname());
	}

	public String getLogViewBaseUri() {
		return buildPageUri(ReportPage.LOGVIEW.getPath(), null);
	}

	public long getLongDate() {
		return m_date;
	}

	// required by report tag
	public UrlNav[] getNavs() {
		return UrlNav.values();
	}

	public String getProjectLine() {
		String domain = getDomain();

		if (domain != null && m_manager != null) {
			Project project = m_manager.getProjectByName(domain);
			if (project != null) {
				return project.getProjectLine();
			}
		}
		return "Default";
	}

	public String getReportType() {
		return m_reportType;
	}

	public void setCreatTime(Date creatTime) {
		m_creatTime = creatTime;
	}

	public void setCustomDate(Date start, Date end) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
		StringBuilder sb = new StringBuilder();

		sb.append("&startDate=").append(sdf.format(start)).append("&endDate=").append(sdf.format(end));
		m_customDate = sb.toString();
	}

	public void setDisplayDomain(String displayDomain) {
		m_displayDomain = displayDomain;
	}

	public void setException(Throwable exception) {
		m_exception = exception;
	}

	public void setIpAddress(String ipAddress) {
		m_ipAddress = ipAddress;
	}

	public void setLongDate(long date) {
		m_date = date;
	}

	public void setReportType(String reportType) {
		m_reportType = reportType;
	}
}


text:
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Data.Models.Mapping
{
    public class vEmployeeDepartmentHistoryMap : EntityTypeConfiguration<vEmployeeDepartmentHistory>
    {
        public vEmployeeDepartmentHistoryMap()
        {
            // Primary Key
            this.HasKey(t => new { t.BusinessEntityID, t.FirstName, t.LastName, t.Shift, t.Department, t.GroupName, t.StartDate });

            // Properties
            this.Property(t => t.BusinessEntityID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.Title)
                .HasMaxLength(8);

            this.Property(t => t.FirstName)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.MiddleName)
                .HasMaxLength(50);

            this.Property(t => t.LastName)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.Suffix)
                .HasMaxLength(10);

            this.Property(t => t.Shift)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.Department)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.GroupName)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("vEmployeeDepartmentHistory", "HumanResources");
            this.Property(t => t.BusinessEntityID).HasColumnName("BusinessEntityID");
            this.Property(t => t.Title).HasColumnName("Title");
            this.Property(t => t.FirstName).HasColumnName("FirstName");
            this.Property(t => t.MiddleName).HasColumnName("MiddleName");
            this.Property(t => t.LastName).HasColumnName("LastName");
            this.Property(t => t.Suffix).HasColumnName("Suffix");
            this.Property(t => t.Shift).HasColumnName("Shift");
            this.Property(t => t.Department).HasColumnName("Department");
            this.Property(t => t.GroupName).HasColumnName("GroupName");
            this.Property(t => t.StartDate).HasColumnName("StartDate");
            this.Property(t => t.EndDate).HasColumnName("EndDate");
        }
    }
}


text:
This [Feathers](http://feathersui.com/) theme based on the theme used by the Flash Pro and the Flex MX component sets.

## Credits

The Aeon theme is originally designed by Adobe Systems Incorporated. Contains modifications by [Josh Tynjala](http://twitter.com/joshtynjala).

## Preview

Coming Soon.


text:
Article 1642-1
----
Le vendeur d'un immeuble à construire ne peut être déchargé, ni avant la
réception des travaux, ni avant l'expiration d'un délai d'un mois après la prise
de possession par l'acquéreur, des vices de construction ou des défauts de
conformité alors apparents.

Il n'y aura pas lieu à résolution du contrat ou à diminution du prix si le
vendeur s'oblige à réparer.


text:
```
git clone git@github.com:marcelamsler/event-manager-miniproject.git
cd event-manager-miniproject
npm start
```

Open your preferred browser and visit http://localhost:8000/app

## Server

```
cd server
npm install
npm start
```

Server API should be accessible on http://localhost:8080/api

### Running Unit Tests
* the configuration is found at `karma.conf.js`
* the unit tests are found next to the code they are testing and are named as `..._test.js`.

The easiest way to run the unit tests is to use the supplied npm script:

```
npm test
```

This script will start the Karma test runner to execute the unit tests. Moreover, Karma will sit and
watch the source and test files for changes and then re-run the tests whenever any of them change.
This is the recommended strategy; if your unit tests are being run every time you save a file then
you receive instant feedback on any changes that break the expected code functionality.

You can also ask Karma to do a single run of the tests and then exit.  This is useful if you want to
check that a particular version of the code is operating as expected.  The project contains a
predefined script to do this:

```
npm run test-single-run
```

### End to end testing
* the configuration is found at `e2e-tests/protractor-conf.js`
* the end-to-end tests are found in `e2e-tests/scenarios.js`

Protractor simulates interaction with our web app and verifies that the application responds
correctly. Therefore, our web server needs to be serving up the application, so that Protractor
can interact with it.

```
npm start
```

In addition, since Protractor is built upon WebDriver we need to install this.  The angular-seed
project comes with a predefined script to do this:

```
npm run update-webdriver
```

This will download and install the latest version of the stand-alone WebDriver tool.

Once you have ensured that the development web server hosting our application is up and running
and WebDriver is updated, you can run the end-to-end tests using the supplied npm script:

```
npm run protractor
```

This script will execute the end-to-end tests against the application being hosted on the
development server.


text:
package org.apache.camel.component.aws.sns;

/**
 * Constants used in Camel AWS SNS module
 */
public interface SnsConstants {

    String MESSAGE_ID = "CamelAwsSnsMessageId";
    String SUBJECT = "CamelAwsSnsSubject";
    String MESSAGE_STRUCTURE = "CamelAwsSnsMessageStructure";
}


text:
package de.craftolution.craftoplugin.module.vote;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class ModuleTest {

	@Test
	public void shouldAnswerWithTrue() {
		assertTrue( true );
	}

}


text:
/**
 * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
 * @version v5.0.0-alpha.5
 * @link http://www.ag-grid.com/
 * @license MIT
 */
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var context_1 = require("../../context/context");
var gridOptionsWrapper_1 = require("../../gridOptionsWrapper");
var sortController_1 = require("../../sortController");
var valueService_1 = require("../../valueService");
var utils_1 = require("../../utils");
var SortStage = (function () {
    function SortStage() {
    }
    SortStage.prototype.execute = function (rowNode) {
        var sortOptions;
        // if the sorting is already done by the server, then we should not do it here
        if (!this.gridOptionsWrapper.isEnableServerSideSorting()) {
            sortOptions = this.sortController.getSortForRowController();
        }
        this.sortRowNode(rowNode, sortOptions);
    };
    SortStage.prototype.sortRowNode = function (rowNode, sortOptions) {
        var _this = this;
        // sort any groups recursively
        rowNode.childrenAfterFilter.forEach(function (child) {
            if (child.group) {
                _this.sortRowNode(child, sortOptions);
            }
        });
        rowNode.childrenAfterSort = rowNode.childrenAfterFilter.slice(0);
        var sortActive = utils_1.Utils.exists(sortOptions) && sortOptions.length > 0;
        if (sortActive) {
            rowNode.childrenAfterSort.sort(this.compareRowNodes.bind(this, sortOptions));
        }
        this.updateChildIndexes(rowNode);
    };
    SortStage.prototype.compareRowNodes = function (sortOptions, nodeA, nodeB) {
        // Iterate columns, return the first that doesn't match
        for (var i = 0, len = sortOptions.length; i < len; i++) {
            var sortOption = sortOptions[i];
            // var compared = compare(nodeA, nodeB, sortOption.column, sortOption.inverter === -1);
            var isInverted = sortOption.inverter === -1;
            var valueA = this.valueService.getValue(sortOption.column, nodeA);
            var valueB = this.valueService.getValue(sortOption.column, nodeB);
            var comparatorResult;
            if (sortOption.column.getColDef().comparator) {
                //if comparator provided, use it
                comparatorResult = sortOption.column.getColDef().comparator(valueA, valueB, nodeA, nodeB, isInverted);
            }
            else {
                //otherwise do our own comparison
                comparatorResult = utils_1.Utils.defaultComparator(valueA, valueB);
            }
            if (comparatorResult !== 0) {
                return comparatorResult * sortOption.inverter;
            }
        }
        // All matched, these are identical as far as the sort is concerned:
        return 0;
    };
    SortStage.prototype.updateChildIndexes = function (rowNode) {
        if (utils_1.Utils.missing(rowNode.childrenAfterSort)) {
            return;
        }
        rowNode.childrenAfterSort.forEach(function (child, index) {
            child.firstChild = index === 0;
            child.lastChild = index === rowNode.childrenAfterSort.length - 1;
            child.childIndex = index;
        });
    };
    __decorate([
        context_1.Autowired('gridOptionsWrapper'),
        __metadata('design:type', gridOptionsWrapper_1.GridOptionsWrapper)
    ], SortStage.prototype, "gridOptionsWrapper", void 0);
    __decorate([
        context_1.Autowired('sortController'),
        __metadata('design:type', sortController_1.SortController)
    ], SortStage.prototype, "sortController", void 0);
    __decorate([
        context_1.Autowired('valueService'),
        __metadata('design:type', valueService_1.ValueService)
    ], SortStage.prototype, "valueService", void 0);
    SortStage = __decorate([
        context_1.Bean('sortStage'),
        __metadata('design:paramtypes', [])
    ], SortStage);
    return SortStage;
})();
exports.SortStage = SortStage;


text:
=======
Credits
=======

Development Lead
----------------

* Fifman Feng <fifmanyc@gmail.com>

Contributors
------------

None yet. Why not be the first?


text:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="hu.icss.listviewexperiments.ListExperimentActivity" >

    <item
        android:id="@+id/action_settings"
        android:orderInCategory="100"
        android:showAsAction="never"
        android:title="@string/action_settings"/>

</menu>