text:
using Akavache;
using CrittercismSDK;
using Ets.Mobile.Agent;
using Ets.Mobile.Client.Contracts;
using Ets.Mobile.Entities.Auth;
using Ets.Mobile.Pages.Account;
using Ets.Mobile.Pages.Grade;
using Ets.Mobile.Pages.Main;
using Ets.Mobile.Pages.Moodle;
using Ets.Mobile.Pages.Moodle.Courses;
using Ets.Mobile.Pages.Program;
using Ets.Mobile.Pages.Schedule;
using Ets.Mobile.Pages.Settings;
using Ets.Mobile.Shared;
using Ets.Mobile.UserErrorHandlers;
using Ets.Mobile.ViewModel.Contracts.Shared;
using Ets.Mobile.ViewModel.Contracts.UserDetails;
using Ets.Mobile.ViewModel.Pages.Account;
using Ets.Mobile.ViewModel.Pages.Grade;
using Ets.Mobile.ViewModel.Pages.Main;
using Ets.Mobile.ViewModel.Pages.Moodle;
using Ets.Mobile.ViewModel.Pages.Moodle.Courses;
using Ets.Mobile.ViewModel.Pages.Program;
using Ets.Mobile.ViewModel.Pages.Schedule;
using Ets.Mobile.ViewModel.Pages.Settings;
using Ets.Mobile.ViewModel.Pages.UserDetails;
using Ets.Mobile.ViewModel.Panes.SideNavigation;
using Logger;
using ReactiveUI;
using Refit;
using Security.Contracts;
using Splat;
using System;
using System.Linq;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
using System.Threading.Tasks;
using Windows.ApplicationModel.Background;
#if WINDOWS_PHONE_APP
using Ets.Mobile.ViewModel.WinPhone.Pages.ExtendedSplashScreen;
using Ets.Mobile.Pages.ExtendedSplashScreen;
#elif WINDOWS_UWP
using Ets.Mobile.ViewModel.UWP.Pages.ExtendedSplashScreen;
using Ets.Mobile.Pages.ExtendedSplashScreen;
#endif

namespace Ets.Mobile.ViewModel
{
    public interface IApplicationShell : IScreen
    {
        ISideNavigationPaneViewModel SideNavigation { get; }
        void HandleAuthentificated();
        void LoadApplicationServices();
    }

    public class ApplicationShell : ReactiveObject, IApplicationShell
    {
        // The Router holds the ViewModels for the back stack. Because it's
        // in this object, it will be serialized automatically.
        public RoutingState Router { get; protected set; }

        private readonly IMutableDependencyResolver _resolver;

	    private ISideNavigationPaneViewModel _sideNavigation;
	    public ISideNavigationPaneViewModel SideNavigation => _sideNavigation ?? (_sideNavigation = Locator.Current.GetService<ISideNavigationPaneViewModel>());

	    public ApplicationShell()
	    {
            // Router for Navigation
            Router = new RoutingState();

	        _resolver = Locator.CurrentMutable;

            // Register this screen
            _resolver.RegisterConstant(this, typeof(IScreen));
            _resolver.RegisterLazySingleton(() => new UserDetailsPageViewModel(this), typeof(IUserDetailsPageViewModel));
            _resolver.RegisterConstant(_sideNavigation = new SideNavigationPaneViewModel(this), typeof(ISideNavigationPaneViewModel));

#if WINDOWS_PHONE_APP || WINDOWS_UWP
            // Back Button Handling
#if WINDOWS_UWP
            if(Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
            {
#endif
                Windows.Phone.UI.Input.HardwareButtons.BackPressed += (sender, e) =>
                {
                    if (SideNavigation.IsSideNavigationVisible)
                    {
                        SideNavigation.CloseMenu.Execute(null);
                        e.Handled = true;
                        return;
                    }
                    if (Router.NavigationStack.Count > 1)
                    {
                        Router.NavigateBack.Execute(null);
                        e.Handled = true;
                    }
                };

                // Register Extended SplashScreen for the Router
                _resolver.Register(() => new ExtendedSplashScreenPage(), typeof(IViewFor<ExtendedSplashScreenViewModel>));
                RxApp.MainThreadScheduler.Schedule(() => Router.NavigateAndReset.Execute(new ExtendedSplashScreenViewModel(this)));
#if WINDOWS_UWP
            }
#endif
#endif

#if WINDOWS_APP || WINDOWS_UWP
#if WINDOWS_UWP
            if (!Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.PhoneContract"))
	        {
#endif
                LoadApplicationServices();
#if WINDOWS_UWP
            }
#endif
#endif
        }

        public void LoadApplicationServices()
        {
            // Set up Akavache
            //
            // Akavache is a portable data serialization library that we'll use to
            // cache data that we've downloaded
            BlobCache.ApplicationName = "EtsMobile";

            // Handle Application Exceptions
            HandleApplicationExceptions();

            // Ensure we know if the phone has connectivity or not
            SetInitialConnectivityForOfflineConnections();

            // Set up Services
            //
            // Setting up services
            RegisterContainer(_resolver);

            // Register OfflineHandler
            //
            // This handler makes easy to tell the user (only once!) that he is currently
            // offline, removing the hassle to look for his connection each time we request.
            // Added bonus: each UserError will get handled and message the user based on
            // the internet availability.
            RegisterBackgroundTasks();

            // Set up ViewModels and Views
            //
            // Setting up the Views and assign them to their corresponding ViewModels
            RegisterViewModelAndPages(_resolver);
        }

        private async void SetInitialConnectivityForOfflineConnections()
        {
            // When the user is launching the app, ensure that the connectivity states are reset-ed
            await HandleOfflineTask.SetConnectivityValues();
            await Locator.Current.GetService<IBlobCache>().InsertObject("HasUserBeenNotified", false).ToTask();
        }

        private void HandleApplicationExceptions()
        {
            // Ensure unobserved task exceptions (unawaited async methods returning Task or Task<T>) are handled
            TaskScheduler.UnobservedTaskException += (sender, e) =>
            {
                Func<string, Exception, string> exceptionToString = (message, exception) =>
                {
                    while (true)
                    {
                        if (string.IsNullOrEmpty(exception?.Message))
                        {
                            return message;
                        }

                        message += " -Inner-> " + exception.Message;
                        exception = exception.InnerException;
                    }
                };
                Crittercism.LogUnhandledException(
                    new Exception(
                        $"[TaskScheduler.UnobservedTaskException][{DateTime.Now}] " +
                        $"Type:{sender.GetType()} - observed:{e.Observed} - {exceptionToString(e.Exception.Message, e.Exception)}, StackTrace:{e.Exception.StackTrace}",
                        e.Exception)
                );
            };
        }

        public void HandleAuthentificated()
	    {
	        Locator.Current.GetService<IBlobCache>().GetObject<EtsUserCredentials>(ViewModelKeys.Login)
                .Catch(Observable.Return(new EtsUserCredentials()))
                .Do(async x =>
                {
                    if (BackgroundTaskRegistration.AllTasks.Any(task => task.Value.Name == ScheduleTileUpdaterBackgroundTask.TaskName))
                    {
                        await ScheduleTileUpdaterBackgroundTask.RunTaskAsync().AsTask();
                    }
                })
	            .Subscribe(signetsAccountVm =>
	            {
	                object navigateTo;
	                if (signetsAccountVm.IsLoginSuccessful)
	                {
                        _resolver.GetService<ISsoService>().SetCredentials(signetsAccountVm);
                        _resolver.GetService<IUserEnabledLogger>().SetUser(Locator.Current.GetService<ISecurityProvider>().HashMd5(signetsAccountVm.Username));
	                    SideNavigation.UserDetails.LoadProfile.Execute(null);

                        navigateTo = new MainPageViewModel(this);
	                }
	                else
	                {
                        navigateTo = new LoginPageViewModel(this);
                    }

	                RxApp.MainThreadScheduler.Schedule(() =>
	                {
                        Router.NavigateAndReset.Execute(navigateTo);
	                });
	            });
        }

        #region Registration

        private static void RegisterContainer(IMutableDependencyResolver resolver)
		{
            ModuleInit.Initialize(resolver);
		}

        private void RegisterViewModelAndPages(IMutableDependencyResolver resolver)
        {
            // Register Views for the Router
            resolver.Register(() => new LoginPage(), typeof(IViewFor<LoginPageViewModel>));
            resolver.Register(() => new MainPage(), typeof(IViewFor<MainPageViewModel>));
            resolver.Register(() => new SchedulePage(), typeof(IViewFor<SchedulePageViewModel>));
            resolver.Register(() => new GradePage(), typeof(IViewFor<GradePageViewModel>));
            resolver.Register(() => new ProgramPage(), typeof(IViewFor<ProgramPageViewModel>));
            resolver.Register(() => new SelectCourseForGradePage(), typeof(IViewFor<SelectCourseForGradePageViewModel>));
            resolver.Register(() => new SettingsPage(), typeof(IViewFor<SettingsPageViewModel>));
            resolver.Register(() => new MoodleMainPage(), typeof(IViewFor<MoodleMainPageViewModel>));
            resolver.Register(() => new MoodleCourseContentPage(), typeof(IViewFor<MoodleCourseContentPageViewModel>));
            resolver.Register(() => new MoodleCourseModulePage(), typeof(IViewFor<MoodleCourseModulePageViewModel>));
            resolver.Register(() => new MoodleCourseModuleContentPage(), typeof(IViewFor<MoodleCourseModuleContentPageViewModel>));
        }

        private static async void RegisterBackgroundTasks()
        {
            await HandleOfflineTask.Register();
            UserError.RegisterHandler(UserErrorOfflineHandler.Handler);
            UserErrorOfflineHandler.ExceptionsHandled.Add(typeof(ApiException));
        }

        #endregion
    }
}


text:
package org.camunda.bpm.engine.cdi.impl.context;

import javax.enterprise.context.RequestScoped;
import java.io.Serializable;

@RequestScoped
public class RequestScopedAssociation extends ScopedAssociation implements Serializable {
}

redpajama_set_name: RedPajamaGithub


text:
from django.conf import settings

from django import http
from django import shortcuts
from django import template
from django.contrib import admin

from cms.models import pluginmodel

from cmsplugin_markup.utils import markup

from django.utils.translation import ugettext as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool

from cmsplugin_markup import utils
from cmsplugin_markup.models import MarkupField
from cmsplugin_markup.forms import MarkupForm

class MarkupPlugin(CMSPluginBase):
    model = MarkupField
    name = _('Markup')
    form = MarkupForm
    render_template = 'cmsplugin_markup/markup.html'
    change_form_template = 'cmsplugin_markup/markup_plugin_change_form.html'

    def render(self, context, instance, placeholder):
        context.update({
            'object': instance,
            'placeholder': placeholder,
        })
        return context

    def save_model(self, request, obj, form, change):
        obj.clean_plugins()
        super(MarkupPlugin, self).save_model(request, obj, form, change)

    def change_view(self, request, object_id, extra_context={}):
        extra_context.update({
            'text_plugins': [p() for p in plugin_pool.get_text_enabled_plugins(self.placeholder, self.page)],
            'name': 'markupeditor',
            'used_plugins': pluginmodel.CMSPlugin.objects.filter(parent=object_id),
            'markup_plugins': [c() for c in utils.get_list_of_markup_classes().values()],
        })
        return super(MarkupPlugin, self).change_view(request, object_id, extra_context=extra_context)

