text:
package xyz.voxio.csc111.proj4_1;

import java.io.InputStream;
import java.io.PrintStream;
import java.util.Random;
import java.util.Scanner;

/**
 * Guessing Game
 * GuessingGame.java
 *
 * @author Tim Miller
 *         Due 10/27/14
 *         Write a program to play a guessing game with the user. The program
 *         should randomly
 *         generate an integer between 1 and 10, then ask the user to try to
 *         guess the number. If the user guesses incorrectly, the program should
 *         ask them to try again until the guess is correct; when the guess is
 *         correct, the program should print a congratulatory message.
 *         GuessingGame.class - The main type for the program
 *         GuessingGame
 *         ____________
 *         int playCount
 *         ____________
 *         +main(String[])
 *         +clearConsole()
 *         +getGuess()
 *         +getRandInt()
 *         +isInvalid(int)
 *         +playAgain()
 *         +printSlow(String)
 *         +shutdown()
 *         +sleep(int)
 */
public final class GuessingGame
{
	/**
	 * The games INPUT
	 */
	private static final InputStream	INPUT		= System.in;

	/**
	 * The games OUTPUT
	 */
	private static final PrintStream	OUTPUT		= System.out;

	private static int					playCount	= 0;

	/**
	 * The SCANner, used by the game
	 */
	private static final Scanner		SCAN		= new Scanner(
			GuessingGame.INPUT);

	/**
	 * The main(String[]) method, the entry point of the program
	 *
	 * @param args
	 *            args
	 */
	public static void main(final String[] args)
	{
		boolean playAgain = true;
		boolean correct = false;
		int guess, num;
		GuessingGame.printSlow("Welcome to The Elder Scrolls V: Skyrim!");
		GuessingGame.sleep(500);
		GuessingGame.clearConsole();
		GuessingGame
		.printSlow("Oops, sorry, wrong game!\nWelcome to the Guessing Game!\nHow excited are you?\nI'm really excited!\n");
		while (playAgain)
		{
			num = GuessingGame.getRandInt();
			guess = GuessingGame.getGuess();
			while (!correct)
			{
				if (guess != num)
				{
					correct = false;
				}
				else
				{
					correct = true;
				}
				if (correct)
				{
					break;
				}
				else
				{
					GuessingGame.printSlow("Sorry, guess again!");
					guess = GuessingGame.getGuess();
				}
			}
			GuessingGame
			.printSlow("You win!  This wasn't as much fun as Skyrim, was it?\nJust kidding!  This was way better!\nDo you want to play again? (yes/no)");
			GuessingGame.playCount++;
			playAgain = GuessingGame.playAgain();
		}
		GuessingGame.shutdown();
	}

	/**
	 * Clears the console, using either 'cls' or 'clear', depending on the
	 * operating system
	 */
	private static void clearConsole()
	{
		final String os = System.getProperty("os.name");
		try
		{
			if (os.contains("Windows"))
			{
				Runtime.getRuntime().exec("cls");
			}
			else
			{
				Runtime.getRuntime().exec("clear");
			}
		}
		catch (final Exception e)
		{
		}
	}

	/**
	 * Returns the players guess
	 *
	 * @return the guess
	 */
	private static int getGuess()
	{
		boolean invalid;
		int guess;
		GuessingGame.printSlow("Please enter an integer between 1 and 10!\n");
		try
		{
			guess = GuessingGame.SCAN.nextInt();
		}
		catch (final Exception e)
		{
			guess = -1;
		}
		invalid = GuessingGame.isInvalid(guess);
		while (invalid)
		{
			GuessingGame
			.printSlow("Sorry, that's not a valid input!  Remember, an integer between 1 and 10!\n");
			try
			{
				guess = GuessingGame.SCAN.nextInt();
				invalid = GuessingGame.isInvalid(guess);
			}
			catch (final Exception e)
			{
				invalid = true;
			}
		}
		return guess;
	}

	/**
	 * @return a random integer between 1 and 10
	 */
	private static int getRandInt()
	{
		return new Random().nextInt(9) + 1;
	}

