text:
package com.jy.controller.workflow;

import com.jy.common.ajax.AjaxRes;
import com.jy.common.utils.base.Const;
import com.jy.common.utils.security.AccountShiroUtil;
import com.jy.controller.base.BaseController;
import com.jy.entity.oa.bpm.BpmConf;
import com.jy.entity.system.account.Account;
import com.jy.entity.system.org.Role;
import com.jy.service.oa.bpm.BpmConfService;
import com.jy.service.system.account.AccountService;
import com.jy.service.system.org.RoleService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.Lifecycle;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

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

/**
 * @author gsw on 16-8-16
 * @version 1.0
 */
@Controller
@RequestMapping("/backstage/workflow/approver/")
public class GetDefaultApprover extends BaseController<Object> {
    @Autowired
    public RoleService roleService;
    @Autowired
    public AccountService accountService;
    @Autowired
    public BpmConfService bpmConfService;

    @RequestMapping(value = "findAllApprover", method = RequestMethod.GET)
    @ResponseBody
    public AjaxRes find(String key) {
        AjaxRes ar = getAjaxRes();
        try {
            List<Account> accounts = new ArrayList<Account>();
            BpmConf bpmConf = new BpmConf();
            bpmConf.setKey(key);
            List<BpmConf> blist = bpmConfService.find(bpmConf);
            if (CollectionUtils.isNotEmpty(blist)) {
                for (int i = 0; i < blist.size(); i++) {
                    BpmConf b = blist.get(i);
                    if (i == 0 && StringUtils.isBlank(b.getUsers())) {
                        Account rAc = getDirectlyLeader();
                        if (rAc == null) {
                            ar.setFailMsg("查找直属领导失败,请先设置角色层级关系!");
                            return ar;
                        } else {
                            accounts.add(rAc);
                        }
                    } else {
                        if (b.getUsertype() == null) {
                            ar.setFailMsg("查找用户失败,请先为流程"+b.getPname()+"分配用户!");
                            return ar;
                        }
                        if (b.getUsertype() == 0) {
                            Account account = new Account();
                            account.setRoleId(b.getUsers());
                            List<Account> acs = accountService.find(account);
                            if (CollectionUtils.isNotEmpty(acs)) {
                                accounts.add(acs.get(0));
                            } else {
                                ar.setFailMsg("查找用户失败,请先为流程"+b.getPname()+"分配用户!");
                                return ar;
                            }
                        } else {
                            Account ac = new Account();
                            ac.setAccountId(b.getUsers());
                            ac.setName(b.getUsername());
                            accounts.add(ac);
                        }

                    }
                }
            }

            ar.setSucceed(accounts);
        } catch (Exception e) {
            logger.error(e.toString(), e);
            ar.setFailMsg(Const.DATA_FAIL);
        }
        return ar;
    }

    @RequestMapping(value = "find", method = RequestMethod.GET)
    @ResponseBody
    public AjaxRes findDirectlyLeader() {
        AjaxRes ar = getAjaxRes();
        try {
            Account rAc = getDirectlyLeader();
            if (rAc == null) {
                ar.setFailMsg("查找直属领导失败,请先设置角色层级关系!");
                return ar;
            } else {
                ar.setSucceed(rAc);
            }

        } catch (Exception e) {
            logger.error(e.toString(), e);
            ar.setFailMsg(Const.DATA_FAIL);
        }
        return ar;
    }

    private Account getDirectlyLeader() {
        Account ac = AccountShiroUtil.getCurrentUser();
        String role = ac.getRoleId();
        Role r = new Role();
        r.setId(role);
        List<Role> roles = roleService.find(r);
        if (CollectionUtils.isNotEmpty(roles)) {
            String pid = roles.get(0).getPid();
            Account account = new Account();
            account.setRoleId(pid);
            if (StringUtils.isBlank(pid)){
                return null;
            }
            List<Account> acs = accountService.find(account);
            if (CollectionUtils.isNotEmpty(acs)) {
                return acs.get(0);
            }
        }
        return null;
    }
}

redpajama_set_name: RedPajamaGithub


text:
import Ember from 'ember';
import EmberValidations from 'ember-validations';
import FormObjectMixin from 'ember-form-object/mixins/form-object';

export default Ember.Object.extend(EmberValidations, FormObjectMixin);


text:
'use strict'

module.exports = function rent (renderFn, state) {
  if (typeof renderFn !== 'function') {
    throw new TypeError('render must be a function, got ' + renderFn)
  }

  return function render () {
    var currentState = typeof state === 'function' ? state() : state
    return renderFn(currentState)
  }
}


text:
layout: tutorials
id: tutorials/basics/entry-points
title: Create Plugin Entrypoints
---

# Create Plugin Entrypoints

## Define Plugin Actions
...

## Manifest
...


text:
package de.uulm.mi.mind;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.View;

/**
 * Created by Cassio on 22.03.2014.
 */
public class MapViewPager extends ViewPager {
    public MapViewPager(Context context) {
        super(context);
    }

    public MapViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) {
        if(v instanceof ScaleImageView){
            return true;
        }
        return super.canScroll(v, checkV, dx, x, y);
    }
}


text:
#include "PolyScreen.h"

using namespace Polycode;

Screen::Screen() : EventDispatcher() {
	offset.x = 0;
	offset.y = 0;
	enabled = true;
	focusChild = NULL;
	originalSceneTexture = NULL;
	CoreServices::getInstance()->getScreenManager()->addScreen(this);
	filterShaderMaterial = NULL;
	_hasFilterShader = false;
	useNormalizedCoordinates = false;
	rootEntity = new ScreenEntity();
	addChild(rootEntity);
}

Screen::~Screen() {
	for(int i=0; i<children.size();i++) {
		//	delete children[i];
	}
	CoreServices::getInstance()->getScreenManager()->removeScreen(this);
}

void Screen::setNormalizedCoordinates(bool newVal, Number yCoordinateSize) {
	useNormalizedCoordinates = newVal;
	this->yCoordinateSize = yCoordinateSize;
}

void Screen::handleInputEvent(InputEvent *inputEvent) {

	for(int i=children.size()-1; i >= 0; i--) {
		switch(inputEvent->getEventCode()) {
			case InputEvent::EVENT_MOUSEDOWN:
				if(children[i]->_onMouseDown(inputEvent->mousePosition.x-offset.x, inputEvent->mousePosition.y-offset.y, inputEvent->mouseButton, inputEvent->timestamp) &&
				children[i]->blockMouseInput)
					return;
			break;
			case InputEvent::EVENT_MOUSEMOVE:
				children[i]->_onMouseMove(inputEvent->mousePosition.x-offset.x, inputEvent->mousePosition.y-offset.y, inputEvent->timestamp);
			break;
			case InputEvent::EVENT_MOUSEUP:
				if(children[i]->_onMouseUp(inputEvent->mousePosition.x-offset.x, inputEvent->mousePosition.y-offset.y, inputEvent->mouseButton, inputEvent->timestamp) &&
				children[i]->blockMouseInput)
					return;
			break;
			case InputEvent::EVENT_MOUSEWHEEL_UP:
				children[i]->_onMouseWheelUp(inputEvent->mousePosition.x-offset.x, inputEvent->mousePosition.y-offset.y, inputEvent->timestamp);
			break;
			case InputEvent::EVENT_MOUSEWHEEL_DOWN:
				children[i]->_onMouseWheelDown(inputEvent->mousePosition.x-offset.x, inputEvent->mousePosition.y-offset.y,inputEvent->timestamp);
			break;
			case InputEvent::EVENT_KEYDOWN:
				children[i]->_onKeyDown(inputEvent->key, inputEvent->charCode);
			break;
			case InputEvent::EVENT_KEYUP:
				children[i]->_onKeyUp(inputEvent->key, inputEvent->charCode);
			break;
		}
	}
}

void Screen::setRenderer(Renderer *renderer) {
	this->renderer = renderer;
}

void Screen::setScreenOffset(Number x, Number y) {
	offset.x = x;
	offset.y = y;
}

Vector2 Screen::getScreenOffset() {
	return offset;
}

int Screen::getHighestZIndex() {
	int highestZ = 1;
	for(int i=0; i<children.size();i++) {
		if(children[i]->zindex > highestZ)
			highestZ = children[i]->zindex;
	}
	return highestZ;
}

bool Screen::cmpZindex(const ScreenEntity *left, const ScreenEntity *right) {
	return (left->zindex < right->zindex);
}

void Screen::sortChildren() {
	std::sort(children.begin(), children.end(), Screen::cmpZindex);
	int newz = 1;
	for(int i=0; i<children.size();i++) {
		children[i]->zindex = newz;
		newz++;
	}
}

void Screen::handleEvent(Event *event) {
	if(event->getEventType() == "ScreenEvent") {
	for(int i=0; i<children.size();i++) {
		if(children[i] == event->getDispatcher()) {
			ScreenEvent *screenEvent = (ScreenEvent*)event;
			int highestZ;
			switch(screenEvent->getEventCode()) {
				case ScreenEvent::ENTITY_MOVE_TOP:
					highestZ = getHighestZIndex();
					children[i]->zindex = highestZ+1;
					sortChildren();
				break;
				case ScreenEvent::ENTITY_MOVE_BOTTOM:
					children[i]->zindex = 0;
					sortChildren();
				break;
				case ScreenEvent::ENTITY_MOVE_UP:
					children[i]->zindex++;
					sortChildren();
				break;
				case ScreenEvent::ENTITY_MOVE_DOWN:
					children[i]->zindex--;
					sortChildren();
				break;
			}
		}
	}
	}
}

void Screen::setScreenShader(String shaderName) {
	filterShaderMaterial = (Material*)CoreServices::getInstance()->getResourceManager()->getResource(Resource::RESOURCE_MATERIAL, shaderName);
	if(!filterShaderMaterial)
		return;

	if(!originalSceneTexture) {
	CoreServices::getInstance()->getRenderer()->createRenderTextures(&originalSceneTexture, NULL, CoreServices::getInstance()->getCore()->getXRes(), CoreServices::getInstance()->getCore()->getYRes());
	}

	for(int i=0; i < filterShaderMaterial->getNumShaders(); i++) {
		ShaderBinding* binding = filterShaderMaterial->getShader(i)->createBinding();
		if( i == 0)
			binding->addTexture("screenColorBuffer", originalSceneTexture);

		localShaderOptions.push_back(binding);
	}

	_hasFilterShader = true;

}

void Screen::clearScreenShader() {
	if(_hasFilterShader) {
		_hasFilterShader = false;
		filterShaderMaterial = NULL;
	}
}