    def add_view(self, request, form_url='', extra_context={}):
        extra_context.update({
            'text_plugins': [p() for p in plugin_pool.get_text_enabled_plugins(self.placeholder, self.page)],
            'name': 'markupeditor',
            'markup_plugins': [c() for c in utils.get_list_of_markup_classes().values()],
        })
        return super(MarkupPlugin, self).add_view(request, form_url, extra_context=extra_context);

    def get_plugin_urls(self):
        from django.conf.urls.defaults import patterns, url

        # If django-cms has get_plugin_urls feature or not
        urls = getattr(super(MarkupPlugin, self), 'get_plugin_urls', lambda: [])()
        preview_urls = patterns('',
            url(r'^preview/$', admin.site.admin_view(self.preview), name='cmsplugin_markup_preview'),
        )

        return preview_urls + urls

    def preview(self, request):
        if request.method != 'POST':
            return http.HttpResponseNotAllowed(['POST'])

        try:
            plugin = MarkupField.objects.get(pk=request.POST.get('plugin_id'))
        except MarkupField.DoesNotExist:
            plugin = shortcuts.get_object_or_404(pluginmodel.CMSPlugin, pk=request.POST.get('plugin_id'))

        placeholder = plugin.placeholder

        if not placeholder.has_change_permission(request):
            raise http.Http404

        if not request.POST.get('markup'):
            return http.HttpResponse('')

        return http.HttpResponse(markup.markup_parser(request.POST.get('text'), request.POST.get('markup'), template.RequestContext(request, {
                'object': plugin,
                'placeholder': placeholder,
            }), placeholder))

plugin_pool.register_plugin(MarkupPlugin)


text:
<!DOCTYPE HTML>

		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>IFlySpeechConstant Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.2 (build 963)" />

IFlyMSC

				iflytek

IFlySpeechConstant Class Reference

					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents">Table of Contents</button>

					<select id="jumpTo">
	<option value="top">Jump To…</option>

	<option value="overview">Overview</option>

	<option value="tasks">Tasks</option>

	<option value="class_methods">Class Methods</option>

	<option value="//api/name/ACCENT">    + ACCENT</option>

	<option value="//api/name/APPID">    + APPID</option>

	<option value="//api/name/ASR_AUDIO_PATH">    + ASR_AUDIO_PATH</option>

	<option value="//api/name/ASR_PTT">    + ASR_PTT</option>

	<option value="//api/name/CLOUD_GRAMMAR">    + CLOUD_GRAMMAR</option>

	<option value="//api/name/DATA_TYPE">    + DATA_TYPE</option>

	<option value="//api/name/IFLY_DOMAIN">    + IFLY_DOMAIN</option>

	<option value="//api/name/LANGUAGE">    + LANGUAGE</option>

	<option value="//api/name/NET_TIMEOUT">    + NET_TIMEOUT</option>

	<option value="//api/name/NLP_VERSION">    + NLP_VERSION</option>

	<option value="//api/name/PARAMS">    + PARAMS</option>

	<option value="//api/name/PITCH">    + PITCH</option>

	<option value="//api/name/RESULT_TYPE">    + RESULT_TYPE</option>

	<option value="//api/name/SAMPLE_RATE">    + SAMPLE_RATE</option>

	<option value="//api/name/SPEECH_TIMEOUT">    + SPEECH_TIMEOUT</option>

	<option value="//api/name/SPEED">    + SPEED</option>

	<option value="//api/name/TTS_AUDIO_PATH">    + TTS_AUDIO_PATH</option>

	<option value="//api/name/VAD_BOS">    + VAD_BOS</option>

	<option value="//api/name/VAD_EOS">    + VAD_EOS</option>

	<option value="//api/name/VOICE_NAME">    + VOICE_NAME</option>

	<option value="//api/name/VOLUME">    + VOLUME</option>

</select>

Overview

Tasks

Class Methods

ACCENT

APPID

ASR_AUDIO_PATH

ASR_PTT

CLOUD_GRAMMAR

DATA_TYPE

IFLY_DOMAIN

LANGUAGE

NET_TIMEOUT

NLP_VERSION

PARAMS

PITCH

RESULT_TYPE

SAMPLE_RATE

SPEECH_TIMEOUT

SPEED

TTS_AUDIO_PATH

VAD_BOS

VAD_EOS

VOICE_NAME

VOLUME

Index

Hierarchy

IFlySpeechConstant Class Reference

	Inherits from
	NSObject

	Declared in
	IFlySpeechConstant.h

Overview

公共常量,主要定义参数的key值

Tasks

		+ ASR_AUDIO_PATH

		+ ACCENT

		+ APPID

		+ ASR_PTT

		+ LANGUAGE

		+ RESULT_TYPE

		+ CLOUD_GRAMMAR

		+ IFLY_DOMAIN

		+ DATA_TYPE

		+ SPEECH_TIMEOUT

		+ NET_TIMEOUT

		+ NLP_VERSION

		+ PARAMS

		+ SAMPLE_RATE

		+ SPEED

		+ PITCH

		+ TTS_AUDIO_PATH

		+ VAD_BOS

		+ VAD_EOS

		+ VOICE_NAME

		+ VOLUME

Class Methods

ACCENT

语言区域。

+ (NSString *)ACCENT

Discussion

语言区域。

Declared In

		IFlySpeechConstant.h

APPID

语音应用ID

+ (NSString *)APPID

Discussion

语音应用ID

通过开发者网站申请

Declared In

		IFlySpeechConstant.h

ASR_AUDIO_PATH

识别录音保存路径

+ (NSString *)ASR_AUDIO_PATH

Discussion

识别录音保存路径

Declared In

		IFlySpeechConstant.h

ASR_PTT

设置是否有标点符号

+ (NSString *)ASR_PTT

Discussion

设置是否有标点符号

Declared In

		IFlySpeechConstant.h

CLOUD_GRAMMAR

云端语法ID

+ (NSString *)CLOUD_GRAMMAR

Discussion

云端语法ID

Declared In

		IFlySpeechConstant.h

DATA_TYPE

个性化数据上传类型

+ (NSString *)DATA_TYPE

Discussion

个性化数据上传类型

Declared In

		IFlySpeechConstant.h

IFLY_DOMAIN

应用领域。

+ (NSString *)IFLY_DOMAIN

Discussion

应用领域。

Declared In

		IFlySpeechConstant.h

LANGUAGE

语言

+ (NSString *)LANGUAGE

Discussion

语言

支持:zh_cn,zh_tw,en_us

Declared In

		IFlySpeechConstant.h

NET_TIMEOUT

网络连接超时时间

+ (NSString *)NET_TIMEOUT

Discussion

网络连接超时时间

单位:ms,默认20000

Declared In

		IFlySpeechConstant.h

NLP_VERSION

开放语义协议版本号。

+ (NSString *)NLP_VERSION

Discussion

开放语义协议版本号。

如需使用请在http://osp.voicecloud.cn/上进行业务配置

Declared In

		IFlySpeechConstant.h

PARAMS

扩展参数。

+ (NSString *)PARAMS

Discussion

扩展参数。

Declared In

		IFlySpeechConstant.h

PITCH

音调(0~100)

+ (NSString *)PITCH

Discussion

音调(0~100)

默认值:50

Declared In

		IFlySpeechConstant.h

RESULT_TYPE

返回结果的数据格式,可设置为json,xml,plain,默认为json。

+ (NSString *)RESULT_TYPE

Discussion

返回结果的数据格式,可设置为json,xml,plain,默认为json。

Declared In

		IFlySpeechConstant.h

SAMPLE_RATE

合成及识别采样率。

+ (NSString *)SAMPLE_RATE

Discussion

合成及识别采样率。

Declared In

		IFlySpeechConstant.h

SPEECH_TIMEOUT

语音输入超时时间

+ (NSString *)SPEECH_TIMEOUT

Discussion

语音输入超时时间

单位:ms,默认30000

Declared In

		IFlySpeechConstant.h

SPEED

语速(0~100)

+ (NSString *)SPEED

Discussion

语速(0~100)

默认值:50

Declared In

		IFlySpeechConstant.h

TTS_AUDIO_PATH

合成录音保存路径

+ (NSString *)TTS_AUDIO_PATH

Discussion

合成录音保存路径

Declared In

		IFlySpeechConstant.h

VAD_BOS

VAD前端点超时

+ (NSString *)VAD_BOS

Discussion

VAD前端点超时

可选范围:0-10000(单位ms)

Declared In

		IFlySpeechConstant.h

VAD_EOS

VAD后端点超时 。

+ (NSString *)VAD_EOS

Discussion

VAD后端点超时 。

可选范围:0-10000(单位ms)

Declared In

		IFlySpeechConstant.h

VOICE_NAME

发音人。

+ (NSString *)VOICE_NAME

Discussion

发音人。

  云端支持发音人:小燕(xiaoyan)、小宇(xiaoyu)、凯瑟琳(Catherine)、
  亨利(henry)、玛丽(vimary)、小研(vixy)、小琪(vixq)、
  小峰(vixf)、小梅(vixm)、小莉(vixl)、小蓉(四川话)、
  小芸(vixyun)、小坤(vixk)、小强(vixqa)、小莹(vixying)、 小新(vixx)、楠楠(vinn)老孙(vils)

  对于网络TTS的发音人角色,不同引擎类型支持的发音人不同,使用中请注意选择。

Declared In

		IFlySpeechConstant.h

VOLUME

音量(0~100) 默认值:50

+ (NSString *)VOLUME

Discussion

音量(0~100) 默认值:50

Declared In

		IFlySpeechConstant.h

Index

Hierarchy

© 2014 iflytek. All rights reserved. (Last updated: 2014-05-23)

						Generated by appledoc 2.2 (build 963).


text:
package com.intellij.codeInsight.completion;

import com.intellij.openapi.editor.RangeMarker;
import com.intellij.openapi.editor.event.DocumentAdapter;
import com.intellij.openapi.editor.event.DocumentEvent;

/**
 * @author peter
 */
public abstract class RangeMarkerSpy extends DocumentAdapter {
  private final RangeMarker myMarker;

  public RangeMarkerSpy(RangeMarker marker) {
    myMarker = marker;
    assert myMarker.isValid();
  }

  protected abstract void invalidated(DocumentEvent e);

  @Override
  public void documentChanged(DocumentEvent e) {
    if (!myMarker.isValid()) {
      invalidated(e);
    }
  }
}


text:
package jat.application.missionPlan;

import jat.core.util.ResourceLoader;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.MalformedURLException;
import java.net.URL;

import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFormattedTextField;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.TitledBorder;

import com.jgoodies.forms.factories.FormFactory;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.RowSpec;

public class MissionPlanGUI extends JPanel {
	private static final long serialVersionUID = 1321470082814219656L;
	JFormattedTextField yearfield;
	JFormattedTextField monthfield;
	JFormattedTextField dayfield;
	JFormattedTextField hourfield;
	JFormattedTextField minutefield;
	JFormattedTextField secondfield;
	JFormattedTextField timestepfield;
	JFormattedTextField viewdistancefield;
	public MissionPlanMain mpMain;
	JPanel level2_Pane_Plot;
	JPanel button_panel;
	JPanel mission_panel;
	public JButton btn_stop;
	public JButton btn_forward;
	public JButton btn_rewind;
	JCheckBox realtime_chk;
	public JButton btnAddFlight;
	private JLabel label;
	private JLabel label_1;
	public JButton btnManageFlights;
	public MissionPlanEvents mpE;
	public JCheckBox chckbxCameraRotate;