	/**
	 * Determines whether or not the guess is valid, i.e. whether or not the
	 * guess is between 1 and 10
	 *
	 * @param guess
	 *            the guess
	 * @return whether or not the guess is valid
	 */
	private static boolean isInvalid(final int guess)
	{
		try
		{
			if ((guess < 1) || (guess > 10))
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		catch (final Exception e)
		{
			return true;
		}
	}

	/**
	 * Determine whether or not the player wants to play again
	 *
	 * @return whether or not the player wants to play again
	 */
	private static boolean playAgain()
	{
		final String response = GuessingGame.SCAN.next();
		switch (response.toLowerCase())
		{
			case "yes":
				if (GuessingGame.playCount == 1)
				{
					GuessingGame.printSlow("Wow!  You've already played "
							+ GuessingGame.playCount
							+ " time!  Maybe I should cut you off!");
				}
				else
				{
					GuessingGame.printSlow("Wow!  You've already played "
							+ GuessingGame.playCount
							+ " times!  Maybe I should cut you off!");
				}
				return true;
			case "no":
				return false;
			default:
				return false;
		}
	}

	/**
	 * Prints a string slowly, character by character, pausing between each
	 * character, for no reason other than I thought it was kind of funny
	 *
	 * @param string
	 *            the string to be printed
	 */
	private static void printSlow(final String string)
	{
		final char[] cArray = string.toCharArray();
		for (final char c : cArray)
		{
			GuessingGame.OUTPUT.print(c);
			try
			{
				Thread.sleep(55);
			}
			catch (final InterruptedException e)
			{
				e.printStackTrace();
				GuessingGame.shutdown();
			}
		}
		if (cArray[cArray.length - 1] != '\n')
		{
			GuessingGame.OUTPUT.print('\n');
		}
	}

	/**
	 * Closes the game
	 */
	private static void shutdown()
	{
		System.exit(0);
	}

	/**
	 * Puts the games thread to sleep for a given number of milliseconds
	 *
	 * @param i
	 *            the number of milliseconds to sleep for
	 */
	private static void sleep(final int i)
	{
		try
		{
			Thread.sleep(i);
		}
		catch (final InterruptedException e)
		{
			e.printStackTrace();
			GuessingGame.shutdown();
		}
	}

	/**
	 * The default constructor, rendered private for semantic reasons, i.e. this
	 * class should never be instantiated
	 */
	private GuessingGame()
	{

	}
}


text:
<?php include('_header.php'); ?>

<?php if (!$registration->registration_successful && !$registration->verification_successful) { ?>
<form class="form-group" method="post" action="register.php" name="registerform">
    <?php echo WORDING_REGISTRATION_USERNAME; ?>
    <input class="form-control" id="user_name" type="text" pattern="[a-zA-Z0-9]{2,64}" name="user_name" required />

    <?php echo WORDING_REGISTRATION_EMAIL; ?>
    <input class="form-control" id="user_email" type="email" name="user_email" required />

    <?php echo WORDING_REGISTRATION_PASSWORD; ?>
    <input class="form-control" id="user_password_new" type="password" name="user_password_new" pattern=".{6,}" required autocomplete="off" />

    <?php echo WORDING_REGISTRATION_PASSWORD_REPEAT; ?>
    <input class="form-control" id="user_password_repeat" type="password" name="user_password_repeat" pattern=".{6,}" required autocomplete="off" />

    <?php echo WORDING_REGISTRATION_CAPTCHA; ?>
    <input class="form-control" type="text" name="captcha" required />

    <input class="btn btn-default" type="submit" name="register" value="<?php echo WORDING_REGISTER; ?>" />
</form>
<?php } ?>

    <?php echo WORDING_BACK_TO_LOGIN; ?>

 <?php include('_footer.php'); ?>

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Models\Agency;
use App\Models\Project;
use App\Models\Commitment;
use App\Models\Menutop;
use App\Models\Menumain;
use App\Models\Menuleft;
use App\Models\Comm;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Facades\DB;

class CommitmentController extends Controller
{
    protected $comm;

    public function __construct(Comm $comm)
    {
        $this->comm = $comm;
    }