void Screen::drawFilter() {

	if(!filterShaderMaterial)
		return;

	CoreServices::getInstance()->getRenderer()->bindFrameBufferTexture(originalSceneTexture);

	Render();
	//CoreServices::getInstance()->getRenderer()->renderToTexture(originalSceneTexture);

	CoreServices::getInstance()->getRenderer()->unbindFramebuffers();

	ShaderBinding* materialBinding;
	for(int i=0; i < filterShaderMaterial->getNumShaders(); i++) {
		materialBinding = filterShaderMaterial->getShaderBinding(i);
		CoreServices::getInstance()->getRenderer()->applyMaterial(filterShaderMaterial, localShaderOptions[i], i);

		if(i==filterShaderMaterial->getNumShaders()-1) {
	//		CoreServices::getInstance()->getRenderer()->clearScreen();
			CoreServices::getInstance()->getRenderer()->loadIdentity();
			CoreServices::getInstance()->getRenderer()->drawScreenQuad(CoreServices::getInstance()->getRenderer()->getXRes(), CoreServices::getInstance()->getRenderer()->getYRes());
		} else {
			for(int j=0; j < materialBinding->getNumOutTargetBindings(); j++) {
				//				CoreServices::getInstance()->getRenderer()->clearScreen();
				//				CoreServices::getInstance()->getRenderer()->loadIdentity();
				CoreServices::getInstance()->getRenderer()->bindFrameBufferTexture(materialBinding->getOutTargetBinding(j)->texture);
				//				Logger::log("drawing quad (%s) %f,%f\n", materialBinding->getOutTargetBinding(j)->texture->getResourceName().c_str(), materialBinding->getOutTargetBinding(j)->width, materialBinding->getOutTargetBinding(j)->height);

				CoreServices::getInstance()->getRenderer()->drawScreenQuad(materialBinding->getOutTargetBinding(j)->width, materialBinding->getOutTargetBinding(j)->height);
				CoreServices::getInstance()->getRenderer()->unbindFramebuffers();

				//				CoreServices::getInstance()->getRenderer()->renderToTexture(materialBinding->getOutTargetBinding(j)->texture);
			}
		}
		CoreServices::getInstance()->getRenderer()->clearShader();
		CoreServices::getInstance()->getRenderer()->loadIdentity();

		CoreServices::getInstance()->getRenderer()->setOrthoMode();
		/*
		 CoreServices::getInstance()->getRenderer()->renderToTexture(filterTexture);
		 CoreServices::getInstance()->getRenderer()->clearScreen();
		 CoreServices::getInstance()->getRenderer()->loadIdentity();
		 CoreServices::getInstance()->getRenderer()->drawScreenQuad();
		 CoreServices::getInstance()->getRenderer()->clearShader();
		 CoreServices::getInstance()->getRenderer()->loadIdentity();
		 */
	}

}

bool Screen::hasFilterShader() {
	return _hasFilterShader;
}

ScreenEntity* Screen::addChild(ScreenEntity *newEntity) {
	if(!newEntity)
		return NULL;
	children.push_back(newEntity);
	newEntity->setRenderer(renderer);
	newEntity->addEventListener(this, ScreenEvent::ENTITY_MOVE_TOP);
	newEntity->addEventListener(this, ScreenEvent::ENTITY_MOVE_BOTTOM);
	newEntity->addEventListener(this, ScreenEvent::ENTITY_MOVE_DOWN);
	newEntity->addEventListener(this, ScreenEvent::ENTITY_MOVE_UP);
	newEntity->zindex = getHighestZIndex()+1;
	sortChildren();
	return newEntity;
}

ScreenEntity* Screen::removeChild(ScreenEntity *entityToRemove) {
	if(!entityToRemove)
		return NULL;

	entityToRemove->removeEventListener(this, ScreenEvent::ENTITY_MOVE_TOP);
	entityToRemove->removeEventListener(this, ScreenEvent::ENTITY_MOVE_BOTTOM);
	entityToRemove->removeEventListener(this, ScreenEvent::ENTITY_MOVE_DOWN);
	entityToRemove->removeEventListener(this, ScreenEvent::ENTITY_MOVE_UP);
	for(int i=0;i<children.size();i++) {
		if(children[i] == entityToRemove) {
			children.erase(children.begin()+i);
		}
	}
	return entityToRemove;
}

void Screen::Shutdown() {

}

void Screen::Update() {

}

ScreenEntity *Screen::getEntityAt(Number x, Number y) {
	for(int i=children.size()-1; i >= 0;i--) {
		if(children[i]->hitTest(x,y))
			return children[i];
	}
	return NULL;
}

void Screen::Render() {
	Update();
	renderer->loadIdentity();
	renderer->translate2D(offset.x, offset.y);

	renderer->multModelviewMatrix(rootEntity->getConcatenatedMatrix());

	for(int i=0; i<children.size();i++) {
		if(children[i]->hasFocus && focusChild != children[i] && children[i]->isFocusable()) {
			if(focusChild != NULL) {
				focusChild->hasFocus = false;
				focusChild->onLoseFocus();
			}
			focusChild = children[i];
			focusChild->onGainFocus();
		}
		children[i]->doUpdates();
		children[i]->updateEntityMatrix();
		children[i]->transformAndRender();
	}
}


text:
package aip0162

import (
	"testing"

	"github.com/googleapis/api-linter/rules/internal/testutils"
)

func TestListRevisionsHTTPBody(t *testing.T) {
	tests := []struct {
		testName   string
		Body       string
		MethodName string
		problems   testutils.Problems
	}{
		{"Valid", "", "ListBookRevisions", nil},
		{"Invalid", "*", "ListBookRevisions", testutils.Problems{{Message: "HTTP body"}}},
		{"Irrelevant", "*", "ListBooks", nil},
	}

	for _, test := range tests {
		t.Run(test.testName, func(t *testing.T) {
			file := testutils.ParseProto3Tmpl(t, `
				import "google/api/annotations.proto";
				service Library {
					rpc {{.MethodName}}({{.MethodName}}Request) returns ({{.MethodName}}Response) {
						option (google.api.http) = {
							get: "/v1/{name=publishers/*/books/*}:listRevisions"
							body: "{{.Body}}"
						};
					}
				}
				message {{.MethodName}}Request {}
				message {{.MethodName}}Response {}
			`, test)
			method := file.GetServices()[0].GetMethods()[0]
			problems := listRevisionsHTTPBody.Lint(file)
			if diff := test.problems.SetDescriptor(method).Diff(problems); diff != "" {
				t.Error(diff)
			}
		})
	}
}


text:
<?php
namespace LancerHe\Http\Request\Decorator;

use LancerHe\Http\Request\Decorator;

/**
 * Class LoggerFile 日志装饰类
 *
 * @package LancerHe\Http\Request\Decorator
 * @author  Lancer He <lancer.he@gmail.com>
 */
class LoggerFile extends Decorator {
    /**
     * @var string
     */
    protected $_outputFile = '/tmp/httprequest.log';

    /**
     * @param $file
     */
    public function setOutputFile($file) {
        $this->_outputFile = $file;
    }

    /**
     * @param null $url
     * @param null $post
     */
    public function sendRequest($url = null, $post = null) {
        curl_setopt($this->getHandler(), CURLINFO_HEADER_OUT, true);
        parent::sendRequest($url, $post);
        $this->outputFile();
    }

    /**
     *
     */
    public function outputFile() {
        $request  = curl_getinfo($this->getHandler());
        $response = $this->getResponse();
        $datetime = date('Y-m-d H:i:s');
        $output   =
            "============= [$datetime] >>>>>>>>>>>>" . PHP_EOL
            . '[request_header]     => ' . (isset($request['request_header']) ? rtrim($request['request_header'], "\r\n") : '') . PHP_EOL
            . '[request_url]        => ' . $this->getRequest()->url . PHP_EOL
            . '[request_body]       => ' . $this->getRequest()->post . PHP_EOL
            . '[response_http_code] => ' . $request['http_code'] . PHP_EOL
            . '[response_body]      => ' . $response . PHP_EOL
            . PHP_EOL;
        file_put_contents($this->_outputFile, $output, FILE_APPEND);
    }
}


text:
package fr.sii.ogham.test.classpath.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import fr.sii.ogham.test.classpath.core.ProjectInitializer;
import fr.sii.ogham.test.classpath.core.dependency.DependencyAdder;
import fr.sii.ogham.test.classpath.ogham.OghamDependency;
import fr.sii.ogham.test.classpath.ogham.OghamProperties;
import fr.sii.ogham.test.classpath.runner.common.ParallelProjectsCreator;
import fr.sii.ogham.test.classpath.runner.common.ProjectsCreator;
import fr.sii.ogham.test.classpath.runner.common.RunnerProperties;
import fr.sii.ogham.test.classpath.runner.common.SequentialProjectsCreator;
import fr.sii.ogham.test.classpath.runner.standalone.StandaloneProjectParams;
import fr.sii.ogham.test.classpath.runner.standalone.StandaloneSingleProjectCreator;
import fr.sii.ogham.test.classpath.runner.standalone.TemplatedProjectInitializer;

@Configuration
public class StandaloneRunnerConfig {
	@Bean
	public ProjectInitializer<StandaloneProjectParams> standaloneProjectInitializer(OghamProperties oghamProperties, DependencyAdder dependencyAdder) {
		freemarker.template.Configuration cfg = new freemarker.template.Configuration(freemarker.template.Configuration.VERSION_2_3_28);
		cfg.setClassForTemplateLoading(TemplatedProjectInitializer.class, "/");
		cfg.setDefaultEncoding("UTF-8");
		return new TemplatedProjectInitializer(cfg, oghamProperties, dependencyAdder);
	}

	@Bean
	public ProjectsCreator<StandaloneProjectParams, OghamDependency> standaloneProjectsCreator(RunnerProperties props, StandaloneSingleProjectCreator projectCreator) {
		if(props.isParallel()) {
			return new ParallelProjectsCreator<>(projectCreator, props.getNumThreads());
		} else {
			return new SequentialProjectsCreator<>(projectCreator);
		}
	}

}


text:
package com.amazonaws.services.simplesystemsmanagement.model.transform;

import java.math.*;

import javax.annotation.Generated;

import com.amazonaws.services.simplesystemsmanagement.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;

import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;