	public MissionPlanGUI(MissionPlanMain mpMain) {
		this.mpMain = mpMain;
		mpE = new MissionPlanEvents(mpMain);

		setLayout(new BorderLayout(0, 0));
		JPanel level1_Pane = new JPanel();

		add(level1_Pane);
		level1_Pane.setLayout(new BoxLayout(level1_Pane, BoxLayout.X_AXIS));

		// o = new solarsystemplot(this);
		// o.make_plot();
		JPanel level2_Pane_Control = new JPanel();
		level1_Pane.add(level2_Pane_Control);
		level2_Pane_Control.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));

		JPanel level3_panel_box = new JPanel();
		level2_Pane_Control.add(level3_panel_box);
		level3_panel_box.setLayout(new BoxLayout(level3_panel_box,
				BoxLayout.Y_AXIS));

		JPanel level4_panel_Date = new JPanel();
		level4_panel_Date.setBorder(new TitledBorder(null, "Date",
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
		level3_panel_box.add(level4_panel_Date);
		level4_panel_Date.setLayout(new BoxLayout(level4_panel_Date,
				BoxLayout.Y_AXIS));

		realtime_chk = new JCheckBox("Realtime");
		realtime_chk.setAlignmentX(Component.CENTER_ALIGNMENT);
		level4_panel_Date.add(realtime_chk);
		realtime_chk.setHorizontalAlignment(SwingConstants.CENTER);
		JPanel level5_Pane_numbers = new JPanel();
		level4_panel_Date.add(level5_Pane_numbers);
		level5_Pane_numbers.setLayout(new FormLayout(new ColumnSpec[] {
				FormFactory.RELATED_GAP_COLSPEC,
				ColumnSpec.decode("right:default"),
				FormFactory.RELATED_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC,
				FormFactory.RELATED_GAP_COLSPEC,
				ColumnSpec.decode("left:max(17dlu;default)"), }, new RowSpec[] {
				FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC, }));
		level5_Pane_numbers.setBorder(null);

		JLabel lblY = new JLabel("Y");
		lblY.setHorizontalAlignment(SwingConstants.CENTER);
		level5_Pane_numbers.add(lblY, "2, 1, center, default");

		JLabel lblM = new JLabel("M");
		lblM.setHorizontalAlignment(SwingConstants.CENTER);
		level5_Pane_numbers.add(lblM, "4, 1");

		JLabel lblD = new JLabel("D");
		level5_Pane_numbers.add(lblD, "6, 1, center, default");

		yearfield = new JFormattedTextField();
		yearfield.setColumns(4);
		yearfield.setValue(8000.);
		level5_Pane_numbers.add(yearfield, "2, 3, left, fill");
		yearfield.requestFocusInWindow();

		monthfield = new JFormattedTextField();
		monthfield.setColumns(2);
		monthfield.setValue(0.1);
		level5_Pane_numbers.add(monthfield, "4, 3, left, fill");

		dayfield = new JFormattedTextField();
		dayfield.setColumns(2);
		level5_Pane_numbers.add(dayfield, "6, 3, left, fill");

		JLabel lblHr = new JLabel("hr");
		level5_Pane_numbers.add(lblHr, "2, 5");

		JLabel lblMi = new JLabel("mi");
		level5_Pane_numbers.add(lblMi, "4, 5");

		JLabel lblSc = new JLabel("sc");
		level5_Pane_numbers.add(lblSc, "6, 5");

		hourfield = new JFormattedTextField();
		hourfield.setColumns(2);
		level5_Pane_numbers.add(hourfield, "2, 7, right, fill");

		minutefield = new JFormattedTextField();
		minutefield.setColumns(2);
		level5_Pane_numbers.add(minutefield, "4, 7, left, fill");

		secondfield = new JFormattedTextField();
		secondfield.setColumns(2);
		level5_Pane_numbers.add(secondfield, "6, 7, left, fill");

		button_panel = new JPanel();
		level4_panel_Date.add(button_panel);
		button_panel.setLayout(new BoxLayout(button_panel, BoxLayout.X_AXIS));
		URL iconsUrl = null;
		try {
			ResourceLoader c = new ResourceLoader();
			iconsUrl = c.loadURL(this.getClass(), "icons/");
			//System.out.println("[MissionPlanGUI] " + iconsUrl);
			mpMain.mpParam.messages.addln("[MissionPlanGUI] " + iconsUrl);
			// displayURL(helpURL2, editorPane, relative_path);

		} catch (Exception e) {
			System.err.println("[MissionPlanGUI Exception]");
			System.exit(0);
		}
		URL rewindURL = null;
		try {
			rewindURL = new URL(iconsUrl.toExternalForm() + "Rewind12.gif");
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}

		// String iconPath="/jat/application/missionPlan/icons/";
		// String iconPath=iconUrl.getFile();

		//System.out.println("[MissionPlanGUI before button icons] ");

		btn_rewind = new JButton("");
		// btn_rewind.setIcon(new ImageIcon(rewindURL));
		// btn_rewind.setIcon(new ImageIcon(MissionPlanGUI.class
		// .getResource(iconPath+"Rewind12.gif")));
		button_panel.add(btn_rewind);

		btn_stop = new JButton("");
		// btn_stop.setIcon(new ImageIcon(MissionPlanGUI.class
		// .getResource(iconPath+"Stop12.gif")));
		button_panel.add(btn_stop);

		btn_forward = new JButton("");
		// btn_forward.setIcon(new ImageIcon(MissionPlanGUI.class
		// .getResource(iconPath+"FastForward12.gif")));
		button_panel.add(btn_forward);

		//System.out.println("[MissionPlanGUI after button icons] ");

		JLabel lblNewLabel = new JLabel("time step");
		level4_panel_Date.add(lblNewLabel);

		timestepfield = new JFormattedTextField();
		timestepfield.setColumns(8);
		level4_panel_Date.add(timestepfield);

		JLabel lblNewLabel_1 = new JLabel("Mission Time");
		lblNewLabel_1.setHorizontalAlignment(SwingConstants.LEFT);
		level3_panel_box.add(lblNewLabel_1);

		viewdistancefield = new JFormattedTextField();
		viewdistancefield.setColumns(5);
		level3_panel_box.add(viewdistancefield);

		chckbxCameraRotate = new JCheckBox("Camera Rotate");
		chckbxCameraRotate.setAlignmentX(Component.CENTER_ALIGNMENT);
		chckbxCameraRotate.setHorizontalAlignment(SwingConstants.LEFT);
		level3_panel_box.add(chckbxCameraRotate);

		mission_panel = new JPanel();
		mission_panel.setBorder(new TitledBorder(null, "Mission",
				TitledBorder.LEADING, TitledBorder.TOP, null, null));
		level3_panel_box.add(mission_panel);
		mission_panel.setLayout(new GridLayout(0, 1, 0, 0));

		btnAddFlight = new JButton("Add Flight");
		mission_panel.add(btnAddFlight);

		btnManageFlights = new JButton("Manage Flights");
		btnManageFlights.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		mission_panel.add(btnManageFlights);

		label = new JLabel("");
		mission_panel.add(label);

		label_1 = new JLabel("");
		mission_panel.add(label_1);

		realtime_chk.addItemListener(mpE);
		btnAddFlight.addActionListener(mpE);
		btnManageFlights.addActionListener(mpE);
		btn_stop.addActionListener(mpE);
		btn_rewind.addActionListener(mpE);
		btn_forward.addActionListener(mpE);
		chckbxCameraRotate.addItemListener(mpE);
	}
}


text:
var projects = require("../projects.json")
/*
 * GET home page.
 */

exports.view = function(req, res){
  // Here you should implement your random landing page rendering functionality
  var random_num = Math.random();

  if(random_num > 0.5){
    res.render("index", projects);
  }else{
    res.render("index_alternate", projects)
  }

};


text:
@protocol ComGoodowRealtimeJsonJsonArray;
@protocol ComGoodowRealtimeJsonJsonObject;

#include "J2ObjC_header.h"
#include "com/goodow/realtime/store/ValuesRemovedEvent.h"
#include "com/goodow/realtime/store/impl/BaseModelEventImpl.h"

@interface ComGoodowRealtimeStoreImplValuesRemovedEventImpl : ComGoodowRealtimeStoreImplBaseModelEventImpl < ComGoodowRealtimeStoreValuesRemovedEvent > {
 @public
  jint index__;
  id<ComGoodowRealtimeJsonJsonArray> values__;
}

- (instancetype)initWithComGoodowRealtimeJsonJsonObject:(id<ComGoodowRealtimeJsonJsonObject>)serialized;

- (jint)index;

- (id<ComGoodowRealtimeJsonJsonArray>)values;

@end

J2OBJC_EMPTY_STATIC_INIT(ComGoodowRealtimeStoreImplValuesRemovedEventImpl)

J2OBJC_FIELD_SETTER(ComGoodowRealtimeStoreImplValuesRemovedEventImpl, values__, id<ComGoodowRealtimeJsonJsonArray>)

CF_EXTERN_C_BEGIN
CF_EXTERN_C_END

J2OBJC_TYPE_LITERAL_HEADER(ComGoodowRealtimeStoreImplValuesRemovedEventImpl)

#endif // _ComGoodowRealtimeStoreImplValuesRemovedEventImpl_H_


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

?>

Change Your Password

Step One

Enter your old password into the Old Password input field.

Step Two

Enter your new password into the New Password input field.

Note: Passwords must be at least 8 characters in length

Step Three

Enter your new password again into the Confirm Password input field.

Note: This must match the password in the New Password field


text:
layout: page
title: Choi - Myers Wedding
date: 2016-05-24
author: Daniel Kidd
tags: weekly links, java
status: published
summary: Maecenas erat quam, aliquam nec venenatis pulvinar, rutrum in sapien.
banner: images/banner/office-01.jpg
booking:
  startDate: 05/22/2018
  endDate: 05/24/2018
  ctyhocn: BALGRHX
  groupCode: CMW
published: true
---
Duis tempus mi ut tincidunt scelerisque. Sed hendrerit a nibh sit amet luctus. Etiam nec ante leo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Maecenas imperdiet ex ut urna porttitor tempor. Nunc ut justo faucibus, placerat dolor vel, pulvinar justo. In hac habitasse platea dictumst. Aliquam non ligula auctor, vehicula diam in, euismod magna. Mauris in consectetur velit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

* Sed et arcu viverra, condimentum lacus vel, dignissim magna
* Mauris at nisi ullamcorper augue pulvinar vehicula
* Sed condimentum lectus vel accumsan condimentum.

Curabitur rhoncus sed est venenatis lobortis. Aenean sapien ligula, tincidunt suscipit lacinia nec, condimentum a neque. Integer vel nulla eu lorem maximus pharetra. Pellentesque tincidunt nibh ac dui dictum placerat. Etiam in tortor at mi tincidunt luctus. Sed mollis lacus elit, tincidunt rutrum ipsum placerat nec. Sed sodales dolor in purus sollicitudin, vel finibus ligula tincidunt.


text:
using Scripts.Model.Interfaces;
using Scripts.Model.SaveLoad;
using Scripts.Model.SaveLoad.SaveObjects;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using UnityEngine;
using Scripts.Model.Characters;

namespace Scripts.Model.Stats {