    public function commitmentview()
    {
        $comms = $this->comm->first();
        $menutops = DB::table('menu_top')->get();
        $menulefts = DB::table('menu_left')->get();
        $menumains = DB::table('menu_main')->get();
        $agencys = DB::table('agencies')->get();
        $commitments = DB::table('commitments')->leftJoin('agencies', 'commitments.managingagency', '=', 'agency_recordid')->leftJoin('projects', 'commitments.projectid', '=', 'project_recordid')->select('commitments.id','commitments.projectid','agencies.magency','agencies.magencyname','projects.project_projectid','commitments.plancommdate','commitments.budgetline','commitments.fmsnumber','commitments.description','commitments.commitmentcode','commitments.citycost','commitments.noncitycost')->paginate(20);
        $mainmenu = DB::table('menu_main')->value('menu_main_label');
        return view('frontend.commitments', compact('comms', 'commitments','menutops','menulefts','menumains','mainmenu'));
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function datasync()
    {
        $user           = \Auth::user();
        $userRole       = $user->hasRole('user');
        $editorRole     = $user->hasRole('editor');
        $adminRole      = $user->hasRole('administrator');

        if($userRole)
        {
            $access = 'User';
        } elseif ($editorRole) {
            $access = 'Editor';
        } elseif ($adminRole) {
            $access = 'Administrator';
        }
        $agencyupdate = DB::table('agencies')->first();
        $projectupdate = DB::table('projects')->first();
        $commitmentupdate = DB::table('commitments')->first();

        return view('pages.datasync', compact('agencyupdate', 'projectupdate', 'commitmentupdate'))->withUser($user)->withAccess($access);
    }

    public function noncitycostdesc()
    {
        $comms = $this->comm->first();
        $menutops = DB::table('menu_top')->get();
        $menulefts = DB::table('menu_left')->get();
        $menumains = DB::table('menu_main')->get();
        $agencys = DB::table('agencies')->get();
        $commitments = DB::table('commitments')->leftJoin('agencies', 'commitments.managingagency', '=', 'agency_recordid')->leftJoin('projects', 'commitments.projectid', '=', 'project_recordid')->select('commitments.id','commitments.projectid','agencies.magency','agencies.magencyname','projects.project_projectid','commitments.plancommdate','commitments.budgetline','commitments.fmsnumber','commitments.description','commitments.commitmentcode','commitments.citycost','commitments.noncitycost')->orderBy('commitments.noncitycost','desc')->paginate(20);
        $mainmenu = DB::table('menu_main')->value('menu_main_label');
        return view('frontend.commitments', compact('comms', 'commitments','menutops','menulefts','menumains','mainmenu'));
    }

    public function noncitycostasc()
    {
        $comms = $this->comm->first();
        $menutops = DB::table('menu_top')->get();
        $menulefts = DB::table('menu_left')->get();
        $menumains = DB::table('menu_main')->get();
        $agencys = DB::table('agencies')->get();
        $commitments = DB::table('commitments')->leftJoin('agencies', 'commitments.managingagency', '=', 'agency_recordid')->leftJoin('projects', 'commitments.projectid', '=', 'project_recordid')->select('commitments.id','commitments.projectid','agencies.magency','agencies.magencyname','projects.project_projectid','commitments.plancommdate','commitments.budgetline','commitments.fmsnumber','commitments.description','commitments.commitmentcode','commitments.citycost','commitments.noncitycost')->orderBy('commitments.noncitycost','asc')->paginate(20);
        $mainmenu = DB::table('menu_main')->value('menu_main_label');
        return view('frontend.commitments', compact('comms', 'commitments','menutops','menulefts','menumains','mainmenu'));
    }

    public function citycostdesc()
    {
        $comms = $this->comm->first();
        $menutops = DB::table('menu_top')->get();
        $menulefts = DB::table('menu_left')->get();
        $menumains = DB::table('menu_main')->get();
        $agencys = DB::table('agencies')->get();
        $commitments = DB::table('commitments')->leftJoin('agencies', 'commitments.managingagency', '=', 'agency_recordid')->leftJoin('projects', 'commitments.projectid', '=', 'project_recordid')->select('commitments.id','commitments.projectid','agencies.magency','agencies.magencyname','projects.project_projectid','commitments.plancommdate','commitments.budgetline','commitments.fmsnumber','commitments.description','commitments.commitmentcode','commitments.citycost','commitments.noncitycost')->orderBy('commitments.citycost','desc')->paginate(20);
        $mainmenu = DB::table('menu_main')->value('menu_main_label');
        return view('frontend.commitments', compact('comms', 'commitments','menutops','menulefts','menumains','mainmenu'));
    }

    public function citycostasc()
    {
        $comms = $this->comm->first();
        $menutops = DB::table('menu_top')->get();
        $menulefts = DB::table('menu_left')->get();
        $menumains = DB::table('menu_main')->get();
        $agencys = DB::table('agencies')->get();
        $commitments = DB::table('commitments')->leftJoin('agencies', 'commitments.managingagency', '=', 'agency_recordid')->leftJoin('projects', 'commitments.projectid', '=', 'project_recordid')->select('commitments.id','commitments.projectid','agencies.magency','agencies.magencyname','projects.project_projectid','commitments.plancommdate','commitments.budgetline','commitments.fmsnumber','commitments.description','commitments.commitmentcode','commitments.citycost','commitments.noncitycost')->orderBy('commitments.citycost','asc')->paginate(20);
        $mainmenu = DB::table('menu_main')->value('menu_main_label');
        return view('frontend.commitments', compact('comms', 'commitments','menutops','menulefts','menumains','mainmenu'));
    }

    public function find(Request $request)
    {
        $comms = $this->comm->first();
        $menutops = DB::table('menu_top')->get();
        $menulefts = DB::table('menu_left')->get();
        $menumains = DB::table('menu_main')->get();
        $agencys = DB::table('agencies')->get();
        $find = $request->input('find');
        $commitments = DB::table('commitments')->where('commitmentdescription',  'like', '%'.$find.'%')->leftJoin('agencies', 'commitments.managingagency', '=', 'agency_recordid')->leftJoin('projects', 'commitments.projectid', '=', 'project_recordid')->select('commitments.id','agencies.magency','agencies.magencyname','projects.project_projectid','commitments.plancommdate','commitments.budgetline','commitments.fmsnumber','commitments.description','commitments.commitmentcode','commitments.citycost','commitments.noncitycost')->paginate(20);
        $mainmenu = DB::table('menu_main')->value('menu_main_label');
        return view('frontend.commitments', compact('comms', 'commitments','menutops','menulefts','menumains','mainmenu'));
    }
}


text:
import App from "../app";
import {pubsub} from "../helpers/subscriptionManager";

App.on("updateViewscreenName", ({id, name}) => {
  const viewscreen = App.viewscreens.find(v => v.id === id);
  viewscreen.updateName(name);
  pubsub.publish("viewscreensUpdate", App.viewscreens);
});
App.on(
  "updateViewscreenComponent",
  ({id, simulatorId, component, data, secondary = false, context}) => {
    const viewscreens = App.viewscreens.filter(
      v =>
        v.id === id ||
        (v.simulatorId === simulatorId &&
          (id === "all" ||
            (id === "primary" && !v.secondary) ||
            (id === "secondary" && v.secondary))) ||
        (!id && v.simulatorId === simulatorId && v.secondary === secondary),
    );
    if (viewscreens.length === 0) return;
    const client = App.clients.find(c => c.id === viewscreens[0].id);
    // First de-auto the viewscreen, since we want to force this component;
    const simulator = App.simulators.find(s => s.id === client.simulatorId) ||
      context.simulator || {id: simulatorId};
    viewscreens.forEach(viewscreen => {
      viewscreen.updateAuto(false);
      viewscreen.updateComponent(
        component,
        data ? data.replace(/#SIM/gi, simulator ? simulator.name : "") : data,
      );
    });
    pubsub.publish("viewscreensUpdate", App.viewscreens);
  },
);
App.on("updateViewscreenData", ({id, data}) => {
  const viewscreen = App.viewscreens.find(
    v =>
      v.id === id ||
      (v.simulatorId === id &&
        (id === "all" ||
          (id === "primary" && !v.secondary) ||
          (id === "secondary" && v.secondary))),
  );
  viewscreen.updateData(data);
  pubsub.publish("viewscreensUpdate", App.viewscreens);
});
App.on("updateViewscreenAuto", ({id, simulatorId, auto}) => {
  const viewscreen = App.viewscreens.find(
    v => v.id === id || v.simulatorId === simulatorId,
  );
  viewscreen.updateAuto(auto);
  pubsub.publish("viewscreensUpdate", App.viewscreens);
});
App.on("setViewscreenToAuto", ({id, simulatorId, secondary = false}) => {
  const viewscreen = App.viewscreens.filter(
    v =>
      v.id === id ||
      (v.simulatorId === simulatorId &&
        (id === "all" ||
          (id === "primary" && !v.secondary) ||
          (id === "secondary" && v.secondary))) ||
      (!id && v.simulatorId === simulatorId && v.secondary === secondary),
  );
  viewscreen.forEach(v => {
    v.updateAuto(true);
  });
  pubsub.publish("viewscreensUpdate", App.viewscreens);
});
App.on("updateViewscreenSecondary", ({id, secondary}) => {
  const viewscreen = App.viewscreens.find(v => v.id === id);
  viewscreen.secondary = secondary;
  pubsub.publish("viewscreensUpdate", App.viewscreens);
});

App.on("toggleViewscreenVideo", ({simulatorId, viewscreenId}) => {
  pubsub.publish("viewscreenVideoToggle", {simulatorId, viewscreenId});
});
App.on(
  "setViewscreenPictureInPicture",
  ({simulatorId, id, secondary = false, component, data, size, position}) => {
    const viewscreens = App.viewscreens.filter(
      v =>
        v.id === id ||
        (v.simulatorId === simulatorId &&
          (id === "all" ||
            (id === "primary" && !v.secondary) ||
            (id === "secondary" && v.secondary))) ||
        (!id && v.simulatorId === simulatorId && v.secondary === secondary),
    );
    viewscreens.forEach(viewscreen => {
      viewscreen.setPictureInPicture(component, data, position, size);
    });
    pubsub.publish("viewscreensUpdate", App.viewscreens);
  },
);
App.on(
  "removeViewscreenPictureInPicture",
  ({simulatorId, id, secondary = false}) => {
    const viewscreens = App.viewscreens.filter(
      v =>
        v.id === id ||
        (v.simulatorId === simulatorId &&
          (id === "all" ||
            (id === "primary" && !v.secondary) ||
            (id === "secondary" && v.secondary))) ||
        (!id && v.simulatorId === simulatorId && v.secondary === secondary),
    );
    viewscreens.forEach(viewscreen => {
      viewscreen && viewscreen.clearPictureInPicture();
    });
    pubsub.publish("viewscreensUpdate", App.viewscreens);
  },
);


text:
package dispatcher

func NewEvent(channel string, data []byte) Event {
	return SimpleEvent{[]byte(channel), data}
}

//Events
type SimpleEvent struct {
	channel []byte
	data    []byte
}

func (s SimpleEvent) Data() []byte {
	return s.data
}

func (s SimpleEvent) Channel() []byte {
	return s.channel
}


text:
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

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

#include "resource.h"
#include "..\..\CakeControls\NWControl.h"
#include "vs100.h"

/////////////////////////////////////////////////////////////////////////////
// CVS100PropPage dialog

class CVS100PropPage :
	public CDialog,
	public IPropertyPage,
	public CNWControlSite
{
// Construction
public:
	CVS100PropPage(CWnd* pParent = NULL);   // standard constructor
	~CVS100PropPage();   // standard destructor

// Dialog Data
	//{{AFX_DATA(CVS100PropPage)
	enum { IDD = IDD_PROPPAGE };
	//}}AFX_DATA

	// *** IPropertyPage methods ***
	STDMETHODIMP_(HRESULT)	SetPageSite(LPPROPERTYPAGESITE pPageSite);
	STDMETHODIMP_(HRESULT)	Activate(HWND hwndParent, LPCRECT prect, BOOL fModal);
	STDMETHODIMP_(HRESULT)	Deactivate(void);
	STDMETHODIMP_(HRESULT)	GetPageInfo(LPPROPPAGEINFO pPageInfo);
	STDMETHODIMP_(HRESULT)	SetObjects(ULONG cObjects, LPUNKNOWN *ppUnk);
	STDMETHODIMP_(HRESULT)	Show(UINT nCmdShow);
	STDMETHODIMP_(HRESULT)	Move(LPCRECT prect);
	STDMETHODIMP_(HRESULT)	IsPageDirty(void);
	STDMETHODIMP_(HRESULT)	Apply(void);
	STDMETHODIMP_(HRESULT)	Help(LPCWSTR lpszHelpDir);
	STDMETHODIMP_(HRESULT)	TranslateAccelerator(LPMSG lpMsg);

	// *** IPlugInPropPageMFC methods ***
	// Implemented in ACTControllerGen.cpp
	STDMETHODIMP_(BOOL)	CreateMFCDialog( HWND hwndParent );
	STDMETHODIMP_(BOOL)	DestroyMFCDialog();

	// *** IUnknown methods ***
	// Implemented in ACTControllerGen.cpp
  	STDMETHODIMP_(HRESULT)	QueryInterface( REFIID riid, void** ppv );
  	STDMETHODIMP_(ULONG)	AddRef( void );
	STDMETHODIMP_(ULONG)	Release( void );

	CWnd *					GetCWnd(void){ return this; }
   void						RecalcLayout(void);
	ULONG						GetContainerNumber(void) const { return (ULONG)-1; }
	int						GetContainerIndex(void) const { return 0; }
	void						PopEdit(CProperty *,const CRect &,BOOL &){}

	// Callbacks from Control UI actions
	virtual void			DoCtrlContextMenu( CNWControl* pSource, UINT nFlags, CMenu& rMenu );
	virtual void			DoCtrlActivate( CNWControl* pSource, UINT nFlags );
	virtual void			RefreshControl( CNWControl* pSource );	// request to be refreshed from the App
	virtual void			OnValueChange( CNWControl* pSource );
	virtual void			OnFirstPunchIn( CNWControl* pSource );
	virtual void			OnFinalPunchOut( CNWControl* pSource );
	virtual void			RefreshAllControls();			// cause controls to obtain a new state from the seq.
	virtual void			OnRequestValueString( CNWControl* pSource, CString* pstr, double* pdVal = NULL );

	struct NamedKey
	{
		CString strName;
		DWORD vk;
	};
	static std::vector<NamedKey>		sm_vKeys;

protected:
	void						handleMouseLeave(void){}

private:

	void		createControls();
	void		createACTControls();

	CString	getFriendlyKeystrokeName( CVS100::ButtonActionDefinition& bad );
	CString	getFriendlyTransportName( CVS100::ButtonActionDefinition& bad );

	bool		isCtrlInVector( CNWControl *pCtrl, std::vector< CNWControl * > *pVector, DWORD *pdwIndex );

	// NWControls///
	CNWControl*			m_pfeetSw1;
	CNWControl*			m_pfeetSw2;
	CNWControl*			m_pctlDisableFaderMotors;

	CNWControl*					m_pctlACTContextLbl;
	CNWControl*					m_pctlACTModeLbl;
	std::vector<CNWControl*>	m_vRotaryACTLabels;
	std::vector<CNWControl*>	m_vDMPanACTLabels;
	std::vector<CNWControl*>	m_vDMVolACTLabels;
	std::vector<CNWControl*>	m_vDMSwitchACTLabels;
	CNWControl*						m_pctlValueEncoderACTLbl;
	CNWControl*						m_pctlValueEncoderPushACTLbl;
	CNWControl*						m_pctlCompACTLbl;

	std::set<CNWControl*>		m_setACTLabel;

	void				setCmdForButton( CNWControl* pSource );
	CNWControl*		makeSlider( DWORD dwParam, DWORD dwX );
	void				placeAndOffset( CNWControl* pC, CPoint& pt, int nXFactor, int nYFactor, int nXOffset = 0, int nYOffset = 0 );

	void				layoutACT();

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CVS100PropPage)
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
	LONG				m_cRef;
	CVS100*		m_pSurface;
	IPropertyPageSite*	m_pPageSite;
	BOOL				m_bDirty;

	bool					m_bCommandsDirty;
	CBitmap				m_bmpFaceplate;

	static INT_PTR CALLBACK DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

	void StartTimer();
	void StopTimer();

	void LoadAllFields();

	bool m_bInitDone;

	UINT_PTR m_uiTimerID;

	SONAR_MIXER_STRIP m_eStripType;

	// Generated message map functions
	//{{AFX_MSG(CVS100PropPage)
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	afx_msg void OnPaint();
public:
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ACTControllerPROPPAGE_H__00EDAF21_0203_11D2_AFFF_00A0C90DA071__INCLUDED_)


text:
Below is a list of common reviewers on Apollo related libraries:

- wzrdzl
- thymikee
- rasmusprentow
- mic
- bwlt
- TLadd
- budde377


text:
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <objectAnimator
        android:valueFrom="1.0"
        android:valueTo="0.0"
        android:propertyName="alpha"
        android:duration="@integer/card_flip_time_half" />