/**
 * InstancePatchState JSON Unmarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class InstancePatchStateJsonUnmarshaller implements Unmarshaller<InstancePatchState, JsonUnmarshallerContext> {

    public InstancePatchState unmarshall(JsonUnmarshallerContext context) throws Exception {
        InstancePatchState instancePatchState = new InstancePatchState();

        int originalDepth = context.getCurrentDepth();
        String currentParentElement = context.getCurrentParentElement();
        int targetDepth = originalDepth + 1;

        JsonToken token = context.getCurrentToken();
        if (token == null)
            token = context.nextToken();
        if (token == VALUE_NULL) {
            return null;
        }

        while (true) {
            if (token == null)
                break;

            if (token == FIELD_NAME || token == START_OBJECT) {
                if (context.testExpression("InstanceId", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setInstanceId(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("PatchGroup", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setPatchGroup(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("BaselineId", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setBaselineId(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("SnapshotId", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setSnapshotId(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("InstallOverrideList", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setInstallOverrideList(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("OwnerInformation", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setOwnerInformation(context.getUnmarshaller(String.class).unmarshall(context));
                }
                if (context.testExpression("InstalledCount", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setInstalledCount(context.getUnmarshaller(Integer.class).unmarshall(context));
                }
                if (context.testExpression("InstalledOtherCount", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setInstalledOtherCount(context.getUnmarshaller(Integer.class).unmarshall(context));
                }
                if (context.testExpression("InstalledRejectedCount", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setInstalledRejectedCount(context.getUnmarshaller(Integer.class).unmarshall(context));
                }
                if (context.testExpression("MissingCount", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setMissingCount(context.getUnmarshaller(Integer.class).unmarshall(context));
                }
                if (context.testExpression("FailedCount", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setFailedCount(context.getUnmarshaller(Integer.class).unmarshall(context));
                }
                if (context.testExpression("UnreportedNotApplicableCount", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setUnreportedNotApplicableCount(context.getUnmarshaller(Integer.class).unmarshall(context));
                }
                if (context.testExpression("NotApplicableCount", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setNotApplicableCount(context.getUnmarshaller(Integer.class).unmarshall(context));
                }
                if (context.testExpression("OperationStartTime", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setOperationStartTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
                }
                if (context.testExpression("OperationEndTime", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setOperationEndTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
                }
                if (context.testExpression("Operation", targetDepth)) {
                    context.nextToken();
                    instancePatchState.setOperation(context.getUnmarshaller(String.class).unmarshall(context));
                }
            } else if (token == END_ARRAY || token == END_OBJECT) {
                if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
                    if (context.getCurrentDepth() <= originalDepth)
                        break;
                }
            }
            token = context.nextToken();
        }

        return instancePatchState;
    }

    private static InstancePatchStateJsonUnmarshaller instance;

    public static InstancePatchStateJsonUnmarshaller getInstance() {
        if (instance == null)
            instance = new InstancePatchStateJsonUnmarshaller();
        return instance;
    }
}


text:
/**
 * The container component for the Summary component (totals, taxes).
 */
import { connect } from 'react-redux';
import InvoiceSummary from '../components/InvoiceSummary';
import { subtotalSelector, taxPercentSelector, taxSelector, totalSelector } from '../modules/summary';

const mapStateToProps = (state) => ({
  subtotal: subtotalSelector(state),
  taxPercent: taxPercentSelector(state),
  taxes: taxSelector(state),
  total: totalSelector(state)
});

export default connect(mapStateToProps, {})(InvoiceSummary);


text:
const app			= require('../../app')
const express 		= require('express')

const ClassRegister = new (require('../../lib/register/classRegister.js'))()
const ControllerRegister = new (require('../../lib/register/controllerRegister.js'))()
const MiddlewareRegister = new (require('../../lib/register/middlewareRegister.js'))()

const RouteGroup = ClassRegister.use('routeGroup')
const AuthMiddleware = MiddlewareRegister.use('_auth/auth')
const BaseController = ControllerRegister.use('baseController')

module.exports = [
  new RouteGroup({
    prefix: '/api/'
  })
    .get('/', BaseController.index),

  new RouteGroup({
    prefix: '/api/protected',
    middleware: [
      AuthMiddleware.verifyToken
    ]
  })
    .get('/', BaseController.protected)
]


text:
class DcPollResult
  include Mongoid::Document
  include Mongoid::Timestamps

  belongs_to :dc_poll
  field :data,        type: String
  field :confirmed,   type: Boolean, default: false

  index( { dc_poll_id: 1 } )

end


text:
<?php

namespace Site\MainBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class VideoMainType extends AbstractType
{
    /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title', 'text', array(
                'required' => true,
                'label' => 'backend.videomain.title'
            ))
            ->add('link', 'url', array(
                'required' => true,
                'label' => 'backend.videomain.link'
            ))
            ->add('file', 'file', array(
                'required' => false,
                'label' => 'backend.videomain.preview_img'
            ))
            ->add('main', 'choice', array(
                'required' => true,
                'label' => 'backend.videomain.main.label',
                'choices' => array(
                    0 => 'backend.videomain.main.yes',
                    1 => 'backend.videomain.main.no'
                ),
                'translation_domain' => 'menu'
            ))
        ;
    }

    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Site\MainBundle\Entity\VideoMain',
            'translation_domain' => 'menu'
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'site_mainbundle_videomain';
    }
}


text:
package com.sishuok.es.showcase.move.service;

import com.sishuok.es.common.inject.annotation.BaseComponent;
import com.sishuok.es.common.plugin.serivce.BaseMovableService;
import com.sishuok.es.showcase.move.entity.Move;
import com.sishuok.es.showcase.move.repository.MoveRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
User: Zhang Kaitao
 *
Date: 13-2-4 下午3:01
 *
Version: 1.0
 */
@Service
public class MoveService extends BaseMovableService<Move, Long> {

    @Autowired
    @BaseComponent
    private MoveRepository moveRepository;

}


text:
package org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph;

import org.gradle.api.artifacts.Dependency;
import org.gradle.api.internal.artifacts.ivyservice.resolveengine.excludes.specs.ExcludeSpec;
import org.gradle.api.internal.attributes.ImmutableAttributes;
import org.gradle.internal.component.model.ComponentArtifactMetadata;
import org.gradle.internal.component.model.VariantArtifactResolveState;

import javax.annotation.Nullable;
import java.util.List;

/**
 * A {@link ResolvedGraphDependency} that is used during the resolution of the dependency graph.
 * Additional fields in this interface are not required to reconstitute the serialized graph, but are using during construction of the graph.
 */
public interface DependencyGraphEdge extends ResolvedGraphDependency {
    DependencyGraphNode getFrom();

    DependencyGraphSelector getSelector();

    ExcludeSpec getExclusions();

    boolean contributesArtifacts();

    List<ComponentArtifactMetadata> getArtifacts(VariantArtifactResolveState targetVariant);

    ImmutableAttributes getAttributes();

    /**
     * The original dependency instance declared in the build script, if any.
     */
    @Nullable
    Dependency getOriginalDependency();

    boolean isTargetVirtualPlatform();

}


text:
#ifndef PONOS_BLAS_SPARSE_GAUSS_SEIDEL_SOLVER_H
#define PONOS_BLAS_SPARSE_GAUSS_SEIDEL_SOLVER_H

#include <ponos/blas/blas.h>
#include <ponos/blas/linear_system.h>
#include <ponos/blas/solver_interface.h>

namespace ponos {

class SparseGaussSeidelSolverd
    : public LinearSystemSolver<SparseLinearSystemd> {
public:
  SparseGaussSeidelSolverd(uint _maxNumberOfIterations, double _tolerance,
                           uint _residualCheckInterval)
      : maxNumberOfIterations(_maxNumberOfIterations), tolerance(_tolerance),
        residualCheckInterval(_residualCheckInterval) {}

  bool solve(SparseLinearSystemd *s) override {
    for (uint it = 0; it < maxNumberOfIterations; it++) {
      lastNumberOfIterations = it;
      relax(s, &xTmp);
      xTmp.swap(&s->x);
      if (it != 0 && it % residualCheckInterval == 0) {
        SparseBlas2d::residual(s->A, s->x, s->b, &residual);
        // if (SparseBlas2d::l2Norm(residual) < tolerance) {
        if (SparseBlas2d::infNorm(s->x, xTmp) < tolerance) {
          break;
        }
      }
    }
    SparseBlas2d::residual(s->A, s->x, s->b, &residual);
    residual.iterate([](const double &v, size_t i) {
      UNUSED_VARIABLE(i);
      std::cout << "---> " << v << std::endl;
    });
    // std::cout << residual.elementCount() << std::endl;
    // lastResidual = SparseBlas2d::l2Norm(residual);
    lastResidual = SparseBlas2d::infNorm(s->x, xTmp);
    return lastResidual < tolerance;
  }

  uint lastNumberOfIterations;
  double lastResidual;

private:
  void relax(SparseLinearSystemd *s, SparseVector<double> *xt) {
    SparseMatrix<double> &A = s->A;
    SparseVector<double> &x = s->x;
    SparseVector<double> &b = s->b;
    xt->resetCount();
    SparseVector<double>::const_iterator bit(b);
    for (size_t i = 0; i < A.rowCount(); i++) {
      bool nonzero = false;
      double aij = 1.0, sum = 0.0;
      SparseVector<double>::const_iterator xit(x);
      SparseVector<double>::const_iterator xtit(*xt);
      A.iterateRow(i, [&](const double &v, size_t j) {
        if (i == j) {
          aij = v;
          return;
        }
        if (i > j) {
          if (xtit.jumpTo(j)) {
            sum += v * xtit.value();
            nonzero = true;
          }
        } else {
          if (xit.jumpTo(j)) {
            sum += v * xit.value();
            nonzero = true;
          }
        }
      });
      if (bit.jumpTo(i)) {
        sum = bit.value() - sum;
        nonzero = true;
      } else
        sum = -sum;
      if (nonzero)
        xt->insert(i, sum / aij);
    }
  }

  uint maxNumberOfIterations;
  double tolerance;
  uint residualCheckInterval;

  SparseVector<double> xTmp;
  SparseVector<double> residual;
};

} // ponos namespace

#endif // PONOS_BLAS_SPARSE_GAUSS_SEIDEL_SOLVER_H


text:
package org.spincast.plugins.processutils;

import java.util.List;

/**
 * The result of the syncronous execution of an external program,
 * made using
 * {@link SpincastProcessUtils#executeSync(long, java.util.concurrent.TimeUnit, String...) executeSync}.
 */
public interface SyncExecutionResult {

    /**
     * The exit code of the program.
     */
    public int getExitCode();

    /**
     * The System standard output produced by the
     * executed program.
     *

     * Note that those lines will be available only
     * if the {@link ExecutionOutputStrategy#BUFFER} strategy
     * is used!
     */
    public List<String> getSystemOutLines();

    /**
     * The System standard errors produced by the
     * executed program.
     *

     * Note that those lines will be available only
     * if the {@link ExecutionOutputStrategy#BUFFER} strategy
     * is used!
     */
    public List<String> getSystemErrLines();

}


text:
<!--
Thanks for raising an issue! To help us help you, if you've found a bug please consider the following:

* If you can demonstrate the bug using the interactive http://rollupjs.org demo, please do.
* If that's not possible, perhaps because your bug involves plugins, we recommend creating a small repo that illustrates the problem.

Reproductions should be small, self-contained, correct examples – http://sscce.org. For example, if your bug isn't related to Gulp, **do not include Gulp in the repro**. (Side-note: if it *is* related to Gulp, this is the wrong issue tracker!) If possible, use a config file as it's the standard, favoured approach to using Rollup: https://github.com/rollup/rollup/wiki/Command-Line-Interface#using-a-config-file