    /// <summary>
    /// Type-safe enum representing the various stat types in the game.
    /// </summary>
    public sealed class StatType : IComparable<StatType>, INameable, ISaveable<StatTypeSave>, ICostable {
        private static readonly HashSet<StatType> allTypes = new HashSet<StatType>(new IdentityEqualityComparer<StatType>());

        private static readonly IDictionary<BoundType, Bounds> attributeBounds = new Dictionary<BoundType, Bounds>() {
            { BoundType.RESOURCE, new Bounds(0, int.MaxValue) },
            { BoundType.ASSIGNABLE, new Bounds(-9999, 9999) },
        };

        public static readonly StatType STRENGTH = new StatType(
                                                                STANDARD_INCREASE_FROM_STAT_POINT_AMOUNT,
                                                                BoundType.ASSIGNABLE,
                                                                          "Strength",
                                                                          "fist",
                                                                          "Increases basic attack damage.",
                                                                          Color.red);

        public static readonly StatType INTELLECT = new StatType(STANDARD_INCREASE_FROM_STAT_POINT_AMOUNT,
                                                                BoundType.ASSIGNABLE,
                                                                           "Intellect",
                                                                           "light-bulb",
                                                                           "Increases spell effects.",
                                                                           Color.cyan);

        public static readonly StatType AGILITY = new StatType(BOOSTED_INCREASE_FROM_STAT_POINT_AMOUNT,
                                                                BoundType.ASSIGNABLE,
                                                                         "Agility",
                                                                         "power-lightning",
                                                                         "Increases critical hit rate and accuracy.",
                                                                         Color.green);

        public static readonly StatType VITALITY = new StatType(BOOSTED_INCREASE_FROM_STAT_POINT_AMOUNT,
                                                                BoundType.ASSIGNABLE,
                                                                          "Vitality",
                                                                          "health-normal",
                                                                          "Increases Health.",
                                                                          Color.yellow);

        public static readonly HashSet<StatType> ASSIGNABLES = new HashSet<StatType>() { STRENGTH, INTELLECT, AGILITY, VITALITY };

        public static readonly StatType HEALTH = new StatType(BoundType.RESOURCE,
                                                              "Health",
                                                              "hearts",
                                                              "Life state. Units are defeated if this reaches 0.",
                                                              Color.green,
                                                              Color.red);

        public static readonly StatType SKILL = new StatType(BoundType.RESOURCE,
                                                                     "Skill",
                                                                     "concentration-orb",
                                                                     "A spell resource that is replenished on basic attacks. This is always equal to one's highest skill costing spell.",
                                                                     Color.yellow);

        public static readonly StatType MANA = new StatType(BoundType.RESOURCE,
                                                                    "Mana",
                                                                    "water-drop",
                                                                    "Magical resources used to cast some spells.",
                                                                    Color.cyan);

        public static readonly StatType CHARGE = new StatType(BoundType.RESOURCE,
                                                                      "Charge",
                                                                      "fox-head",
                                                                      "Actions may be performed when full.",
                                                                      Color.white);

        public static readonly StatType CORRUPTION = new StatType(BoundType.RESOURCE,
                                                                          "Corruption",
                                                                          "fox-head",
                                                                          "Corruption level.",
                                                                          Color.magenta);

        public static readonly StatType EXPERIENCE = new StatType(BoundType.RESOURCE,
                                                                    "Experience",
                                                                    "upgrade",
                                                                    "Needed to level up.",
                                                                    Color.white);

        public static readonly ReadOnlyCollection<StatType> CLEARED_ON_BATTLE_END = new ReadOnlyCollection<StatType>(new StatType[] { StatType.SKILL });
        public static readonly HashSet<StatType> RESOURCES = new HashSet<StatType>() { HEALTH, SKILL, MANA, CHARGE, CORRUPTION, EXPERIENCE };
        public static readonly HashSet<StatType> RESTORED = new HashSet<StatType>() { HEALTH, MANA, STRENGTH, AGILITY, INTELLECT, VITALITY };

        public readonly Bounds Bounds;
        public readonly string Name;
        public readonly Sprite Sprite;
        public readonly string Description;
        public readonly int StatPointIncreaseAmount;
        public readonly Color Color;
        public readonly Color NegativeColor;

        private readonly int order;

        private const int STANDARD_INCREASE_FROM_STAT_POINT_AMOUNT = 1;
        private const int BOOSTED_INCREASE_FROM_STAT_POINT_AMOUNT = 2;
        private static int orderCounter;

        private StatType(
            int statPointIncreaseAmount,
            BoundType boundType,
            string name,
            string spriteLoc,
            string description,
            Color color,
            Color negativeColor) {
            attributeBounds.TryGetValue(boundType, out Bounds);
            this.StatPointIncreaseAmount = statPointIncreaseAmount;
            this.Name = name;
            this.Sprite = Util.GetSprite(spriteLoc);
            this.Description = description;
            this.Color = color;
            this.order = orderCounter++;
            this.NegativeColor = negativeColor;
            allTypes.Add(this);
        }

        private StatType(
            BoundType boundType,
            string name,
            string spriteLoc,
            string description,
            Color color,
            Color negativeColor) : this(0, boundType, name, spriteLoc, description, color, negativeColor) { }

        private StatType(
            BoundType boundType,
            string name,
            string spriteLoc,
            string description,
            Color color) : this(0, boundType, name, spriteLoc, description, color, Color.grey) { }

        private StatType(
            int statPointIncreaseAmount,
            BoundType boundType,
            string name,
            string spriteLoc,
            string description,
            Color color) : this(statPointIncreaseAmount, boundType, name, spriteLoc, description, color, Color.grey) { }

        public static ICollection<StatType> AllTypes {
            get {
                return new ReadOnlyCollection<StatType>(allTypes.ToArray());
            }
        }

        public string ColoredName {
            get {
                return Util.ColorString(Name, Color);
            }
        }

        string INameable.Name {
            get {
                return Name;
            }
        }

        public override bool Equals(object obj) {
            return this == obj;
        }

        public override int GetHashCode() {
            return order;
        }

        public override string ToString() {
            return this.ColoredName;
        }

        public Color DetermineColor(float value) {
            Color c = Color.grey;
            if (value < 0) {
                c = this.NegativeColor;
            } else if (value == 0) {
                c = Color.grey;
            } else {
                c = this.Color;
            }
            return c;
        }

        public int CompareTo(StatType other) {
            return this.order.CompareTo(other.order);
        }

        public int Clamp(int amountToBeClamped) {
            return Mathf.Clamp(amountToBeClamped, Bounds.Low, Bounds.High);
        }

        public StatTypeSave GetSaveObject() {
            return new StatTypeSave(this);
        }

        public void InitFromSaveObject(StatTypeSave saveObject) {
            // Nothing
        }

        public bool CanAfford(int amount, Character characterToCheck) {
            Util.Assert(amount > 0, "Amount must be nonnegative.");
            return characterToCheck.Stats.GetStatCount(Characters.Stats.Get.MOD, this) >= amount;
        }

        public void DeductCostFromCharacter(int amount, Character unitToDeductFrom) {
            Util.Assert(CanAfford(amount, unitToDeductFrom));
            unitToDeductFrom.Stats.AddToStat(this, Characters.Stats.Set.MOD, -amount);
        }

        public string GetName() {
            return this.ColoredName;
        }
    }
}


text:
(function () {

    angular
        .module('pigeon.groundStation')
        .controller('GroundStationController', GroundStationController);

    GroundStationController.$inject = [
        '$scope',
        'socketFactory',
        '_'
    ];

    function GroundStationController (
        $scope,
        socketFactory,
        _
    ) {

        var socket = socketFactory(),
            map,
            marker,
            mapOptions,
            lastUpdatedInterval,
            model = document.querySelector('._3dbox'),
            podHeight = Math.sqrt(Math.pow(document.querySelector('.pod').offsetHeight/2, 2)/2)*2,
            latlang = window.google ? new google.maps.LatLng(39.768663, -86.159855) : null,
            input = {"thro": -10, "yaw": 0, "pitch": 0, "roll": 0},
            keys = {
                38: {c: "pitch", d:-1},
                39: {c: "roll", d:1},
                40: {c: "pitch", d:1},
                37: {c: "roll", d:-1},
                83: {c: "yaw", d:-1},
                69: {c: "thro", d:1},
                70: {c: "yaw", d:1},
                68: {c: "thro", d:-1}
        };

        var vm = this;

        vm.armBoard         = armBoard;
        vm.updatedLabel     = '--';
        vm.resolution       = 21;
        vm.gimbalLeft = {
            x: input["yaw"],
            y: - input["thro"]
        };
        vm.gimbalRight = {
            x: input["roll"],
            y: input["pitch"]
        };
        vm.showMap = (latlang != null);
        vm.params = {};
        vm.saveSettings = saveSettings;

        document.addEventListener('keydown', function (event) {
            // shift 16
            if(Object.keys(keys).indexOf(event.keyCode.toString()) > -1) {
                event.preventDefault();
                updateControl(event.keyCode);
            }

            if(event.keyCode == 67) {
              input["yaw"]   = 0;
              input["pitch"] = 0;
              input["roll"]  = 0;
              sendDirectControl();
              updatePods();
            }
        });

        /* socket callbacks */
        socket.on("systemStatus", function (data) {
            vm.socketStatus = data.craft_socket;
            vm.armStatus    = data.craft_arm
        });

        socket.on("armedStatus", function (status) {
            vm.armStatus = status;
        });

        socket.on("payload", function (attitude, motors) {
            updateModel(attitude[0], attitude[2], attitude[1]);
            vm.motors = motors;
        });

        socket.on("params", function (params) {
            _.merge(vm.params, params);
        });

        /*socket.on("craftLocation", function (data) {
            latlang = new google.maps.LatLng(data.lat,data.long);
            updateMap(latlang);
            updateTime(data.timestamp);
        });*/

        /* socket emitters */

        function armBoard () {
            socket.emit(vm.armStatus ? 'disarmBoard' : 'armBoard');
        }

        function sendDirectControl () {
            socket.emit('recievedDirectControl', input);
        }

        function initMap() {
            mapOptions = {
                center: latlang,
                zoom: 8
            };

            map = window.google ? new google.maps.Map(document.getElementById('map-canvas'), mapOptions) : null;

            if (map) {
                marker = new google.maps.Marker({
                    position: latlang,
                    map: map,
                    title: 'Hello World!'
                });
            }
        }

        function  updatePods () {

            vm.gimbalLeft.x = input["yaw"];
            vm.gimbalLeft.y = - input["thro"];

            vm.gimbalRight.x = input["roll"];
            vm.gimbalRight.y = input["pitch"];

            $scope.$apply();

        }

        function updateModel (x, y, z) {
            model.style.transform = 'rotateX('+ x + 'rad) rotateY(' +y + 'rad) rotateZ(' + z + 'rad)';
        }

        function updateMap (ll) {
            map.panTo(ll);
            marker.setPosition(ll);
        }

        function updateTime (timestamp) {
            var lastUpdated = moment(timestamp, "X");

            clearInterval(lastUpdatedInterval);
            lastUpdatedInterval = setInterval(function () {
                vm.updatedLabel = lastUpdated.fromNow();
            }, 5000);
            vm.updatedLabel = lastUpdated.fromNow();
        }

        function updateControl (control) {
            var channel = keys[control]
              , step;

            if((input[channel.c] + channel.d) <= (vm.resolution - 1)/2 && (input[channel.c] + channel.d) >= -(vm.resolution - 1)/2) {
                step = input[channel.c] += channel.d;
            }

            sendDirectControl();
            updatePods();
        }

        function saveSettings () {
            socket.emit('paramsUpdated', vm.params);
        }

        initMap();

    }

})();


text:
package ru.vyarus.dropwizard.guice.module.jersey.hk2;

import com.google.inject.AbstractModule;
import com.google.inject.Injector;
import com.google.inject.binder.ScopedBindingBuilder;
import com.google.inject.servlet.RequestScoped;
import org.glassfish.jersey.server.AsyncContext;
import org.glassfish.jersey.server.ContainerRequest;
import org.glassfish.jersey.server.internal.inject.MultivaluedParameterExtractorProvider;

import javax.inject.Provider;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.container.ResourceInfo;
import javax.ws.rs.core.*;
import javax.ws.rs.ext.Providers;

import static ru.vyarus.dropwizard.guice.module.installer.util.JerseyBinding.bindJerseyComponent;

/**
 * Registers important services from jersey context, making them available for injection in guice beans.
 *

 *
{@link javax.ws.rs.core.Application}
 *
{@link javax.ws.rs.ext.Providers}
 *
{@link javax.ws.rs.core.UriInfo}
 *
{@link javax.ws.rs.container.ResourceInfo}
 *
{@link javax.ws.rs.core.HttpHeaders}
 *
{@link javax.ws.rs.core.SecurityContext}
 *
{@link javax.ws.rs.core.Request}
 *
{@link org.glassfish.jersey.server.ContainerRequest}
 *
{@link org.glassfish.jersey.server.internal.inject.MultivaluedParameterExtractorProvider}
 *
{@link org.glassfish.jersey.server.AsyncContext}

 *

 *

 * When guice servlet modules support disabled, enables bindings for http request and response objects,
 * which will work only within resources (because HK2 doesn't monitor outer scopes).
 *

 * {@link org.glassfish.jersey.internal.inject.InjectionManager} is registered by
 * {@link ru.vyarus.dropwizard.guice.module.jersey.GuiceFeature}
 *
 * @author Vyacheslav Rusakov
 * @since 15.11.2014
 */
public class GuiceBindingsModule extends AbstractModule {