    <objectAnimator
        android:valueFrom="1.0"
        android:valueTo="0.5"
        android:propertyName="scaleX"
        android:duration="@integer/card_flip_time_half" />

    <objectAnimator
        android:valueFrom="1.0"
        android:valueTo="0.5"
        android:propertyName="scaleY"
        android:duration="@integer/card_flip_time_half" />

    <objectAnimator
        android:valueFrom="0"
        android:valueTo="-320dp"
        android:propertyName="translationX"
        android:duration="@integer/card_flip_time_half" />

    <objectAnimator
        android:valueFrom="0"
        android:valueTo="90"
        android:propertyName="rotationY"
        android:interpolator="@android:interpolator/accelerate_decelerate"
        android:duration="@integer/card_flip_time_half" />
</set>


text:
package cs122b.project1;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import cs122b.project1.obj.Customer;
import cs122b.project1.obj.Star;

public class JDBC_Connection {
	private Connection connection;

	public JDBC_Connection(String host, String dbname, String user, String pass) {
		try {
			connection = DriverManager.getConnection("jdbc:mysql://" + host + ":3306/" + dbname, user, pass);
		} catch (SQLException e) {
			e.getErrorCode();
			System.out.println("Login Error:\t" + e.getMessage() + "\nError Code:\t" + e.getErrorCode()
					+ "\nReturn to Login Menu!");
		}
	}