Occasionally, this won't be possible, and that's fine – we still appreciate you raising the issue. But please understand that Rollup is run by unpaid volunteers in their free time, and we will prioritise bugs that follow these instructions.

If you have a stack trace to include, we recommend putting inside a `<details>` block for the sake of the thread's readability:

<details>
  <summary>Stack trace</summary>

  Stack trace goes here...
</details>
-->


text:
import singleChoiceAnswer from './api';
import {testSimilarity, testId, testScore} from './../testHelpers';

describe("scoring", () => {

  test("identical answers", testScore({
    correctAnswer: {
      type: 'singleChoiceAnswer',
      choices: [
        {"type": "wrongChoice", "value": "wrong choice value"},
        {"type": "correctChoice", "value": "correct choice value"},
      ]
    },
    givenAnswer: {
      type: 'singleChoiceAnswer',
      choices: [
        {"type": "wrongChoice", "value": "wrong choice value"},
        {"type": "correctChoice", "value": "correct choice value"},
      ]
    },
    result: {
      score: 1,
      correct: true,
      corrected: {
        type: 'singleChoiceAnswer',
        choices: [
          {"type": "wrongChoice", "value": "wrong choice value"},
          {"type": "correctChoice", "value": "correct choice value"},
        ]
      }
    }
  }));

  test("different order of provided choices", testScore({
    correctAnswer: {
      type: 'singleChoiceAnswer',
      choices: [
        {"type": "wrongChoice", "value": "wrong choice value"},
        {"type": "correctChoice", "value": "correct choice value"},
      ]
    },
    givenAnswer: {
      type: 'singleChoiceAnswer',
      choices: [
        {"type": "correctChoice", "value": "correct choice value"},
        {"type": "wrongChoice", "value": "wrong choice value"},
      ]
    },
    result: {
      score: 1,
      correct: true,
      corrected: {
        type: 'singleChoiceAnswer',
        choices: [
          {"type": "correctChoice", "value": "correct choice value"},
          {"type": "wrongChoice", "value": "wrong choice value"},
        ]
      }
    }
  }));

  test('wrong answer', testScore({
    correctAnswer: {
      type: 'singleChoiceAnswer',
      choices: [
        {"type": "wrongChoice", "value": "1st wrong choice"},
        {"type": "correctChoice", "value": "correct choice"},
        {"type": "wrongChoice", "value": "2nd wrong choice"},
      ]
    },
    givenAnswer: {
      type: 'singleChoiceAnswer',
      choices: [
        {"type": "correctChoice", "value": "2nd wrong choice"},
        {"type": "wrongChoice", "value": "1st wrong choice"},
        {"type": "wrongChoice", "value": "correct choice"},
      ]
    },
    result: {
      score: 0,
      correct: false,
      corrected: {
        type: 'singleChoiceAnswer',
        choices: [
          {"type": "wrongChoice", "value": "2nd wrong choice"},
          {"type": "wrongChoice", "value": "1st wrong choice"},
          {"type": "correctChoice", "value": "correct choice"},
        ]
      }
    }
  }));

});

test("id", () => {
  testId({
    first: {
      type: "singleChoiceAnswer",
      choices: [
        {"type": "wrongChoice", "value": "wrong choice value"},
        {"type": "correctChoice", "value": "correct choice value"},
      ]
    },
    different: {
      type: "singleChoiceAnswer",
      choices: [
        {"type": "wrongChoice", "value": "correct choice value"},
        {"type": "wrongChoice", "value": "wrong choice"},
      ]
    }
  });
});

test('asText', () => {
  const answer = {
    type: "singleChoiceAnswer",
    choices: [
      {type: "correctChoice", value: "correct choice"},
      {type: "wrongChoice", value: "wrong choice"},
    ]
  };
  const expectedString =
    "\n* correct choice\n"
    + "- wrong choice\n"
  ;
  const actualString = singleChoiceAnswer.asText(answer);
  expect(actualString).toEqual(expectedString);
});

describe('similarity', () => {

  test('totally equal', testSimilarity({
    a: {
      type: 'singleChoiceAnswer',
      choices: [
        {type: "wrongChoice", value: "the wrong choice"},
        {type: "correctChoice", value: "the correct choice"},
      ]
    },
    b: {
      type: 'singleChoiceAnswer',
      choices: [
        {type: "wrongChoice", value: "the wrong choice"},
        {type: "correctChoice", value: "the correct choice"},
      ]
    },
    similarity: 1
  }))

});


text:
import { inspect } from 'ember-utils';
import { assert, warn, Error as EmberError } from 'ember-debug';
import { set } from './property_set';
import { meta as metaFor, peekMeta } from './meta';
import { EMBER_METAL_TRACKED_PROPERTIES } from 'ember/features';
import expandProperties from './expand_properties';
import { Descriptor, defineProperty } from './properties';
import { notifyPropertyChange } from './property_events';
import { addDependentKeys, removeDependentKeys } from './dependent_keys';
import { getCurrentTracker, setCurrentTracker } from './tracked';
import { tagForProperty, update } from './tags';

/**
@module @ember/object
*/

const DEEP_EACH_REGEX = /\.@each\.[^.]+\./;

function noop() {}

/**
  A computed property transforms an object literal with object's accessor function(s) into a property.

  By default the function backing the computed property will only be called
  once and the result will be cached. You can specify various properties
  that your computed property depends on. This will force the cached
  result to be recomputed if the dependencies are modified.

  In the following example we declare a computed property - `fullName` - by calling
  `computed` with property dependencies (`firstName` and `lastName`) as leading arguments and getter accessor function. The `fullName` getter function
  will be called once (regardless of how many times it is accessed) as long
  as its dependencies have not changed. Once `firstName` or `lastName` are updated
  any future calls (or anything bound) to `fullName` will incorporate the new
  values.

  ```javascript
  import EmberObject, { computed } from '@ember/object';

  let Person = EmberObject.extend({
    // these will be supplied by `create`
    firstName: null,
    lastName: null,

    fullName: computed('firstName', 'lastName', function() {
      let firstName = this.get('firstName'),
          lastName  = this.get('lastName');

      return `${firstName} ${lastName}`;
    })
  });

  let tom = Person.create({
    firstName: 'Tom',
    lastName: 'Dale'
  });

  tom.get('fullName') // 'Tom Dale'
  ```

  You can also define what Ember should do when setting a computed property by providing additional function (`set`) in hash argument.
  If you try to set a computed property, it will try to invoke setter accessor function with the key and
  value you want to set it to as arguments.

  ```javascript
  import EmberObject, { computed } from '@ember/object';

  let Person = EmberObject.extend({
    // these will be supplied by `create`
    firstName: null,
    lastName: null,

    fullName: computed('firstName', 'lastName', {
      get(key) {
        let firstName = this.get('firstName'),
            lastName  = this.get('lastName');

        return firstName + ' ' + lastName;
      },
      set(key, value) {
        let [firstName, lastName] = value.split(' ');

        this.set('firstName', firstName);
        this.set('lastName', lastName);

        return value;
      }
    })
  });

  let person = Person.create();

  person.set('fullName', 'Peter Wagenet');
  person.get('firstName'); // 'Peter'
  person.get('lastName');  // 'Wagenet'
  ```

  You can overwrite computed property with normal property (no longer computed), that won't change if dependencies change, if you set computed property and it won't have setter accessor function defined.

  You can also mark computed property as `.readOnly()` and block all attempts to set it.

  ```javascript
  import EmberObject, { computed } from '@ember/object';

  let Person = EmberObject.extend({
    // these will be supplied by `create`
    firstName: null,
    lastName: null,

    fullName: computed('firstName', 'lastName', {
      get(key) {
        let firstName = this.get('firstName');
        let lastName  = this.get('lastName');

        return firstName + ' ' + lastName;
      }
    }).readOnly()
  });

  let person = Person.create();
  person.set('fullName', 'Peter Wagenet'); // Uncaught Error: Cannot set read-only property "fullName" on object: <(...):emberXXX>
  ```

  Additional resources:
  - [New CP syntax RFC](https://github.com/emberjs/rfcs/blob/master/text/0011-improved-cp-syntax.md)
  - [New computed syntax explained in "Ember 1.12 released" ](https://emberjs.com/blog/2015/05/13/ember-1-12-released.html#toc_new-computed-syntax)

  @class ComputedProperty
  @public
*/
class ComputedProperty extends Descriptor {
  constructor(config, opts) {
    super();
    let hasGetterOnly = typeof config === 'function';
    if (hasGetterOnly) {
      this._getter = config;
    } else {
      assert(
        'computed expects a function or an object as last argument.',
        typeof config === 'object' && !Array.isArray(config)
      );
      assert(
        'Config object passed to computed can only contain `get` and `set` keys.',
        Object.keys(config).every(key => key === 'get' || key === 'set')
      );
      assert(
        'Computed properties must receive a getter or a setter, you passed none.',
        !!config.get || !!config.set
      );
      this._getter = config.get || noop;
      this._setter = config.set;
    }

    this._suspended = undefined;
    this._meta = undefined;
    this._volatile = false;

    if (EMBER_METAL_TRACKED_PROPERTIES) {
      this._auto = false;
    }

    this._dependentKeys = opts && opts.dependentKeys;
    this._readOnly = opts && hasGetterOnly && opts.readOnly === true;
  }

  /**
    Call on a computed property to set it into non-cached mode. When in this
    mode the computed property will not automatically cache the return value.

    It also does not automatically fire any change events. You must manually notify
    any changes if you want to observe this property.

    Dependency keys have no effect on volatile properties as they are for cache
    invalidation and notification when cached value is invalidated.

    ```javascript
    import EmberObject, { computed } from '@ember/object';

    let outsideService = EmberObject.extend({
      value: computed(function() {
        return OutsideService.getValue();
      }).volatile()
    }).create();
    ```

    @method volatile
    @return {ComputedProperty} this
    @chainable
    @public
  */
  volatile() {
    this._volatile = true;
    return this;
  }

  /**
    Call on a computed property to set it into read-only mode. When in this
    mode the computed property will throw an error when set.

    ```javascript
    import EmberObject, { computed } from '@ember/object';

    let Person = EmberObject.extend({
      guid: computed(function() {
        return 'guid-guid-guid';
      }).readOnly()
    });

    let person = Person.create();

    person.set('guid', 'new-guid'); // will throw an exception
    ```

    @method readOnly
    @return {ComputedProperty} this
    @chainable
    @public
  */
  readOnly() {
    this._readOnly = true;
    assert(
      'Computed properties that define a setter using the new syntax cannot be read-only',
      !(this._readOnly && this._setter && this._setter !== this._getter)
    );
    return this;
  }