    private final Provider<Injector> provider;
    private final boolean guiceServletSupport;

    public GuiceBindingsModule(final Provider<Injector> provider, final boolean guiceServletSupport) {
        this.provider = provider;
        this.guiceServletSupport = guiceServletSupport;
    }

    @Override
    protected void configure() {
        jerseyToGuiceGlobal(MultivaluedParameterExtractorProvider.class);
        jerseyToGuiceGlobal(Application.class);
        jerseyToGuiceGlobal(Providers.class);

        // request scoped objects
        jerseyToGuice(UriInfo.class);
        jerseyToGuice(ResourceInfo.class);
        jerseyToGuice(HttpHeaders.class);
        jerseyToGuice(SecurityContext.class);
        jerseyToGuice(Request.class);
        jerseyToGuice(ContainerRequest.class);
        jerseyToGuice(AsyncContext.class);

        if (!guiceServletSupport) {
            // bind request and response objects when guice servlet module not registered
            // but this will work only for resources
            jerseyToGuice(HttpServletRequest.class);
            jerseyToGuice(HttpServletResponse.class);
        }
    }

    private void jerseyToGuiceGlobal(final Class<?> type) {
        jerseyToGuiceBinding(type, true);
    }

    private void jerseyToGuice(final Class<?> type) {
        jerseyToGuiceBinding(type, false);
    }

    /**
     * Important moment: request scoped jersey objects must be bound to guice request scope (if guice web used)
     * because otherwise scope delegation to other thread will not work
     * (see {@link com.google.inject.servlet.ServletScopes#transferRequest(java.util.concurrent.Callable)}).
     *

     * WARNING: bean instance must be obtained in current (request) thread in order to be us used later
     * inside transferred thread (simply call {@code provider.get()} (for jersey-managed bean like {@link UriInfo})
     * before {@code ServletScopes.transferRequest()}.
     *
     * @param type   jersey type to bind
     * @param global true for global type binding
     */
    private void jerseyToGuiceBinding(final Class<?> type, final boolean global) {
        final ScopedBindingBuilder binding = bindJerseyComponent(binder(), provider, type);
        if (!global && guiceServletSupport) {
            binding.in(RequestScoped.class);
        }
    }
}


text:
    WCT.loadSuites([
      'activate-event.html',
      'basic.html',
      'multi.html',
      'next-previous.html',
      'selected-attribute.html',
      'template-repeat.html',
      'content.html',
      'excluded-local-names.html'
    ]);


text:
(function(window, document, undefined) {
  var setIdForInputs = function(elementClassName) {
    var elements = document.getElementsByClassName(elementClassName);
    // console.log('elements length' , elements.length);
    for (var i = 0; i < elements.length; i++) {
      var input = elements[i].querySelector("input");
      // console.log('input ' , input);
      var label = elements[i].querySelector("label");
      var isId = input.id;
      // console.log('isId ' , isId);
      var isFor = label.getAttribute("for");
      // console.log('isFor ' , isFor);
      if (!isId) {
        // console.log('if 1');
        var uniqueId = "input-" + Math.random().toString(36).slice(2);
        // console.log('uniqueId ' , uniqueId);
        label.setAttribute("for", uniqueId);
        input.id = uniqueId;
      }
      else {
        label.setAttribute("for", isId);
      }
    }
  };
  document.addEventListener("DOMContentLoaded", function() {
    setIdForInputs("checkbox-custom");
    setIdForInputs("radio-custom");
  }, false);
})(window, document);


text:
//
// AuthenticatedEventArgs.cs
//
// Author: Jeffrey Stedfast <jestedfa@microsoft.com>
//
// Copyright (c) 2013-2022 .NET Foundation and Contributors
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//

using System;

namespace MailKit {
	/// <summary>
	/// Authenticated event arguments.
	/// </summary>
	/// <remarks>
	/// Some servers, such as GMail IMAP, will send some free-form text in
	/// the response to a successful login.
	/// </remarks>
	public class AuthenticatedEventArgs : EventArgs
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="MailKit.AuthenticatedEventArgs"/> class.
		/// </summary>
		/// <remarks>
		/// Creates a new <see cref="AuthenticatedEventArgs"/>.
		/// </remarks>
		/// <param name="message">The free-form text.</param>
		/// <exception cref="System.ArgumentNullException">
		/// <paramref name="message"/> is <c>null</c>.
		/// </exception>
		public AuthenticatedEventArgs (string message)
		{
			if (message == null)
				throw new ArgumentNullException (nameof (message));

			Message = message;
		}

		/// <summary>
		/// Get the free-form text sent by the server.
		/// </summary>
		/// <remarks>
		/// Gets the free-form text sent by the server.
		/// </remarks>
		/// <value>The free-form text sent by the server.</value>
		public string Message {
			get; private set;
		}
	}
}


text: <!DOCTYPE html>


text:
class AddDeploymentEventsToServices < ActiveRecord::Migration[5.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    add_column_with_default(:services, :deployment_events, :boolean, default: false, allow_null: false)
  end

  def down
    remove_column(:services, :deployment_events)
  end
end


text:
package gex.serling.retrofit.dto;

import java.io.Serializable;

import lombok.Getter;
import lombok.Setter;

public class DefaultApiErrorResponse implements Serializable{

 @Getter
 @Setter
 private String message;

}


text:
package org.apache.sling.ide.eclipse.ui.internal;

import java.lang.reflect.InvocationTargetException;

import org.apache.sling.ide.eclipse.core.ServerUtil;
import org.apache.sling.ide.eclipse.core.internal.ResourceChangeCommandFactory;
import org.apache.sling.ide.eclipse.ui.WhitelabelSupport;
import org.apache.sling.ide.transport.Command;
import org.apache.sling.ide.transport.Repository;
import org.apache.sling.ide.transport.Result;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;

public class ExportWizard extends Wizard {

    private IResource syncStartPoint;
    private ExportWizardPage exportPage;

    public void init(IWorkbench workbench, IResource syncStartPoint) {
        setWindowTitle("Repositoy Export"); // NON-NLS-1
        setNeedsProgressMonitor(true);
        setDefaultPageImageDescriptor(WhitelabelSupport.getWizardBanner());

        this.syncStartPoint = syncStartPoint;
        this.exportPage = new ExportWizardPage(syncStartPoint);
    }

    @Override
    public void addPages() {
        addPage(exportPage);
    }

    @Override
    public boolean performFinish() {

        try {
            getContainer().run(true, false, new IRunnableWithProgress() {

                @Override
                public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                    final ResourceChangeCommandFactory factory = new ResourceChangeCommandFactory(Activator
                            .getDefault().getSerializationManager(), Activator.getDefault().getPreferences().getIgnoredFileNamesForSync());

                    final Repository[] selectedServer = new Repository[1];
                    Display.getDefault().syncExec(new Runnable() {
                        @Override
                        public void run() {
                            try {
                                selectedServer[0] = ServerUtil.getConnectedRepository(exportPage.getServer(), monitor);
                            } catch (CoreException e) {
                                throw new RuntimeException(e);
                            }
                        }
                    });

                    try {

                        syncStartPoint.accept(new IResourceVisitor() {

                            @Override
                            public boolean visit(IResource resource) throws CoreException {
                                Command<?> command = factory.newCommandForAddedOrUpdated(selectedServer[0], resource);
                                if (command == null) {
                                    return true;
                                }
                                Result<?> result = command.execute();
                                if (!result.isSuccess()) {
                                    throw new CoreException(new Status(Status.ERROR, Activator.PLUGIN_ID,
                                            "Failed exporting: " + result.toString()));
                                }

                                return true;
                            }
                        });
                    } catch (CoreException e) {
                        throw new InvocationTargetException(e);
                    } catch (Throwable t) {
                        t.printStackTrace();
                        throw new InvocationTargetException(t);
                    }
                }
            });

            return true;
        } catch (RuntimeException | InterruptedException e) {
            exportPage.setErrorMessage(e.getMessage());
            return false;
        } catch (InvocationTargetException e) {
            exportPage.setErrorMessage(e.getCause().getMessage());
            return false;
        }

    }
}


text:
from flask.ext.wtf import Form
from wtforms.validators import Required
from wtforms.fields import (
    TextAreaField,
    StringField
)

class LogEntryForm(Form):
    tags = StringField('tags')
    content = TextAreaField('Content', validators=[Required()])


text:
/**
 * Requiring protractor as a node module. Export the contents of the protractor
 * namespace.
 */

export = require('./ptor').protractor;


text:
<?xml version="1.0" encoding="utf-8" ?>
<WorkspaceTemplateInfo>
	<Uid>D9E58708-63DF-42f6-9713-C9BCE4377F98</Uid>
	<Title>2 Columns</Title>
	<Description>{DashboardStrings:Two_Columns_2}</Description>
	<ColumnInfo><![CDATA[[{id: 'Column1', width: 34}, {id: 'Column2', width: 66}]]]></ColumnInfo>
	<ImageUrl>Apps/Dashboard/images/LayoutTypes/1_2.jpg</ImageUrl>
</WorkspaceTemplateInfo>


text:
/*
 * Your rights to use code governed by this license http://o-s-a.net/doc/license_simple_engine.pdf
 * Ваши права на использование кода регулируются данной лицензией http://o-s-a.net/doc/license_simple_engine.pdf
*/

using System;
using System.Collections.Generic;

namespace OsEngine.Entity
{
    /// <summary>
    /// parameter interface
    /// интерфейс для параметра
    /// </summary>
    public interface IIStrategyParameter
    {
        /// <summary>
        /// уникальное имя параметра
        /// </summary>
        string Name { get; }