	public boolean isConnected() {
		if (connection == null)
			return false;
		return true;
	}

	public void search_movie_by_star_id(String id) {
		Statement select;
		try {
			select = connection.createStatement();
			String sql_string = "select * from movies where id in (select movie_id from stars_in_movies where stars_id="
					+ id + ")";
			ResultSet result = select.executeQuery(sql_string);
			if (result.next()) {
				result.beforeFirst();
				while (result.next()) {
					System.out.println("\nThe results of the query:");
					// print table's contents, field by field
					System.out.println("Id:\t\t" + result.getInt(1));
					System.out.println("Title:\t\t" + result.getString(2));
					System.out.println("Year:\t\t" + result.getInt(3));
					System.out.println("Dirctor:\t" + result.getString(4));
					System.out.println("Banner_URL:\t" + result.getString(5));
					System.out.println("Trailer:\t" + result.getString(6));
					System.out.println();
				}
			} else
				System.out.println("No record found!");

			result.close();
			select.close();
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}
	}

	public void search_movie_by_star_name(String fname, String lname) {
		Statement select;
		if (fname.equals(""))
			fname = "%%";
		if (lname.equals(""))
			lname = "%%";
		try {
			select = connection.createStatement();
			String sql_string = "select * from movies where id in "
					+ "(select movie_id from stars_in_movies where stars_id in "
					+ "(select id from stars where first_name like '" + fname + "' and last_name like '" + lname
					+ "'))";
			ResultSet result = select.executeQuery(sql_string);
			if (result.next()) {
				result.beforeFirst();
				while (result.next()) {
					System.out.println("\nThe results of the query:");
					// print table's contents, field by field
					System.out.println("Id:\t\t" + result.getInt(1));
					System.out.println("Title:\t\t" + result.getString(2));
					System.out.println("Year:\t\t" + result.getInt(3));
					System.out.println("Dirctor:\t" + result.getString(4));
					System.out.println("Banner_URL:\t" + result.getString(5));
					System.out.println("Trailer:\t" + result.getString(6));
					System.out.println();
				}
			} else
				System.out.println("No record found!");
			result.close();
			select.close();
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}

	}