  /**
    Sets the dependent keys on this computed property. Pass any number of
    arguments containing key paths that this computed property depends on.

    ```javascript
    import EmberObject, { computed } from '@ember/object';

    let President = EmberObject.extend({
      fullName: computed('firstName', 'lastName', function() {
        return this.get('firstName') + ' ' + this.get('lastName');

        // Tell Ember that this computed property depends on firstName
        // and lastName
      })
    });

    let president = President.create({
      firstName: 'Barack',
      lastName: 'Obama'
    });

    president.get('fullName'); // 'Barack Obama'
    ```

    @method property
    @param {String} path* zero or more property paths
    @return {ComputedProperty} this
    @chainable
    @public
  */
  property() {
    let args = [];

    function addArg(property) {
      warn(
        `Dependent keys containing @each only work one level deep. ` +
          `You used the key "${property}" which is invalid. ` +
          `Please create an intermediary computed property.`,
        DEEP_EACH_REGEX.test(property) === false,
        { id: 'ember-metal.computed-deep-each' }
      );
      args.push(property);
    }

    for (let i = 0; i < arguments.length; i++) {
      expandProperties(arguments[i], addArg);
    }

    this._dependentKeys = args;
    return this;
  }

  /**
    In some cases, you may want to annotate computed properties with additional
    metadata about how they function or what values they operate on. For example,
    computed property functions may close over variables that are then no longer
    available for introspection.

    You can pass a hash of these values to a computed property like this:

    ```
    import { computed } from '@ember/object';
    import Person from 'my-app/utils/person';

    person: computed(function() {
      let personId = this.get('personId');
      return Person.create({ id: personId });
    }).meta({ type: Person })
    ```

    The hash that you pass to the `meta()` function will be saved on the
    computed property descriptor under the `_meta` key. Ember runtime
    exposes a public API for retrieving these values from classes,
    via the `metaForProperty()` function.

    @method meta
    @param {Object} meta
    @chainable
    @public
  */
  meta(meta) {
    if (arguments.length === 0) {
      return this._meta || {};
    } else {
      this._meta = meta;
      return this;
    }
  }

  // invalidate cache when CP key changes
  didChange(obj, keyName) {
    // _suspended is set via a CP.set to ensure we don't clear
    // the cached value set by the setter
    if (this._volatile || this._suspended === obj) {
      return;
    }

    // don't create objects just to invalidate
    let meta = peekMeta(obj);
    if (meta === undefined || meta.source !== obj) {
      return;
    }

    let cache = peekCacheFor(obj);
    if (cache !== undefined && cache.delete(keyName)) {
      removeDependentKeys(this, obj, keyName, meta);
    }
  }

  get(obj, keyName) {
    if (this._volatile) {
      return this._getter.call(obj, keyName);
    }

    let cache = getCacheFor(obj);
    let propertyTag;

    if (EMBER_METAL_TRACKED_PROPERTIES) {
      propertyTag = tagForProperty(obj, keyName);

      if (cache.has(keyName)) {
        // special-case for computed with no dependent keys used to
        // trigger cacheable behavior.
        if (!this._auto && (!this._dependentKeys || this._dependentKeys.length === 0)) {
          return cache.get(keyName);
        }

        let lastRevision = getLastRevisionFor(obj, keyName);
        if (propertyTag.validate(lastRevision)) {
          return cache.get(keyName);
        }
      }
    } else {
      if (cache.has(keyName)) {
        return cache.get(keyName);
      }
    }

    let parent;
    let tracker;

    if (EMBER_METAL_TRACKED_PROPERTIES) {
      parent = getCurrentTracker();
      tracker = setCurrentTracker();
    }

    let ret = this._getter.call(obj, keyName);

    if (EMBER_METAL_TRACKED_PROPERTIES) {
      setCurrentTracker(parent);
      let tag = tracker.combine();
      if (parent) parent.add(tag);

      update(propertyTag, tag);
      setLastRevisionFor(obj, keyName, propertyTag.value());
    }

    cache.set(keyName, ret);

    let meta = metaFor(obj);
    let chainWatchers = meta.readableChainWatchers();
    if (chainWatchers !== undefined) {
      chainWatchers.revalidate(keyName);
    }
    addDependentKeys(this, obj, keyName, meta);

    return ret;
  }

  set(obj, keyName, value) {
    if (this._readOnly) {
      this._throwReadOnlyError(obj, keyName);
    }

    if (!this._setter) {
      return this.clobberSet(obj, keyName, value);
    }

    if (this._volatile) {
      return this.volatileSet(obj, keyName, value);
    }

    return this.setWithSuspend(obj, keyName, value);
  }

  _throwReadOnlyError(obj, keyName) {
    throw new EmberError(`Cannot set read-only property "${keyName}" on object: ${inspect(obj)}`);
  }

  clobberSet(obj, keyName, value) {
    let cachedValue = getCachedValueFor(obj, keyName);
    defineProperty(obj, keyName, null, cachedValue);
    set(obj, keyName, value);
    return value;
  }

  volatileSet(obj, keyName, value) {
    return this._setter.call(obj, keyName, value);
  }

  setWithSuspend(obj, keyName, value) {
    let oldSuspended = this._suspended;
    this._suspended = obj;
    try {
      return this._set(obj, keyName, value);
    } finally {
      this._suspended = oldSuspended;
    }
  }

  _set(obj, keyName, value) {
    let cache = getCacheFor(obj);
    let hadCachedValue = cache.has(keyName);
    let cachedValue = cache.get(keyName);

    let ret = this._setter.call(obj, keyName, value, cachedValue);

    // allows setter to return the same value that is cached already
    if (hadCachedValue && cachedValue === ret) {
      return ret;
    }

    let meta = metaFor(obj);
    if (!hadCachedValue) {
      addDependentKeys(this, obj, keyName, meta);
    }

    cache.set(keyName, ret);

    notifyPropertyChange(obj, keyName, meta);

    if (EMBER_METAL_TRACKED_PROPERTIES) {
      let propertyTag = tagForProperty(obj, keyName);
      setLastRevisionFor(obj, keyName, propertyTag.value());
    }

    return ret;
  }

  /* called before property is overridden */
  teardown(obj, keyName, meta) {
    if (this._volatile) {
      return;
    }
    let cache = peekCacheFor(obj);
    if (cache !== undefined && cache.delete(keyName)) {
      removeDependentKeys(this, obj, keyName, meta);
    }
  }
}

if (EMBER_METAL_TRACKED_PROPERTIES) {
  ComputedProperty.prototype.auto = function() {
    this._auto = true;
    return this;
  };
}

/**
  This helper returns a new property descriptor that wraps the passed
  computed property function. You can use this helper to define properties
  with mixins or via `defineProperty()`.

  If you pass a function as an argument, it will be used as a getter. A computed
  property defined in this way might look like this:

  ```js
  import EmberObject, { computed } from '@ember/object';

  let Person = EmberObject.extend({
    init() {
      this._super(...arguments);

      this.firstName = 'Betty';
      this.lastName = 'Jones';
    },

    fullName: computed('firstName', 'lastName', function() {
      return `${this.get('firstName')} ${this.get('lastName')}`;
    })
  });

  let client = Person.create();

  client.get('fullName'); // 'Betty Jones'

  client.set('lastName', 'Fuller');
  client.get('fullName'); // 'Betty Fuller'
  ```

  You can pass a hash with two functions, `get` and `set`, as an
  argument to provide both a getter and setter:

  ```js
  import EmberObject, { computed } from '@ember/object';

  let Person = EmberObject.extend({
    init() {
      this._super(...arguments);

      this.firstName = 'Betty';
      this.lastName = 'Jones';
    },

    fullName: computed('firstName', 'lastName', {
      get(key) {
        return `${this.get('firstName')} ${this.get('lastName')}`;
      },
      set(key, value) {
        let [firstName, lastName] = value.split(/\s+/);
        this.setProperties({ firstName, lastName });
        return value;
      }
    })
  });

  let client = Person.create();
  client.get('firstName'); // 'Betty'

  client.set('fullName', 'Carroll Fuller');
  client.get('firstName'); // 'Carroll'
  ```

  The `set` function should accept two parameters, `key` and `value`. The value
  returned from `set` will be the new value of the property.

  _Note: This is the preferred way to define computed properties when writing third-party
  libraries that depend on or use Ember, since there is no guarantee that the user
  will have [prototype Extensions](https://emberjs.com/guides/configuring-ember/disabling-prototype-extensions/) enabled._

  The alternative syntax, with prototype extensions, might look like:

  ```js
  fullName: function() {
    return this.get('firstName') + ' ' + this.get('lastName');
  }.property('firstName', 'lastName')
  ```

  @method computed
  @for @ember/object
  @static
  @param {String} [dependentKeys*] Optional dependent keys that trigger this computed property.
  @param {Function} func The computed property function.
  @return {ComputedProperty} property descriptor instance
  @public
*/
export default function computed(...args) {
  let func = args.pop();

  let cp = new ComputedProperty(func);

  if (args.length > 0) {
    cp.property(...args);
  }

  return cp;
}
// used for the Ember.computed global only
export const _globalsComputed = computed.bind(null);

const COMPUTED_PROPERTY_CACHED_VALUES = new WeakMap();
const COMPUTED_PROPERTY_LAST_REVISION = EMBER_METAL_TRACKED_PROPERTIES ? new WeakMap() : undefined;

/**
  Returns the cached value for a property, if one exists.
  This can be useful for peeking at the value of a computed
  property that is generated lazily, without accidentally causing
  it to be created.

  @method cacheFor
  @static
  @for @ember/object/internals
  @param {Object} obj the object whose property you want to check
  @param {String} key the name of the property whose cached value you want
    to return
  @return {Object} the cached value
  @public
*/
export function getCacheFor(obj) {
  let cache = COMPUTED_PROPERTY_CACHED_VALUES.get(obj);
  if (cache === undefined) {
    cache = new Map();

    if (EMBER_METAL_TRACKED_PROPERTIES) {
      COMPUTED_PROPERTY_LAST_REVISION.set(obj, new Map());
    }

    COMPUTED_PROPERTY_CACHED_VALUES.set(obj, cache);
  }
  return cache;
}

export function getCachedValueFor(obj, key) {
  let cache = COMPUTED_PROPERTY_CACHED_VALUES.get(obj);
  if (cache !== undefined) {
    return cache.get(key);
  }
}

export let setLastRevisionFor;
export let getLastRevisionFor;

if (EMBER_METAL_TRACKED_PROPERTIES) {
  setLastRevisionFor = (obj, key, revision) => {
    let lastRevision = COMPUTED_PROPERTY_LAST_REVISION.get(obj);
    lastRevision.set(key, revision);
  };

  getLastRevisionFor = (obj, key) => {
    let cache = COMPUTED_PROPERTY_LAST_REVISION.get(obj);
    if (cache == undefined) {
      return 0;
    } else {
      return cache.get(key);
    }
  };
}

export function peekCacheFor(obj) {
  return COMPUTED_PROPERTY_CACHED_VALUES.get(obj);
}

export { ComputedProperty, computed };


text:
This is the data that has been provided. Also in here is a CSV validator
that makes sure the columns are all of the same length and the right types.