        /// <summary>
        /// unique parameter name
        /// взять строку для сохранения
        /// </summary>
        string GetStringToSave();

        /// <summary>
        /// загрузить параметр из строки
        /// загрузить параметр из строки
        /// </summary>
        /// <param name="save">line with saved parameters/строка с сохранёнными параметрами</param>
        void LoadParamFromString(string[] save);

        /// <summary>
        /// parameter type
        /// тип параметра
        /// </summary>
        StrategyParameterType Type { get; }

        /// <summary>
        /// name of the tab in the param window /
        /// название вкладки в окне параметров
        /// </summary>
        string TabName { get; set; }

        /// <summary>
        /// the parameter state has changed
        /// изменилось состояние параметра
        /// </summary>
        event Action ValueChange;
    }

    public class StrategyParameterLabel : IIStrategyParameter
    {
        public StrategyParameterLabel(string name, string label, string value, int rowHeight, int textHeight, System.Drawing.Color color, string tabName = null)
        {
            _name = name;
            Label = label;
            Value = value;
            TabName = tabName;
            RowHeight = rowHeight;
            TextHeight = textHeight;
            Color = color;
        }

        public string Label;
        public string Value;
        public int RowHeight;
        public int TextHeight;
        public System.Drawing.Color Color;

        public string Name { get { return _name; } }
        private string _name;

        public StrategyParameterType Type { get { return StrategyParameterType.Label; } }

        public string TabName { get; set; }

        public event Action ValueChange;

        public string GetStringToSave()
        {
            string save = _name + "#";

            save += Label + "#";
            save += Value + "#";
            save += RowHeight + "#";
            save += TextHeight + "#";
            save += Color.ToArgb() + "#";

            return save;

        }

        public void LoadParamFromString(string[] save)
        {
            try
            {
                Label = save[1];
                Value = save[2];
                RowHeight = Convert.ToInt32(save[3]);
                TextHeight = Convert.ToInt32(save[4]);
                Color = System.Drawing.Color.FromArgb(Convert.ToInt32(save[5]));
            }
            catch
            {
                // ignore
            }
        }
    }

    /// <summary>
    /// Parameter for an Int strategy
    /// параметр для стратегии типа Int
    /// </summary>
    public class StrategyParameterInt : IIStrategyParameter
    {
        /// <summary>
        /// constructor to create a parameter storing Int variables
        /// конструктор для создания параметра хранящего переменные типа Int
        /// </summary>
        /// <param name="name">Parameter name/Имя параметра</param>
        /// <param name="value">Default value/Значение по умолчанию</param>
        /// <param name="start">First value in optimization/Первое значение при оптимизации</param>
        /// <param name="stop">Last value during optimization/Последнее значение при оптимизации</param>
        /// <param name="step">Step change in optimization/Шаг изменения при оптимизации</param>
        public StrategyParameterInt(string name, int value, int start, int stop, int step, string tabName = null)
        {
            if (start > stop)
            {
                throw new Exception("Начальное значение параметра не может быть больше последнему");
            }

            _name = name;
            _valueInt = value;
            _valueIntDefolt = value;
            _valueIntStart = start;
            _valueIntStop = stop;
            _valueIntStep = step;
            TabName = tabName;
        }

        /// <summary>
        /// closed constructor
        /// закрытый конструктор
        /// </summary>
        private StrategyParameterInt()
        {

        }

        /// <summary>
        /// unique parameter name
        /// уникальное имя параметра
        /// </summary>
        public string Name
        {
            get { return _name; }
        }
        private string _name;

        public string TabName
        {
            get; set;
        }

        /// <summary>
        /// save the line
        /// взять строку сохранения
        /// </summary>
        public string GetStringToSave()
        {
            string save = _name + "#";

            save += _valueInt + "#";
            save += _valueIntDefolt + "#";
            save += _valueIntStart + "#";
            save += _valueIntStop + "#";
            save += _valueIntStep + "#";

            return save;
        }

        /// <summary>
        /// Load the parameter from the saved file
        /// загрузить параметр из сохранённого файла
        /// </summary>
        public void LoadParamFromString(string[] save)
        {
            _valueInt = Convert.ToInt32(save[1]);

            try
            {
                _valueIntDefolt = Convert.ToInt32(save[2]);
                _valueIntStart = Convert.ToInt32(save[3]);
                _valueIntStop = Convert.ToInt32(save[4]);
                _valueIntStep = Convert.ToInt32(save[5]);
            }
            catch
            {
                // ignore
            }

        }

        /// <summary>
        /// parameter type
        /// тип параметра
        /// </summary>
        public StrategyParameterType Type
        {
            get { return StrategyParameterType.Int; }
        }

        /// <summary>
        /// current value of the parameter of Int type
        /// текущее значение параметра типа Int
        /// </summary>
        public int ValueInt
        {
            get
            {
                return _valueInt;
            }
            set
            {
                if (_valueInt == value)
                {
                    return;
                }
                _valueInt = value;
                if (ValueChange != null)
                {
                    ValueChange();
                }
            }
        }
        private int _valueInt;

        /// <summary>
        /// default value for the Int type parameter
        /// значение по умолчанию для параметра типа Int
        /// </summary>
        public int ValueIntDefolt
        {
            get
            {
                return _valueIntDefolt;
            }
        }
        private int _valueIntDefolt;

        /// <summary>
        /// starting value during optimization for the parameter of Int
        /// стартовое значение при оптимизации для параметра типа Int
        /// </summary>
        public int ValueIntStart
        {
            get
            {
                return _valueIntStart;
            }
        }
        private int _valueIntStart;

        /// <summary>
        /// the last value during optimization for the parameter of Int type
        /// последнее значение при оптимизации для параметра типа Int
        /// </summary>
        public int ValueIntStop
        {
            get
            {
                return _valueIntStop;
            }
        }
        private int _valueIntStop;

        /// <summary>
        /// incremental step for the Int type parameter
        /// шаг приращения для параметра типа Int
        /// </summary>
        public int ValueIntStep
        {
            get
            {
                return _valueIntStep;
            }
        }
        private int _valueIntStep;

        /// <summary>
        /// the parameter state has changed
        /// изменилось состояние параметра
        /// </summary>
        public event Action ValueChange;
    }

    /// <summary>
    /// The parameter of the Decimal type strategy
    /// параметр стратегии типа Decimal
    /// </summary>
    public class StrategyParameterDecimal : IIStrategyParameter
    {

        /// <summary>
        /// Designer for creating a parameter storing Decimal type variables
        /// конструктор для создания параметра хранящего переменные типа Decimal
        /// </summary>
        /// <param name="name">Parameter name/Имя параметра</param>
        /// <param name="value">Default value/Значение по умолчанию</param>
        /// <param name="start">First value in optimization/Первое значение при оптимизации</param>
        /// <param name="stop">last value in optimization/Последнее значение при оптимизации</param>
        /// <param name="step">Step change in optimization/Шаг изменения при оптимизации</param>
        public StrategyParameterDecimal(string name, decimal value, decimal start, decimal stop, decimal step, string tabName = null)
        {
            if (start > stop)
            {
                throw new Exception("Начальное значение параметра не может быть больше последнему");
            }

            _name = name;
            _valueDecimal = value;
            _valueDecimalDefolt = value;
            _valueDecimalStart = start;
            _valueDecimalStop = stop;
            _valueDecimalStep = step;
            _type = StrategyParameterType.Decimal;
            TabName = tabName;
        }

        /// <summary>
        /// blank. it is impossible to create a variable of StrategyParameter type with an empty constructor
        /// заглушка. нельзя создать переменную типа StrategyParameter с пустым конструктором
        /// </summary>
        private StrategyParameterDecimal()
        {

        }

        /// <summary>
        /// to take a line to save
        /// взять строку для сохранения
        /// </summary>
        public string GetStringToSave()
        {
            string save = _name + "#";
            save += _valueDecimal + "#";
            save += _valueDecimalDefolt + "#";
            save += _valueDecimalStart + "#";
            save += _valueDecimalStop + "#";
            save += _valueDecimalStep + "#";

            return save;
        }

        /// <summary>
        /// download settings from the save file
        /// загрузить настройки из файла сохранения
        /// </summary>
        /// <param name="save"></param>
        public void LoadParamFromString(string[] save)
        {
            _valueDecimal = save[1].ToDecimal();

            try
            {
                _valueDecimalDefolt = save[2].ToDecimal();
                _valueDecimalStart = save[3].ToDecimal();
                _valueDecimalStop = save[4].ToDecimal();
                _valueDecimalStep = save[5].ToDecimal();
            }
            catch
            {
                // ignore
            }
        }

        /// <summary>
        /// Parameter name. Used to identify a parameter in the settings windows
        /// Название параметра. Используется для идентификации параметра в окнах настроек
        /// </summary>
        public string Name
        {
            get { return _name; }
        }
        private string _name;

        public string TabName
        {
            get;set;
        }

        /// <summary>
        /// parameter type
        /// тип параметра
        /// </summary>
        public StrategyParameterType Type
        {
            get { return _type; }
        }
        private StrategyParameterType _type;

        /// <summary>
        /// current value of the Decimal parameter
        /// текущее значение параметра Decimal
        /// </summary>
        public decimal ValueDecimal
        {
            get
            {
                return _valueDecimal;
            }
            set
            {
                if (_valueDecimal == value)
                {
                    return;
                }
                _valueDecimal = value;
                if (ValueChange != null)
                {
                    ValueChange();
                }
            }
        }
        private decimal _valueDecimal;

        /// <summary>
        /// default value for the Decimal type
        /// значение по умолчанию для параметра типа Decimal
        /// </summary>
        public decimal ValueDecimalDefolt
        {
            get
            {
                return _valueDecimalDefolt;
            }
        }
        private decimal _valueDecimalDefolt;

        /// <summary>
        /// initial value of the Decimal type parameter
        /// начальное значение параметра типа Decimal
        /// </summary>
        public decimal ValueDecimalStart
        {
            get
            {
                return _valueDecimalStart;
            }
        }
        private decimal _valueDecimalStart;

        /// <summary>
        /// the last value of the Decimal type parameter
        /// последнее значение параметра типа Decimal
        /// </summary>
        public decimal ValueDecimalStop
        {
            get
            {
                return _valueDecimalStop;
            }
        }
        private decimal _valueDecimalStop;

        /// <summary>
        /// incremental step of the Decimal type parameter
        /// шаг приращения параметра типа Decimal
        /// </summary>
        public decimal ValueDecimalStep
        {
            get
            {
                return _valueDecimalStep;
            }
        }
        private decimal _valueDecimalStep;

        /// <summary>
        /// event: the parameter has changed
        /// событие: параметр изменился
        /// </summary>
        public event Action ValueChange;
    }

    /// <summary>
    /// Bool type strategy parameter
    /// параметр стратегии типа Bool
    /// </summary>
    public class StrategyParameterBool : IIStrategyParameter
    {
        public StrategyParameterBool(string name, bool value, string tabName = null)
        {
            _name = name;
            _valueBoolDefolt = value;
            _valueBool = value;
            _type = StrategyParameterType.Bool;
            TabName = tabName;
        }