	public void insert_star(Star star) {
		Statement insert;
		try {
			insert = connection.createStatement();
			String cols;
			String values;
			if (star.getId() != -1) {
				cols = "(id,";
				values = "(" + star.getId() + ",";
			} else {
				cols = "(";
				values = "(";
			}

			cols += "first_name,last_name,dob,photo_url)";

			values += "'" + star.getFirst_name() + "','" + star.getLast_name() + "',";
			if (star.getDob() == null)
				values += "null,'" + star.getPhoto_url() + "')";
			else
				values += "'" + star.getDob() + "','" + star.getPhoto_url() + "')";
			String sql_string = "insert into stars " + cols + " values " + values;
			int row = insert.executeUpdate(sql_string, Statement.RETURN_GENERATED_KEYS);
			ResultSet result = insert.getGeneratedKeys();

			if (result.next())
				System.out.println("\nInsert Star Success with ID:\t" + result.getInt(row) + "\n");
			result.close();
			insert.close();
		} catch (SQLException e) {
			if (e.getErrorCode() == 1062)
				System.out.println("ID " + star.getId() + " already exsited! Please try another ID.\n");
			else
				System.out.println(e.getMessage());
		}
	}

	public String valid_customer_by_creditcard(String fname, String lname) {
		String cc_id = "";
		Statement select;
		if (fname.equals(""))
			fname = "%%";
		try {
			select = connection.createStatement();
			String sql_string = "select id from creditcards where first_name like '" + fname + "' and last_name like '"
					+ lname + "'";
			ResultSet result = select.executeQuery(sql_string);
			result.last();
			if (result.getRow() == 0) {
				System.out.println("This customer did not validate in credit card list!");
				return "";
			}
			if (result.getRow() > 1) {
				System.out.println("Duplicate records found! Please enter more accurate name info!");
				return "";
			}
			result.beforeFirst();
			if (result.next()) {
				cc_id = result.getString("id");
			}
			result.close();
			select.close();
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}

		return cc_id;
	}