Run the validator as

> python validator.py data.csv


text:
package org.apache.hyracks.storage.am.lsm.btree.impls;

import java.util.List;

import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
import org.apache.hyracks.storage.am.btree.api.IBTreeLeafFrame;
import org.apache.hyracks.storage.am.btree.impls.BTree;
import org.apache.hyracks.storage.am.btree.impls.BTreeRangeSearchCursor;
import org.apache.hyracks.storage.am.btree.impls.RangePredicate;
import org.apache.hyracks.storage.am.common.api.ICursorInitialState;
import org.apache.hyracks.storage.am.common.api.IIndexAccessor;
import org.apache.hyracks.storage.am.common.api.IIndexCursor;
import org.apache.hyracks.storage.am.common.api.ISearchOperationCallback;
import org.apache.hyracks.storage.am.common.api.ISearchPredicate;
import org.apache.hyracks.storage.am.common.api.ITreeIndexCursor;
import org.apache.hyracks.storage.am.common.api.IndexException;
import org.apache.hyracks.storage.am.common.impls.NoOpOperationCallback;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMComponent.LSMComponentType;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMHarness;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMIndexOperationContext;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMTreeTupleReference;
import org.apache.hyracks.storage.am.lsm.common.impls.BloomFilterAwareBTreePointSearchCursor;
import org.apache.hyracks.storage.common.buffercache.IBufferCache;
import org.apache.hyracks.storage.common.buffercache.ICachedPage;

public class LSMBTreePointSearchCursor implements ITreeIndexCursor {

    private IIndexCursor[] rangeCursors;
    private final ILSMIndexOperationContext opCtx;
    private ISearchOperationCallback searchCallback;
    private RangePredicate predicate;
    private boolean includeMutableComponent;
    private int numBTrees;
    private IIndexAccessor[] btreeAccessors;
    private ILSMHarness lsmHarness;
    private boolean nextHasBeenCalled;
    private boolean foundTuple;
    private ITupleReference frameTuple;
    private List<ILSMComponent> operationalComponents;

    public LSMBTreePointSearchCursor(ILSMIndexOperationContext opCtx) {
        this.opCtx = opCtx;
    }

    @Override
    public boolean hasNext() throws HyracksDataException, IndexException {
        if (nextHasBeenCalled) {
            return false;
        } else if (foundTuple) {
            return true;
        }
        boolean reconciled = false;
        for (int i = 0; i < numBTrees; ++i) {
            btreeAccessors[i].search(rangeCursors[i], predicate);
            if (rangeCursors[i].hasNext()) {
                rangeCursors[i].next();
                // We use the predicate's to lock the key instead of the tuple that we get from cursor to avoid copying the tuple when we do the "unlatch dance"
                if (reconciled || searchCallback.proceed(predicate.getLowKey())) {
                    // if proceed is successful, then there's no need for doing the "unlatch dance"
                    if (((ILSMTreeTupleReference) rangeCursors[i].getTuple()).isAntimatter()) {
                        searchCallback.cancel(predicate.getLowKey());
                        rangeCursors[i].close();
                        return false;
                    } else {
                        frameTuple = rangeCursors[i].getTuple();
                        foundTuple = true;
                        return true;
                    }
                }
                if (i == 0 && includeMutableComponent) {
                    // unlatch/unpin
                    rangeCursors[i].reset();
                    searchCallback.reconcile(predicate.getLowKey());
                    reconciled = true;

                    // retraverse
                    btreeAccessors[0].search(rangeCursors[i], predicate);
                    searchCallback.complete(predicate.getLowKey());
                    if (rangeCursors[i].hasNext()) {
                        rangeCursors[i].next();
                        if (((ILSMTreeTupleReference) rangeCursors[i].getTuple()).isAntimatter()) {
                            searchCallback.cancel(predicate.getLowKey());
                            rangeCursors[i].close();
                            return false;
                        } else {
                            frameTuple = rangeCursors[i].getTuple();
                            foundTuple = true;
                            return true;
                        }
                    } else {
                        rangeCursors[i].close();
                    }
                } else {
                    frameTuple = rangeCursors[i].getTuple();
                    searchCallback.reconcile(frameTuple);
                    searchCallback.complete(frameTuple);
                    foundTuple = true;
                    return true;
                }
            } else {
                rangeCursors[i].close();
            }
        }
        return false;
    }

    @Override
    public void reset() throws HyracksDataException, IndexException {
        try {
            if (rangeCursors != null) {
                for (int i = 0; i < rangeCursors.length; ++i) {
                    rangeCursors[i].reset();
                }
            }
            rangeCursors = null;
            nextHasBeenCalled = false;
            foundTuple = false;
        } finally {
            if (lsmHarness != null) {
                lsmHarness.endSearch(opCtx);
            }
        }
    }

    @Override
    public void open(ICursorInitialState initialState, ISearchPredicate searchPred) throws HyracksDataException {
        LSMBTreeCursorInitialState lsmInitialState = (LSMBTreeCursorInitialState) initialState;
        operationalComponents = lsmInitialState.getOperationalComponents();
        lsmHarness = lsmInitialState.getLSMHarness();
        searchCallback = lsmInitialState.getSearchOperationCallback();
        predicate = (RangePredicate) lsmInitialState.getSearchPredicate();
        numBTrees = operationalComponents.size();
        rangeCursors = new IIndexCursor[numBTrees];
        btreeAccessors = new IIndexAccessor[numBTrees];
        includeMutableComponent = false;

        for (int i = 0; i < numBTrees; i++) {
            ILSMComponent component = operationalComponents.get(i);
            BTree btree;
            IBTreeLeafFrame leafFrame = (IBTreeLeafFrame) lsmInitialState.getLeafFrameFactory().createFrame();
            if (component.getType() == LSMComponentType.MEMORY) {
                includeMutableComponent = true;
                // No need for a bloom filter for the in-memory BTree.
                rangeCursors[i] = new BTreeRangeSearchCursor(leafFrame, false);
                btree = (BTree) ((LSMBTreeMemoryComponent) component).getBTree();
            } else {
                rangeCursors[i] = new BloomFilterAwareBTreePointSearchCursor(leafFrame, false,
                        ((LSMBTreeDiskComponent) component).getBloomFilter());
                btree = (BTree) ((LSMBTreeDiskComponent) component).getBTree();
            }
            btreeAccessors[i] = btree.createAccessor(NoOpOperationCallback.INSTANCE, NoOpOperationCallback.INSTANCE);
        }
        nextHasBeenCalled = false;
        foundTuple = false;
    }

    @Override
    public void next() throws HyracksDataException {
        nextHasBeenCalled = true;
    }

    @Override
    public void close() throws HyracksDataException {
        if (lsmHarness != null) {
            try {
                for (int i = 0; i < rangeCursors.length; i++) {
                    rangeCursors[i].close();
                }
                rangeCursors = null;
            } finally {
                lsmHarness.endSearch(opCtx);
            }
        }
        nextHasBeenCalled = false;
        foundTuple = false;
    }

    @Override
    public ITupleReference getTuple() {
        return frameTuple;
    }

    @Override
    public ICachedPage getPage() {
        // do nothing
        return null;
    }

    @Override
    public void setBufferCache(IBufferCache bufferCache) {
        // do nothing

    }

    @Override
    public void setFileId(int fileId) {
        // do nothing

    }

    @Override
    public boolean exclusiveLatchNodes() {
        return false;
    }

    @Override
    public void markCurrentTupleAsUpdated() throws HyracksDataException {
        throw new HyracksDataException("Updating tuples is not supported with this cursor.");
    }
}


text:
<?php
    $the_user       = !empty( $user_other ) && $user_other->type != ADMINISTRATOR ? $user_other : $user;
    $status         = $the_user->type;
    if($status == ADMINISTRATOR){
        $status     = 'ADMINISTRATOR';
    }elseif($status == PENGUSUL){
        $status     = 'PENGUSUL';
    }elseif($status == PENDAMPING){
        $status     = 'PENDAMPING';
    }elseif($status == JURI){
        $status     = 'JURI';
    }elseif($status == TENANT){
        $status     = 'TENANT';
    }else{
        $status     = 'PELAKSANA';
    }

    $access         = $is_admin || ($the_user->id == $user->id) ? TRUE : FALSE;
?>

Profil <?php echo ( $the_user->id == $user->id ? 'Anda' : 'Anggota '.strtoupper($the_user->name) )?>

                                    home AKUN

                                    account_box INFORMASI PRIBADI

                                    account_balance INFORMASI PEKERJAAN

                            <?php if($access){ ?>

                                    style UBAH KATA SANDI

                                    view_list UBAH TIPE PENGGUNA

                            <?php } ?>

                                        <img class="profile-user-img img-responsive img-circle" src="<?php echo $avatar; ?>" alt="Avatar Pengguna" />

<?php echo $the_user->name; ?>