        /// <summary>
        /// blank. it is impossible to create a variable of StrategyParameter type with an empty constructor
        /// заглушка. нельзя создать переменную типа StrategyParameter с пустым конструктором
        /// </summary>
        private StrategyParameterBool()
        {

        }

        public string TabName
        {
            get; set;
        }

        /// <summary>
        /// to take a line to save
        /// взять строку для сохранения
        /// </summary>
        public string GetStringToSave()
        {
            string save = _name + "#";
            save += _valueBool + "#";
            save += _valueBoolDefolt + "#";

            return save;
        }

        /// <summary>
        ///  download settings from the save file
        /// загрузить настройки из файла сохранения
        /// </summary>
        /// <param name="save"></param>
        public void LoadParamFromString(string[] save)
        {
            _name = save[0];
            _valueBool = Convert.ToBoolean(save[1]);

            try
            {
                _valueBoolDefolt = Convert.ToBoolean(save[2]);
            }
            catch
            {
                // ignore
            }
        }

        /// <summary>
        /// Parameter name. Used to identify a parameter in the settings windows
        /// Название параметра. Используется для идентификации параметра в окнах настроек
        /// </summary>
        public string Name
        {
            get { return _name; }
        }
        private string _name;

        /// <summary>
        /// parameter type
        /// тип параметра
        /// </summary>
        public StrategyParameterType Type
        {
            get { return _type; }
        }
        private StrategyParameterType _type;

        /// <summary>
        /// parameter Boolean value
        /// значение булева параметра
        /// </summary>
        public bool ValueBool
        {
            get
            {
                return _valueBool;
            }
            set
            {
                if (_valueBool == value)
                {
                    return;
                }
                _valueBool = value;
                if (ValueChange != null)
                {
                    ValueChange();
                }
            }
        }
        private bool _valueBool;

        /// <summary>
        /// default setting for the parameter boolean
        /// значение по умолчанию для булева параметра
        /// </summary>
        public bool ValueBoolDefolt
        {
            get
            {
                return _valueBoolDefolt;
            }
        }
        private bool _valueBoolDefolt;

        /// <summary>
        /// event: the parameter has changed
        /// событие: параметр изменился
        /// </summary>
        public event Action ValueChange;
    }

    /// <summary>
    /// A strategy parameter that stores a collection of strings
    /// параметр стратегии хранящий в себе коллекцию строк
    /// </summary>
    public class StrategyParameterString : IIStrategyParameter
    {
        /// <summary>
        /// constructor to create a parameter storing variables of String type
        /// конструктор для создания параметра хранящего переменные типа String
        /// </summary>
        /// <param name="name">Parameter name/Имя параметра</param>
        /// <param name="value">Default value/Значение по умолчанию</param>
        /// <param name="collection">Possible value options/Возможные варианты значений</param>
        public StrategyParameterString(string name, string value, List<string> collection, string tabName = null)
        {
            bool isInArray = false;

            if (collection == null)
            {
                collection = new List<string>();
            }

            for (int i = 0; i < collection.Count; i++)
            {
                if (collection[i] == value)
                {
                    isInArray = true;
                    break;
                }
            }

            if (isInArray == false)
            {
                collection.Add(value);
            }

            _name = name;
            _valueString = value;
            _setStringValues = collection;
            _type = StrategyParameterType.String;
            TabName = tabName;
        }

        /// <summary>
        /// constructor to create a parameter storing variables of String type
        /// конструктор для создания параметра хранящего переменные типа String
        /// </summary>
        /// <param name="name">Parameter name/Имя параметра</param>
        /// <param name="value">Default value/Значение по умолчанию</param>
        public StrategyParameterString(string name, string value, string tabName = null)
        {
            if (value == null)
            {
                value = "";
            }

            _name = name;
            _valueString = value;
            _setStringValues = new List<string>() { value };
            _type = StrategyParameterType.String;
            TabName = tabName;
        }

        /// <summary>
        /// blank. it is impossible to create a variable of StrategyParameter type with an empty constructor
        /// заглушка. нельзя создать переменную типа StrategyParameter с пустым конструктором
        /// </summary>
        private StrategyParameterString()
        {

        }

        /// <summary>
        /// to take a line to save
        /// взять строку для сохранения
        /// </summary>
        public string GetStringToSave()
        {
            string save = _name + "#";
            save += _valueString + "#";

            for(int i = 0;i < _setStringValues.Count;i++)
            {
                save += _setStringValues[i] + "#";
            }

            return save;
        }

        /// <summary>
        /// download settings from the save file
        /// загрузить настройки из файла сохранения
        /// </summary>
        /// <param name="save"></param>
        public void LoadParamFromString(string[] save)
        {
            _valueString = save[1];

            _setStringValues = new List<string>();

            for (int i = 2; i < save.Length; i++)
            {
                if(string.IsNullOrEmpty(save[i]))
                {
                    continue;
                }

                _setStringValues.Add(save[i]);
            }
        }

        /// <summary>
        /// Parameter name. Used to identify a parameter in the settings windows
        /// Название параметра. Используется для идентификации параметра в окнах настроек
        /// </summary>
        public string Name
        {
            get { return _name; }
        }
        private string _name;

        public string TabName
        {
            get; set;
        }

        /// <summary>
        /// parameter type
        /// тип параметра
        /// </summary>
        public StrategyParameterType Type
        {
            get { return _type; }
        }
        private StrategyParameterType _type;

        /// <summary>
        /// current value of the string type parameter
        /// текущее значение параметра типа string
        /// </summary>
        public string ValueString
        {
            get
            {
                return _valueString;
            }
            set
            {
                if (_valueString == value)
                {
                    return;
                }
                _valueString = value;
                if (ValueChange != null)
                {
                    ValueChange();
                }
            }
        }
        private string _valueString;
        public List<string> ValuesString
        {
            get
            {
                if (_type != StrategyParameterType.String)
                {
                    throw new Exception("Попытка запросить у параметра с типом String, поле " + _type);
                }
                return _setStringValues;
            }
        }

        private List<string> _setStringValues;

        /// <summary>
        /// event: the parameter has changed
        /// событие: параметр изменился
        /// </summary>
        public event Action ValueChange;
    }

    public class StrategyParameterTimeOfDay : IIStrategyParameter
    {
        public StrategyParameterTimeOfDay(string name, int hour, int minute, int second, int millisecond, string tabName = null)
        {
            _name = name;
            Value = new TimeOfDay();
            Value.Hour = hour;
            Value.Minute = minute;
            Value.Second = second;
            Value.Millisecond = millisecond;
            _type = StrategyParameterType.TimeOfDay;
            TabName = tabName;
        }

        public string Name
        {
            get { return _name; }
        }
        private string _name;

        public string TabName { get; set; }

        public TimeOfDay Value;

        public string GetStringToSave()
        {
            string save = _name + "#";
            save += Value.ToString() + "#";

            return save;
        }

        public void LoadParamFromString(string[] save)
        {
            if (Value.LoadFromString(save[1]) &&
                ValueChange != null)
            {
                ValueChange();
            }
        }

        public StrategyParameterType Type
        {
            get { return _type; }
        }
        private StrategyParameterType _type;

        public event Action ValueChange;

        public TimeSpan TimeSpan
        {
            get
            {
                return Value.TimeSpan;
            }
        }
    }

    public class TimeOfDay
    {
        public int Hour;

        public int Minute;

        public int Second;

        public int Millisecond;

        public override string ToString()
        {
            string result = Hour + ":";
            result += Minute + ":";
            result += Second + ":";
            result += Millisecond;

            return result;
        }

        public bool LoadFromString(string save)
        {
            string[] array = save.Split(':');

            bool paramUpdated = false;

            if (Hour != Convert.ToInt32(array[0]))
            {
                Hour = Convert.ToInt32(array[0]);
                paramUpdated = true;
            }
            if (Minute != Convert.ToInt32(array[1]))
            {
                Minute = Convert.ToInt32(array[1]);
                paramUpdated = true;
            }
            if (Second != Convert.ToInt32(array[2]))
            {
                Second = Convert.ToInt32(array[2]);
                paramUpdated = true;
            }
            if (Millisecond != Convert.ToInt32(array[3]))
            {
                Millisecond = Convert.ToInt32(array[3]);
                paramUpdated = true;
            }

            return paramUpdated;
        }

        public static bool operator >(TimeOfDay c1, DateTime c2)
        {
            if (c1.Hour > c2.Hour)
            {
                return true;
            }

            if (c1.Hour >= c2.Hour
                && c1.Minute > c2.Minute)
            {
                return true;
            }

            if (c1.Hour >= c2.Hour
                && c1.Minute >= c2.Minute
                && c1.Second > c2.Second)
            {
                return true;
            }

            if (c1.Hour >= c2.Hour
                && c1.Minute >= c2.Minute
                && c1.Second >= c2.Second
                && c1.Millisecond > c2.Millisecond)
            {
                return true;
            }

            return false;
        }

        public static bool operator <(TimeOfDay c1, DateTime c2)
        {
            if (c1.Hour < c2.Hour)
            {
                return true;
            }

            if (c1.Hour == c2.Hour
                && c1.Minute < c2.Minute)
            {
                return true;
            }

            if (c1.Hour == c2.Hour
                && c1.Minute == c2.Minute
                && c1.Second < c2.Second)
            {
                return true;
            }

            if (c1.Hour == c2.Hour
                && c1.Minute == c2.Minute
                && c1.Second == c2.Second
                && c1.Millisecond < c2.Millisecond)
            {
                return true;
            }

            return false;
        }

        public TimeSpan TimeSpan
        {
            get
            {
                TimeSpan time = new TimeSpan(0, Hour, Minute, Second);

                return time;
            }
        }
    }

    /// <summary>
    /// A strategy parameter to button click
    /// Параметр для обработки нажатия на кнопку
    /// </summary>
    public class StrategyParameterButton : IIStrategyParameter
    {
        public StrategyParameterButton(string buttonLabel, string tabName = null)
        {
            _name = buttonLabel;
            _type = StrategyParameterType.Button;
            TabName = tabName;
        }

        public string TabName { get; set; }

        /// <summary>
        /// blank. it is impossible to create a variable of StrategyParameter type with an empty constructor
        /// заглушка. нельзя создать переменную типа StrategyParameter с пустым конструктором
        /// </summary>
        private StrategyParameterButton()
        {

        }

        /// <summary>
        /// to take a line to save
        /// взять строку для сохранения
        /// </summary>
        public string GetStringToSave()
        {
            string save = _name + "#";

            return save;
        }

        /// <summary>
        /// download settings from the save file
        /// загрузить настройки из файла сохранения
        /// </summary>
        /// <param name="save"></param>
        public void LoadParamFromString(string[] save)
        {
        }

        /// <summary>
        /// Parameter name. Used to identify a parameter in the settings windows
        /// Название параметра. Используется для идентификации параметра в окнах настроек
        /// </summary>
        public string Name
        {
            get { return _name; }
        }
        private string _name;

        /// <summary>
        /// parameter type
        /// тип параметра
        /// </summary>
        public StrategyParameterType Type
        {
            get { return _type; }
        }
        private StrategyParameterType _type;

        public event Action ValueChange;

        public void Click()
        {
            UserClickOnButtonEvent?.Invoke();
        }

        public event Action UserClickOnButtonEvent;
    }