	public void insert_customer(Customer customer) {
		Statement insert;
		try {
			insert = connection.createStatement();
			String sql_string = "insert into customers " + "(first_name,last_name,cc_id,address,email,password)"
					+ " values " + "('" + customer.getFirst_name() + "','" + customer.getLast_name() + "','"
					+ customer.getCc_id() + "','" + customer.getAddress() + "','" + customer.getEmail() + "','"
					+ customer.getPassword() + "')";

			int row = insert.executeUpdate(sql_string, Statement.RETURN_GENERATED_KEYS);
			ResultSet result = insert.getGeneratedKeys();

			if (result.next())
				System.out.println("\nInsert Custormer Success with ID:\t" + result.getInt(row) + "\n");
			result.close();
			insert.close();
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}
	}

	public Map<Integer, String> customer_per_delete(String cc_id) {
		Map<Integer, String> pre_delete = new HashMap<Integer, String>();
		Statement select;
		try {
			select = connection.createStatement();
			String sql_string = "select * from customers where cc_id = '" + cc_id + "'";
			ResultSet result = select.executeQuery(sql_string);
			ResultSetMetaData metadata = result.getMetaData();
			int columns = metadata.getColumnCount();
			String column = "";
			for (int i = 1; i <= columns; i++)
				column += String.format("%-40s", metadata.getColumnLabel(i));
			pre_delete.put(-1, column);

			while (result.next()) {
				int id = result.getInt("id");
				String info = "";
				for (int i = 1; i <= columns; i++)
					info += String.format("%-40s", result.getString(i));
				pre_delete.put(id, info);
			}
			result.close();
			select.close();
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}
		return pre_delete;
	}

	public void delete_customer_by_id(int id) {
		Statement delete;
		try {
			delete = connection.createStatement();
			String sql_string = "delete from customers where id=" + id;
			int row = delete.executeUpdate(sql_string);

			if (row == 1)
				System.out.println("\nDelete Custormer Success with ID:\t" + id + "\n");
			else {
				System.out.println("\nError Code 1\n");
			}

			delete.close();
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}
	}

	public void print_database_tables() {
		List<String> table_names = new ArrayList<String>();
		DatabaseMetaData dbmd;
		try {
			dbmd = connection.getMetaData();
			ResultSet tables = dbmd.getTables(null, null, null, new String[] { "TABLE" });
			while (tables.next()) {
				table_names.add(tables.getString("TABLE_NAME"));
			}
			tables.close();

			System.out.println("Total " + table_names.size() + " tables.\n");
			System.out.println("---------------------------------------------------------------------------");

			for (String table_name : table_names) {
				System.out.println("Table_Name=" + table_name);
				ResultSet columns = dbmd.getColumns(null, null, table_name, null);
				while (columns.next())
					System.out.println("Column" + columns.getRow()
							+ String.format(":\t%-40s", "Column_Name=" + columns.getString("COLUMN_NAME"))
							+ String.format("%-40s", "Column_Type=" + columns.getString("TYPE_NAME")) + "Column_Size="
							+ columns.getInt("COLUMN_SIZE"));
				System.out.println("---------------------------------------------------------------------------");
				columns.close();
			}
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}

	}

	public void execute_sql(String sql) {
		if (sql.length() < 6) {
			System.out.println("Not a valid sql statement!");
			return;
		}
		String head = sql.substring(0, 6).toUpperCase();
		if (head.equals("SELECT")) {
			this.execute_query(sql);
		} else {
			this.execute_update(sql);
		}
	}

	private void execute_query(String sql) {
		Statement query;
		try {
			query = connection.createStatement();
			ResultSet result = query.executeQuery(sql);
			System.out.println("\nThe results of the query:");
			System.out.println("---------------------------------------------------------------------------");

			ResultSetMetaData metadata = result.getMetaData();
			int columns = metadata.getColumnCount();
			for (int i = 1; i <= columns; i++)
				System.out.print(String.format("%-40s", metadata.getColumnLabel(i)));
			System.out.println();
			while (result.next()) {
				for (int i = 1; i <= columns; i++)
					System.out.print(String.format("%-40s", result.getString(i)));
				System.out.println();
			}
			result.close();
			query.close();
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}
	}

	private void execute_update(String sql) {
		Statement update;
		String execute_type = sql.substring(0, 6).toLowerCase();
		try {
			update = connection.createStatement();
			int row = update.executeUpdate(sql);
			if (row > 1)
				System.out.println(execute_type + " " + row + " rows successfully.");
			else
				System.out.println(execute_type + " " + row + " rows successfully.");
			update.close();
		} catch (SQLException e) {
			System.out.println(e.getMessage());
		}
	}