<?php echo $status; ?>

                                        <?php if( $access ){ ?>
                                            <?php echo form_open_multipart( 'user/accountsetting', array( 'id'=>'accountsetting', 'role'=>'form' ) ); ?>

                                                        Perhatian!
                                                        File yang dapat di upload adalah dengan Ukuran Maksimal 1 MB dan format File adalah jpg/jpeg/png.

                                                    <input type="hidden" name="username" value="<?php echo $the_user->username; ?>" />

                                                        Unggah Avatar
                                                        <input id="ava_selection_files" name="ava_selection_files" class="form-control" type="file" />

                                                <button type="submit" class="btn btn-warning btn-sm waves-effect">Ganti Avatar</button>
                                            <?php echo form_close(); ?>
                                        <?php } ?>

                                <?php echo form_open( 'user/personalinfo', array( 'id'=>'personal', 'role'=>'form', 'enctype'=>'multipart/form-data' ) ); ?>

                            			Ada kesalahan dalam pengisian formulir di bawah

                                        Username Pengguna

                                            <?php if( !empty($user_other) && $user_other->type != ADMINISTRATOR ): ?>
                                            <input type="hidden" name="user_id" value="<?php echo $user_other->id; ?>" />
                                            <?php endif ?>
                                            <input type="hidden" name="up_username" placeholder="Username" value="<?php echo $the_user->username; ?>" />
                                            <input type="text" class="form-control" id="up_username" disabled="" value="<?php echo $the_user->username; ?>" required>

                                        Name *

                                            <input type="text" class="form-control" name="up_name" id="up_name" value="<?php echo strtoupper($the_user->name); ?>" required>

                                        Email *

                                            <input type="text" class="form-control" name="up_email" id="up_email" value="<?php echo $the_user->email; ?>" required>

                                        Telp/HP *

                                            <input type="text" class="form-control" name="up_phone" id="up_phone" value="<?php echo $the_user->phone; ?>" required>

                                        Alamat *

                                            <input type="text" class="form-control" name="up_address" id="up_address" value="<?php echo $the_user->address; ?>" required>

                                        <?php
                                            $user_province      = $the_user->province;
                                            $province           = smit_provinces();
                                        ?>
                                        Provinsi *
                                        <select class="form-control show-tick" name="up_province" id="province-select"
                                        <?php echo ( !empty($user_other) && !$is_admin ? 'readonly="readonly"' : '' ); ?>
                                        data-url="<?php echo base_url('selectprovince'); ?>">
            	                        	<?php
                                                echo '<option value="">-- Pilih Propinsi --</option>';
                                                if( !empty($province) ){
                                                    foreach($province as $p){
                                                        echo '<option value="'.$p->province_id.'" '.( $user_province == $p->province_id ? 'selected="selected"' : '' ).'>'.$p->province_name.'</option>';
                                                    }
                                                }
                                            ?>
                                        </select>

                                        <?php
                                            $user_city          = $the_user->city;
                                            $cities             = smit_cities_by_provinces($user_province);
                                        ?>
                                        Kota/Kabupaten *
                                        <select class="form-control show-tick" name="up_regional" id="regional-select"
                                        <?php echo ( empty($user_city) ? 'disabled="disabled"' : '' ); ?>>
                                            <option value="">-- Pilih Kota/Kabupaten --</option>
                                            <?php
                                                if( !empty($user_city) ){
                                                    foreach($cities as $c){
                                                        echo '<option value="'.$c->regional_id.'" '.( $user_city == $c->regional_id ? 'selected="selected"' : '' ).'>'.$c->regional_name.'</option>';
                                                    }
                                                }
                                            ?>
                                        </select>

                                        Kecamatan/Kelurahan *

                                            <input type="text" class="form-control" name="up_district" id="up_district" value="<?php echo $the_user->district; ?>" required>

                                        <?php
                                            $user_gender        = $the_user->gender;
                                        ?>
                                        Jenis Kelamin *
                                        <select class="form-control show-tick" name="up_gender">
                                            <option value="">-- Pilih Jenis Kelamin --</option>
                                            <option value="<?php echo GENDER_MALE; ?>" <?php echo $user_gender == GENDER_MALE ? 'selected="selected"' : '' ?>>PRIA</option>
                                            <option value="<?php echo GENDER_FEMALE; ?>" <?php echo $user_gender == GENDER_FEMALE ? 'selected="selected"' : '' ?>>WANITA</option>
                                        </select>

                                        Tempat Lahir *

                                            <input type="text" class="form-control" name="up_birthplace" id="up_birthplace" value="<?php echo $the_user->birthplace; ?>" required>

                                        Tanggal Lahir *

                                            <input type="text" class="form-control datepicker" name="up_birthdate" id="up_birthdate" value="<?php echo $the_user->birthdate == "0000-00-00" ? '' : $the_user->birthdate; ?>" required>

                                        <?php
                                            $user_religion       = $the_user->religion;
        		                        ?>
                                        Agama *
                                        <select class="form-control show-tick" name="up_religion">
                                            <option value="">-- Pilih Agama --</option>
                                            <option value="1" <?php echo $user_religion == 1 ? 'selected="selected"' : '' ?>>ISLAM</option>
                                            <option value="2" <?php echo $user_religion == 2 ? 'selected="selected"' : '' ?>>KRISTEN PROTESTAN</option>
                                            <option value="3" <?php echo $user_religion == 3 ? 'selected="selected"' : '' ?>>KRISTEN KATOLIK</option>
                                            <option value="4" <?php echo $user_religion == 4 ? 'selected="selected"' : '' ?>>HIDNU</option>
                                            <option value="5" <?php echo $user_religion == 5 ? 'selected="selected"' : '' ?>>BUDHA</option>
                                            <option value="6" <?php echo $user_religion == 6 ? 'selected="selected"' : '' ?>>KONGHUCHU</option>
                                        </select>

                                        <?php
                                            $user_marital       = $the_user->marital_status;
                                        ?>
                                        Status Pernikahan *
                                        <select class="form-control show-tick" name="up_marital_status" id="up_marital_status">
                                            <option value="">-- Pilih Status Pernikahan --</option>
                                            <option value="0" <?php echo $user_marital == 0 ? 'selected="selected"' : '' ?>>BELUM MENIKAH</option>
                                            <option value="1" <?php echo $user_marital == 1 ? 'selected="selected"' : '' ?>>MENIKAH</option>
                                        </select>

                                    <?php if($access){ ?>
                                    <button type="submit" class="btn btn-warning waves-effect">Perbaharui</button>
                                    <?php } ?>
                                <?php echo form_close(); ?>

                                <?php echo form_open( 'user/jobinfo', array( 'id'=>'jobupdate', 'role'=>'form', 'enctype'=>'multipart/form-data' ) ); ?>

                            			Ada kesalahan dalam pengisian formulir di bawah

                                    <?php if( !empty($user_other) && $user_other->type != ADMINISTRATOR ): ?>
                                    <input type="hidden" name="user_id" value="<?php echo $user_other->id; ?>" />
                                    <?php endif ?>
                                    <input type="hidden" name="up_username" placeholder="Username" value="<?php echo $the_user->username; ?>" />

                                        Nomor Induk Pegawai *

                                            <input type="text" class="form-control" name="up_nip" id="up_nip" value="<?php echo $the_user->nip == 0 ? '' : $the_user->nip; ?>" maxlength="18" required>

                                        Jabatan *

                                            <input type="text" class="form-control" name="up_position" id="up_position" value="<?php echo $the_user->position; ?>" required>

                                         Satuan Kerja *
                                        <?php
            	                        	$workunit_type = smit_workunit_type();
                                            $option = array('' => '-- Pilih Satuan Kerja --');
                                            $extra = 'class="form-control show-tick" id="workunit_type"';
                                            $selected = array();

            	                            if( !empty($workunit_type) ){
            	                                foreach($workunit_type as $val){
                                                    $option[$val->workunit_id] = $val->workunit_name;
                                                    if( $the_user->workunit == $val->workunit_id ) $selected[] = $val->workunit_id;
            	                                }
            	                            }
                                            echo form_dropdown('workunit_type',$option,$selected,$extra);
            	                        ?>

                                    <?php if($access){ ?>
                                    <button type="submit" class="btn btn-warning waves-effect">Perbaharui</button>
                                    <?php } ?>
                                <?php echo form_close(); ?>

                            <?php if($access){ ?>

                                <?php if( !empty($user_other) ){ ?>
                                    <?php if( $is_admin ){ ?>
                                        <?php echo form_open( base_url('user/changepassword'), array( 'id'=>'changepassword', 'role'=>'form' ) ); ?>

                                    			Ada kesalahan dalam pengisian formulir di bawah

                                            <input type="hidden" name="id_user_other" value="<?php echo $user_other->id; ?>" />
                                            <input type="hidden" name="username_other" value="<?php echo $user_other->username; ?>" />

Reset password anggota

Password <?php echo $user_other->username; ?> akan di atur ulang ke password global.

                                                     Reset Password

                                        <?php echo form_close(); ?>
                                    <?php } ?>
                                <?php }else{ ?>
                                    <?php echo form_open( base_url('user/changepassword'), array( 'id'=>'changepassword', 'role'=>'form' ) ); ?>

                                			Ada kesalahan dalam pengisian formulir di bawah

                                            Kata Sandi Lama Anda *

                                                lock

                                                    <?php echo form_password('cur_pass','',array('id'=>'cur_pass','class'=>'form-control','placeholder'=>'Kata Sandi Lama Anda')); ?>

                                            Kata Sandi Baru Anda *

                                                lock

                                                    <?php echo form_password('new_pass','',array('id'=>'new_pass','class'=>'form-control','placeholder'=>'Kata Sandi Baru Anda')); ?>

                                            Ulangi Kata Sandi Anda *

                                                lock

                                                    <?php echo form_password('cnew_pass','',array('class'=>'form-control','placeholder'=>'Ulangi Kata Sandi Baru Anda')); ?>

                                        <button type="submit" class="btn btn-warning waves-effect">Perbaharui</button>
                                    <?php echo form_close(); ?>
                                <?php } ?>

                                <?php if( $the_user->id == $user->id ){ ?>

                                    Silahkan klik salah satu role dibawah ini untuk login sebagai role yang dipilih!

Perhatian!

                                    Role yang dipilih akan menjadi default role ketika Anda login.

                                <?php } ?>

                                Tipe <?php echo ( !empty($user_other) ? 'Pengguna '.strtoupper($user_other->name) : 'Anda' ); ?> saat ini adalah :

                                    <?php
                                        $cfg_usertype   = config_item('user_type');
                                        $current_roles  = $the_user->role;
                                        $current_roles  = maybe_unserialize($current_roles);
                                        if( !empty($current_roles) ){
                                            $roles      = explode(',',$current_roles);
                                            foreach($roles as $key => $type){
                                                if( $type == ADMINISTRATOR )        { $roletxt = 'Administrator'; $bg = 'bg-blue'; }
                                                elseif( $type == PENDAMPING )       { $roletxt = 'Pendamping'; $bg = 'bg-green'; }
                                                elseif( $type == TENANT )           { $roletxt = 'Tenant'; $bg = 'bg-purple'; }
                                                elseif( $type == JURI )             { $roletxt = 'Juri'; $bg = 'bg-orange'; }
                                                elseif( $type == PENGUSUL )         { $roletxt = 'Pengusul'; $bg = 'bg-red'; }
                                                elseif( $type == PELAKSANA )        { $roletxt = 'Pelaksana'; $bg = 'bg-teal'; }
                                                elseif( $type == PELAKSANA_TENANT ) { $roletxt = 'Pelaksana & Tenant'; $bg = 'bg-deep-orange'; }

                                                echo '<button class="btn '.$bg.' btn-role waves-effect top10 bottom20" type="button" data-role="'.$type.'"
                                                '.( $the_user->id != $user->id ? 'disabled="disabled"' : "" ).' data-url="'.base_url('gantirole').'">'.$roletxt.'</button> ';
                                            }
                                        }else{
                                            echo '
'.( !empty($user_other) ? 'Pengguna '.strtoupper($user_other->name) : 'Anda' ).' tidak memiliki role
';
                                        }
                                    ?>

                                <?php if( $user->type == ADMINISTRATOR ){ ?>
                                    <?php echo form_open_multipart( 'pengguna/profil', array( 'id'=>'userrolesetting', 'role'=>'form' ) ); ?>
                                        Ubah Role <?php echo ( !empty($user_other) ? 'Pengguna '.strtoupper($user_other->name) : 'Anda' ); ?>
                                        <input type="hidden" name="user_role_id" value="<?php echo $the_user->id; ?>" />
                                        <select id="user_role_select" name="user_role_select[]" class="ms" multiple="multiple">
                                            <?php
                                                if( !empty($current_roles) ){
                                                    $roles = explode(',',$current_roles);
                                                }

                                                foreach($cfg_usertype as $key => $usertype){
                                                    echo '<option value="'.$key.'" '.( in_array($key,$roles) ? 'selected="selected"' : '' ).'>'.$usertype.'</option>';
                                                }
                                            ?>
                                        </select>
                                        <button type="submit" class="btn btn-warning btn-sm waves-effect top30">Ubah Tipe Pengguna</button>
                                    <?php echo form_close(); ?>
                                <?php } ?>

                            <?php } ?>

				<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