    /// <summary>
    /// parameter type
    /// тип параметра
    /// </summary>
    public enum StrategyParameterType
    {
        /// <summary>
        /// an integer number with the type Int
        /// целое число с типом Int
        /// </summary>
        Int,

        /// <summary>
        /// a floating point number of the decimal type
        /// число с плавающей точкой типа decimal
        /// </summary>
        Decimal,

        /// <summary>
        /// string
        /// строка
        /// </summary>
        String,

        /// <summary>
        /// Boolean value
        /// булево значение
        /// </summary>
        Bool,

        /// <summary>
        /// время
        /// </summary>
        TimeOfDay,

        /// <summary>
        /// нажатие на кнопку
        /// </summary>
        Button,

        /// <summary>
        /// надпись в окне параметров
        /// </summary>
        Label
    }

}


text:
#include "levels.h"
#include "../herdem.h"
#include "../jaunty/jaunty.h"

void set_up_level_seven()
{
    int map_w = 32, map_h = 22, tw = 32, th = 32;
    herdem_dog *dog;
    herdem_sheep *sheep;

    herdem_engine->target_sheeps = 6;
    herdem_engine->saved_sheeps = 0;
    herdem_engine->level_start_time = SDL_GetTicks();
    herdem_saved_tally_update(herdem_engine->info_board->saved_tally);

    jty_engine->is_level_finished = is_level_seven_finished;
    jty_engine->clean_up_level = clean_up_level_seven;

    /* Creating map */
    if(!(herdem_engine->parent.map = new_jty_map(
                map_w, map_h, tw, th,
                "images/map.png",
                "ABCDEFGHIJK"
                "LMNOPQRSTUV"
                "WXYZabcdefg",
                "ABBBBBBBBBBBBBBBBBBBBBBbBBBBBBBC"
                "LMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMN"
                "LMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMN"
                "LMMMMMMMMMMMMMMMMMMMMMMNMMMMMMMN"
                "LMMMMMMMMMMMMMMMMMAXXXXYMMMMMMMN"
                "LMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMN"
                "LMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMN"
                "LMMMMMMMMMMMMMMMMMNMMMMMMMMMMMMN"
                "LMMMMMMMMMMMMMMMMMNMMMMMMAEMMMMN"
                "LMMMMMMMMMMMAXXXXXYMMMMMMLMMMMMN"
                "LMMMMMMMMMMMNMMMMMMMMMMMMLMMMMMN"
                "LMMMMMMMMMMMNMMMMMMMMMMMMLMMMMMN"
                "LMMMMMMMMMMMNMMMMMMMMMMMMLMMMMMN"
                "LMMMMMMMMMMMNMMMMMMMMABBBYMMMMMN"
                "LMMMMMMAXXXXYMMMMMMMMLMMMMMMMMMN"
                "LMMMMMMNMMMMMMMMMMMMMLMMMMMMMMMN"
                "LMMMMMMNMMMMMMMMMMMMMLMMMMMMMMMN"
                "LMMMMMMZMMMMMMMMMABBBYMMMMMMMMMN"
                "LMMMMMMMMMMMMMMMMLMMMMMMMMMMMMMN"
                "LMMMMMMMMMMMMMMMMLMMMMMMMMMMMMMN"
                "LMMMMMMMMMMMMMMMMLMMPMMMMMMMMMMN"
                "WXXXXXXXXXXXXXXXXYMMWbbbbbbbbbbY",

                "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
                "baaaaaaaaaaaaaaaaaaaaaabaaaaaaab"
                "baaaaaaaaaaaaaaaaaaaaaabaaaaaaab"
                "baaaaaaaaaaaaaaaaaaaaaabaaaaaaab"
                "baaaaaaaaaaaaaaaaabbbbbbaaaaaaab"
                "baaaaaaaaaaaaaaaaabaaaaaaaaaaaab"
                "baaaaaaaaaaaaaaaaabaaaaaaaaaaaab"
                "baaaaaaaaaaaaaaaaabaaaaaaaaaaaab"
                "baaaaaaaaaaaaaaaaabaaaaaabbaaaab"
                "baaaaaaaaaaabbbbbbbaaaaaabaaaaab"
                "baaaaaaaaaaabaaaaaaaaaaaabaaaaab"
                "baaaaaaaaaaabaaaaaaaaaaaabaaaaab"
                "baaaaaaaaaaabaaaaaaaaaaaabaaaaab"
                "baaaaaaaaaaabaaaaaaaabbbbbaaaaab"
                "baaaaaabbbbbbaaaaaaaabaaaaaaaaab"
                "baaaaaabaaaaaaaaaaaaabaaaaaaaaab"
                "baaaaaabaaaaaaaaaaaaabaaaaaaaaab"
                "baaaaaabaaaaaaaaabbbbbaaaaaaaaab"
                "baaaaaaaaaaaaaaaabaaaaaaaaaaaaab"
                "baaaaaaaaaaaaaaaabaaaaaaaaaaaaab"
                "baaaaaaaaaaaaaaaabaabaaaaaaaaaab"
                "bbbbbbbbbbbbbbbbbbccbbbbbbbbbbbb"
                ))) {
        fprintf(stderr, "Error loading map\n");
        exit(1);
    }

    jty_map_add_a_a_handler(
            jty_engine->map,
            HERDEM_SHEEP_GROUP_NUM,
            HERDEM_SHEEP_GROUP_NUM,
            herdem_sheep_sheep_collision_handler);
    jty_map_add_a_a_handler(
            jty_engine->map,
            HERDEM_DOG_GROUP_NUM,
            HERDEM_SHEEP_GROUP_NUM,
            herdem_dog_sheep_collision_handler);

    dog = new_herdem_dog();
    dog->parent.x = dog->parent.px = 625;
    dog->parent.y = dog->parent.py = 605;
    dog->parent.vx = dog->parent.vy = 0.0;
    dog->parent.ax = dog->parent.ay = 0.0;
    dog->parent.current_sprite = DIRECTION_E;

    sheep = new_herdem_sheep();
    sheep->parent.x = sheep->parent.px = 95;
    sheep->parent.y = sheep->parent.py = 95;
    sheep->parent.vx = 0.1;
    sheep->parent.vy = -0.5;

    sheep = new_herdem_sheep();
    sheep->parent.x = sheep->parent.px = 175;
    sheep->parent.y = sheep->parent.py = 105;
    sheep->parent.vx = -0.5;
    sheep->parent.vy = 0.1;

    sheep = new_herdem_sheep();
    sheep->parent.x = sheep->parent.px = 145;
    sheep->parent.y = sheep->parent.py = 275;
    sheep->parent.vx = -0.5;
    sheep->parent.vy = 0.5;

    sheep = new_herdem_sheep();
    sheep->parent.x = sheep->parent.px = 325;
    sheep->parent.y = sheep->parent.py = 180;
    sheep->parent.vx = 0.5;
    sheep->parent.vy = 0.01;

    sheep = new_herdem_sheep();
    sheep->parent.x = sheep->parent.px = 455;
    sheep->parent.y = sheep->parent.py = 145;
    sheep->parent.vx = 0.5;
    sheep->parent.vy = 0.01;

    sheep = new_herdem_sheep();
    sheep->parent.x = sheep->parent.px = 650;
    sheep->parent.y = sheep->parent.py = 65;
    sheep->parent.vx = 0.1;
    sheep->parent.vy = 0.5;

}

bool is_level_seven_finished()
{
    herdem_engine->level_time = SDL_GetTicks() - herdem_engine->level_start_time;
    if (herdem_engine->saved_sheeps == herdem_engine->target_sheeps)
        return true;
    return false;
}

void clean_up_level_seven()
{
    fprintf(stderr, "Level lasted %f seconds\n", herdem_engine->level_time/1000.);

    herdem_eng_clean_up_level(herdem_engine);

    jty_engine->set_up_level = NULL;
}


text:
<?php

namespace Represent\Tests\Annotations;

use Represent\Annotations\Property;
use Represent\Test\RepresentTestCase;

class PropertyTest extends RepresentTestCase
{
    public function testDoesNotAllowInvalidProperties()
    {
        $this->setExpectedException(
            'InvalidArgumentException', 'Property "wrong" does not exist'
        );

        new Property(array('wrong' => 'invalid'));
    }

    public function testMustHaveCorrectValueForType()
    {
        $this->setExpectedException(
            'InvalidArgumentException', 'type must be one of the following values: integer, string, boolean, datetime'
        );

        new Property(array('type' => 'invalid'));
    }
}


text:
Á dögunum fór fram sala á happdrættismiðum Badmintonsambands Íslands. Yngri iðkendur félaga víðsvegar að tóku þátt í að selja miðana og gekk salan mjög vel. Baldur Einarsson seldi flesta happdrættismiða af þeim TBR-ingum sem tóku þátt í sölunni, en hann seldi alls 81 miða. Baldur fékk glæsilegan badmintonspaða frá BSÍ að launum. Dregið hefur verið í happdrættinu og má sjá upplýsingar um vinninga og vinningsmiða hér.

Baldur Einarsson, söluhæsti TBR-ingurinn.

Við óskum Baldri til hamingju með söluna og þökkum þeim sem styrktu BSÍ með kaupum á happdrættismiðum.


text:
#include <Library/DebugLib.h>

/**
  Disables the 64-bit paging mode on the CPU.

  Disables the 64-bit paging mode on the CPU and returns to 32-bit protected
  mode. This function assumes the current execution mode is 64-paging mode.
  This function is only available on x64. After the 64-bit paging mode is
  disabled, control is transferred to the function specified by EntryPoint
  using the new stack specified by NewStack and passing in the parameters
  specified by Context1 and Context2. Context1 and Context2 are optional and
  may be 0. The function EntryPoint must never return.

  @param  CodeSelector  The 16-bit selector to load in the CS before EntryPoint
                        is called. The descriptor in the GDT that this selector
                        references must be setup for 32-bit protected mode.
  @param  EntryPoint    The 64-bit virtual address of the function to call with
                        the new stack after paging is disabled.
  @param  Context1      The 64-bit virtual address of the context to pass into
                        the EntryPoint function as the first parameter after
                        paging is disabled.
  @param  Context2      The 64-bit virtual address of the context to pass into
                        the EntryPoint function as the second parameter after
                        paging is disabled.
  @param  NewStack      The 64-bit virtual address of the new stack to use for
                        the EntryPoint function after paging is disabled.

**/
VOID
EFIAPI
InternalX86DisablePaging64 (
  IN      UINT16                    CodeSelector,
  IN      UINT32                    EntryPoint,
  IN      UINT32                    Context1,  OPTIONAL
  IN      UINT32                    Context2,  OPTIONAL
  IN      UINT32                    NewStack
  )
{
  //
  // This function cannot work on IA32 platform
  //
  ASSERT (FALSE);
}


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

namespace c02d04_CubeMapTexture
{
    public static partial class Shaders
    {
        public const string blendVert = @"#version 330 core

layout(location = 0) in vec2 inPosition; //object space vertex position.

void main()
{
	//get the clip space position from the object space position.
	gl_Position = vec4(inPosition.xy * 2 - 1.0, 0, 1);
}
";
        public const string blendFrag = @"#version 330 core

uniform sampler2DRect tempTexture; //intermediate blending result.

layout(location = 0) out vec4 outColor;

void main()
{
    //return the intermediate blending result.
    outColor = texture(tempTexture, gl_FragCoord.xy);
    // for occlusion query.
    if (outColor.a == 0) discard;
}
";

    }
}