	public void connectionClose() {
		if (isConnected())
			try {
				connection.close();
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	}
}


text:
class StateAccessToken
{
  /// Controls access to this token.
  mutable std::mutex AccessMutex;

  /// Indicates whether or not it is legal to access the state using this token.
  bool Valid;

  /// Number of clients accessing via this token.
  mutable unsigned Count;

  /// Used to notify that the count has reached zero.
  mutable std::condition_variable CountCV;

public:
  /// \brief Create a new, valid, access token.
  ///
  StateAccessToken()
  : AccessMutex(),
    Valid(true),
    Count(0),
    CountCV()
  {}

  /// \brief Invalidates this token before it is destroyed.
  ///
  ~StateAccessToken()
  {
    invalidate();
  }

  /// \brief
  ///
  bool acquireAccess() const
  {
    std::lock_guard<std::mutex> Lock{AccessMutex};

    if (!Valid)
      return false;

    ++Count;

    return true;
  }

  /// \brief
  ///
  void releaseAccess() const
  {
    std::unique_lock<std::mutex> Lock{AccessMutex};

    --Count;

    if (Count == 0) {
      Lock.unlock();
      CountCV.notify_all();
    }
  }

  /// \brief
  ///
  class StateAccess {
    StateAccessToken const &Token; ///<
    bool Valid; ///<

  public:
    /// \brief
    ///
    StateAccess(StateAccessToken const &WithToken)
    : Token(WithToken),
      Valid(Token.acquireAccess())
    {}

    // Copying is not allowed.
    StateAccess(StateAccess const &) = delete;
    StateAccess &operator=(StateAccess const &) = delete;

    // Moving is OK.
    StateAccess(StateAccess &&) = default;
    StateAccess &operator=(StateAccess &&) = default;

    /// \brief
    ///
    void release()
    {
      if (Valid) {
        Token.releaseAccess();
        Valid = false;
      }
    }

    /// \brief
    ///
    ~StateAccess()
    {
      release();
    }

    /// \brief
    ///
    operator bool() const { return Valid; }
  };

  /// \brief Acquire access to read from the associated state.
  ///
  StateAccess getAccess() const { return StateAccess(*this); }

  /// \brief Invalidate this token.
  ///
  void invalidate() {
    std::unique_lock<std::mutex> Lock{AccessMutex};

    if (!Valid)
      return;

    // Wait until there are no accessors.
    if (Count != 0)
      CountCV.wait(Lock);

    Valid = false;
  }
};

#endif // SEEC_TRACE_VIEW_STATEACCESSTOKEN_HPP


text:
package org.klose.payment.integration.wechat.dto;

import java.io.Serializable;

/**
 * 获取预订单返回
 *
 * @author Administrator
 */

public class WechatPrepayResponseDto implements Serializable{

    private String return_code;

    private String prepay_id;

    private String sign;

    private String appId;

    private String securityKey;

    private Integer amount;

    public String getReturn_code() {
        return return_code;
    }

    public void setReturn_code(String return_code) {
        this.return_code = return_code;
    }

    public String getPrepay_id() {
        return prepay_id;
    }

    public void setPrepay_id(String prepay_id) {
        this.prepay_id = prepay_id;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getSecurityKey() {
        return securityKey;
    }

    public void setSecurityKey(String securityKey) {
        this.securityKey = securityKey;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    @Override
    public String toString() {
        return "WechatPrepayResponseDto{" +
                "return_code='" + return_code + '\'' +
                ", prepay_id='" + prepay_id + '\'' +
                ", sign='" + sign + '\'' +
                ", appId='" + appId + '\'' +
                ", securityKey='" + securityKey + '\'' +
                ", amount=" + amount +
                '}';
    }
}


text:
DB_PASS='DB_PASS'
KEYSTONEDB_PASS='KEYSTONEDB_PASS'
DB_IP=''

#######################################################################################
# pkg - keystone
#######################################################################################
yum install -y openstack-keystone python-keystoneclient

ADMIN_TOKEN=$(openssl rand -hex 10)

# Configuration keystone.conf
crudini --set /etc/keystone/keystone.conf DEFAULT admin_token $ADMIN_TOKEN
crudini --set /etc/keystone/keystone.conf database connection mysql://keystone:$KEYSTONEDB_PASS@$DB_IP/keystone
crudini --set /etc/keystone/keystone.conf token provider keystone.token.providers.uuid.Provider
crudini --set /etc/keystone/keystone.conf token driver keystone.token.persistence.backends.sql.Token
#crudini --set /etc/keystone/keystone.conf DEFAULT verbose True

keystone-manage pki_setup --keystone-user keystone --keystone-group keystone
chown -R keystone:keystone /var/log/keystone
chown -R keystone:keystone /etc/keystone/ssl
chmod -R o-rwx /etc/keystone/ssl

su -s /bin/sh -c "keystone-manage db_sync" keystone

systemctl enable openstack-keystone.service
systemctl start openstack-keystone.service