Perbaharui Data Akun Anda

Berhasil memperbaharui data akun anda

                <button type="button" class="btn danger waves-effect" data-dismiss="modal">Batal</button>
				<button type="button" class="btn btn-info waves-effect" id="do_save_account" data-dismiss="modal">Lanjut</button>

				<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

Perbaharui Data Profil <?php echo ( !empty($user_other) ? 'Anggota '.$user_other->name : 'Anda' ); ?>

Apakah anda yakin akan memperbaharui data profil <?php echo ( !empty($user_other) ? 'Anggota '.$user_other->name : 'Anda' ); ?> ?

                <button type="button" class="btn danger waves-effect" data-dismiss="modal">Batal</button>
				<button type="button" class="btn btn-info waves-effect" id="do_save_profile" data-dismiss="modal">Lanjut</button>

				<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

Perbaharui Data Job Anda

Apakah anda yakin akan memperbaharui data pekerjaan anda ?

                <button type="button" class="btn danger waves-effect" data-dismiss="modal">Batal</button>
				<button type="button" class="btn btn-info waves-effect" id="do_save_job" data-dismiss="modal">Lanjut</button>

				<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

Perbaharui Kata Sandi Anda

Apakah anda yakin akan memperbaharui kata sandi anda ?

                <button type="button" class="btn danger waves-effect" data-dismiss="modal">Batal</button>
				<button type="button" class="btn btn-info waves-effect" id="do_save_changepassword">Lanjut</button>

				<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>

Reset Kata Sandi Anggota

                Anda yakin akan mengatur ulang password untuk anggota <?php echo smit_isset($user_other->username,''); ?>?

				<button type="button" class="btn danger waves-effect" data-dismiss="modal">Batal</button>
				<button type="button" class="btn btn-info waves-effect" id="do_reset_pass">Lanjut</button>


text:
from __future__ import unicode_literals

from django.db import models, migrations
import partialdate.fields

class Migration(migrations.Migration):

    dependencies = [
        ('genealogio', '0002_auto_20150216_0920'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='family',
            name='name',
        ),
        migrations.AddField(
            model_name='family',
            name='name',
            field=models.CharField(max_length=200, null=True, verbose_name='Familienname', blank=True),
            preserve_default=True,
        ),
        migrations.AlterField(
            model_name='personplace',
            name='comment',
            field=models.CharField(default='', max_length=500, verbose_name='Kommentar', blank=True),
            preserve_default=True,
        ),
        migrations.AlterField(
            model_name='personplace',
            name='end',
            field=partialdate.fields.PartialDateField(null=True, verbose_name='Ende', blank=True),
            preserve_default=True,
        ),
        migrations.AlterField(
            model_name='personplace',
            name='place',
            field=models.ForeignKey(verbose_name='Ort', to='genealogio.Place', on_delete=models.CASCADE),
            preserve_default=True,
        ),
        migrations.AlterField(
            model_name='personplace',
            name='start',
            field=partialdate.fields.PartialDateField(null=True, verbose_name='Beginn', blank=True),
            preserve_default=True,
        ),
        migrations.AlterField(
            model_name='personplace',
            name='typ',
            field=models.IntegerField(default=1, choices=[(0, 'Unbekannt'), (1, 'Anderer'), (2, 'Geburt'), (3, 'Tod'), (4, 'Kindheit'), (5, 'Ausbildung/Studium'), (6, 'Ruhestand'), (7, 'Grabst\xe4tte')]),
            preserve_default=True,
        ),
    ]


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Leap Motion C++ API Reference: Class Members</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Leap Motion C++ API Reference
    1.0

Here is a list of all documented class members with links to the class documentation for each member:

- v -

ValueType
: Leap::Config

Vector()
: Leap::Vector

verticalAxis()
: Leap::Screen

verticalViewAngle()
: Leap::Device

Copyright © 2012-2013 Leap Motion


text:
/*---------------------------------------------------------------------------
  --      usb.h                                                    	   --
  --      Christine Chen                                                   --
  --      Ref. DE2-115 Demonstrations by Terasic Technologies Inc.         --
  --      Fall 2014                                                        --
  --                                                                       --
  --      For use with ECE 298 Experiment 7                                --
  --      UIUC ECE Department                                              --
  ---------------------------------------------------------------------------*/

#ifndef USB_H_
#define USB_H_

#include "alt_types.h"

/* -----------------------------------------------------------------------
 * HPI implementation
 *
 * The c67x00 chip also support control via SPI or HSS serial
 * interfaces.  However, this driver assumes that register access can
 * be performed from IRQ context.  While this is a safe assuption with
 * the HPI interface, it is not true for the serial interfaces.
 */

/* HPI registers */
#define HPI_DATA    0
#define HPI_MAILBOX 1
#define HPI_ADDR    2
#define HPI_STATUS  3

#define CY7C67200_0_BASE CY7C67200_IF_0_BASE

//------------------------------ function declaration ----------------------------//
//-------------USB operation -----------
/*****************************************************************************/
/**
*
* This function writes data to the internal registers of the Cypress
* CY7C67200 USB controller.
*
* @param    Address is the address of the register.
* @param    Data is the data to be written to the register.
*
* @return   None
*
* @note     None
*
******************************************************************************/
void UsbWrite(alt_u16 Address, alt_u16 Data);

/*****************************************************************************/
/**
*
* This function reads data from the internal registers of the Cypress
* CY7C67200 USB controller.
*
* @param    Address is the address of the register.
*
* @return   The data read from the specified address
*
* @note     None
*
******************************************************************************/
alt_u16 UsbRead(alt_u16 Address);

/*****************************************************************************/
/**
*
* This function does a software reset of the Cypress CY7C67200 USB controller.
*
* @param    UsbBaseAddress is the starting location of the USB internal memory
*           to which this bin file data is written.
*
* @return   None
*
* @note     None
*
******************************************************************************/
void UsbSoftReset();

void UsbSetAddress();		// Set Address
void UsbGetDeviceDesc1(); 	// Get Device Descriptor -1
void UsbGetDeviceDesc2(); 	// Get Device Descriptor -2
void UsbGetConfigDesc1(); 	// Get Configuration Descriptor -1
void UsbGetConfigDesc2(); 	// Get Configuration Descriptor -2
void UsbSetConfig();		// Set Configuration
void UsbClassRequest();		// Class Request
void UsbGetHidDesc();		// Get HID Descriptor
void UsbGetReportDesc();	// Get Report Descriptor

alt_u16 UsbWaitTDListDone();	// Check and wait until HUSB_TDListDone is read from HPI Data
alt_u16 UsbGetRetryCnt();		// Get RetryCnt for sending the TD

void UsbPrintMem();			// Print the memory contents of EZ-OTG

#endif /* USB_H_ */


text:
package resource

import (
	"k8s.io/apimachinery/pkg/api/meta"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/client-go/discovery"
	"k8s.io/client-go/rest"
<<<<<<< HEAD
	"k8s.io/client-go/restmapper"
=======
>>>>>>> axbaretto
)

type RESTClientGetter interface {
	ToRESTConfig() (*rest.Config, error)
	ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
	ToRESTMapper() (meta.RESTMapper, error)
}

type ClientConfigFunc func() (*rest.Config, error)
<<<<<<< HEAD
type RESTMapperFunc func() (meta.RESTMapper, error)
type CategoryExpanderFunc func() (restmapper.CategoryExpander, error)
=======
>>>>>>> axbaretto

// RESTClient is a client helper for dealing with RESTful resources
// in a generic way.
type RESTClient interface {
	Get() *rest.Request
	Post() *rest.Request
	Patch(types.PatchType) *rest.Request
	Delete() *rest.Request
	Put() *rest.Request
}

// RequestTransform is a function that is given a chance to modify the outgoing request.
type RequestTransform func(*rest.Request)

// NewClientWithOptions wraps the provided RESTClient and invokes each transform on each
// newly created request.
func NewClientWithOptions(c RESTClient, transforms ...RequestTransform) RESTClient {
<<<<<<< HEAD
	if len(transforms) == 0 {
		return c
	}
=======
>>>>>>> axbaretto
	return &clientOptions{c: c, transforms: transforms}
}

type clientOptions struct {
	c          RESTClient
	transforms []RequestTransform
}

func (c *clientOptions) modify(req *rest.Request) *rest.Request {
	for _, transform := range c.transforms {
		transform(req)
	}
	return req
}

func (c *clientOptions) Get() *rest.Request {
	return c.modify(c.c.Get())
}

func (c *clientOptions) Post() *rest.Request {
	return c.modify(c.c.Post())
}
func (c *clientOptions) Patch(t types.PatchType) *rest.Request {
	return c.modify(c.c.Patch(t))
}
func (c *clientOptions) Delete() *rest.Request {
	return c.modify(c.c.Delete())
}
func (c *clientOptions) Put() *rest.Request {
	return c.modify(c.c.Put())
}

// ContentValidator is an interface that knows how to validate an API object serialized to a byte array.
type ContentValidator interface {
	ValidateBytes(data []byte) error
}

// Visitor lets clients walk a list of resources.
type Visitor interface {
	Visit(VisitorFunc) error
}

// VisitorFunc implements the Visitor interface for a matching function.
// If there was a problem walking a list of resources, the incoming error
// will describe the problem and the function can decide how to handle that error.
// A nil returned indicates to accept an error to continue loops even when errors happen.
// This is useful for ignoring certain kinds of errors or aggregating errors in some way.
type VisitorFunc func(*Info, error) error


text:
  <button class='ui refresh title button'>Manor</button>

    <button class="basic inverted ui icon add-service add button">

    </button>


text:
{% extends "base_two_frames.html" %}

{% block aside %}

Reservations Instructions

        Before you're able to make reservations you'll need to complete these tasks.

{% endblock aside %}

{% block main %}

Complete your online training

                {% if step1_complete %}

                {% else %}
                    <button class="btn-primary btn">Start</button>
                {% endif %}

Attend a first training event

                {% if step2_complete %}

                {% elif step1_complete %}
                    <button class="btn-primary btn">Start</button>
                {% endif %}

Attend a second training event

                {% if step3_complete %}

                {% elif step2_complete %}
                    <button class="btn-primary btn">Start</button>
                {% endif %}

    <form method="POST" action="{% url "request_individual_mapper_status" username=user.username %}">
        {% csrf_token %}

Request individual mapper status

                    {% if step4_complete %}

                    {% elif step3_complete %}
                        <button class="btn-primary btn">Start</button>
                    {% endif %}

    </form>

{% endblock main %}