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

namespace SuperMap.Connector.Control.WPF
{
    /// <summary>
    /// 向地图发出某一属性已更改的通知。
    /// </summary>
    public interface IMapNotifyPropertyChanged
    {
        /// <summary>
        /// 地图属性发生变化的事件。
        /// </summary>
        event MapPropertyChangedHandler PropertyChanged;
    }
}


text:
using namespace lldb;
using namespace lldb_private;

TEST(StateTest, Formatv) {
  EXPECT_EQ("exited", llvm::formatv("{0}", eStateExited).str());
  EXPECT_EQ("stopped", llvm::formatv("{0}", eStateStopped).str());
  EXPECT_EQ("unknown", llvm::formatv("{0}", StateType(-1)).str());
}

redpajama_set_name: RedPajamaGithub


text:
@interface LCRequestAccessory ()

@property (nonatomic, strong) MBProgressHUD *hud;

@end

@implementation LCRequestAccessory

- (instancetype) initWithShowVC:(UIViewController *)vc{
    self = [super init];
    if (self) {
        _hud = [[MBProgressHUD alloc] initWithView:vc.view];
        [vc.view addSubview:_hud];
        _hud.mode = MBProgressHUDModeIndeterminate;
//        _hud.label.text = @"正在加载";
//        _hud.label.textColor = [UIColor whiteColor];
//        _hud.square = YES;
//        _hud.bezelView.style = MBProgressHUDBackgroundStyleSolidColor;
//        _hud.bezelView.backgroundColor = [UIColor blackColor];
//        _hud.backgroundView.backgroundColor = [UIColor clearColor];
//        _hud.backgroundColor = [UIColor clearColor];

    }
    return self;
}

- (void)requestWillStart:(id)request {
    [self.hud showAnimated:YES];
}

- (void)requestWillStop:(id)request {
    [self.hud hideAnimated:NO];
}

- (void)requestDidStop:(id)request{
//    [self.hud hide:NO];
}

@end


text:
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef nsINodeList_h___
#define nsINodeList_h___

#include "nsIDOMNodeList.h"
#include "nsWrapperCache.h"
#include "nsIContent.h"

// IID for the nsINodeList interface
#define NS_INODELIST_IID \
{ 0xadb5e54c, 0x6e96, 0x4102, \
 { 0x8d, 0x40, 0xe0, 0x12, 0x3d, 0xcf, 0x48, 0x7a } }

class nsIContent;
class nsINode;

/**
 * An internal interface for a reasonably fast indexOf.
 */
class nsINodeList : public nsIDOMNodeList,
                    public nsWrapperCache
{
public:
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_INODELIST_IID)

  /**
   * Get the index of the given node in the list.  Will return -1 if the node
   * is not in the list.
   */
  virtual int32_t IndexOf(nsIContent* aContent) = 0;

  /**
   * Get the root node for this nodelist.
   */
  virtual nsINode* GetParentObject() = 0;

  using nsIDOMNodeList::Item;

  uint32_t Length()
  {
    uint32_t length;
    GetLength(&length);
    return length;
  }
  virtual nsIContent* Item(uint32_t aIndex) = 0;
  nsIContent* IndexedGetter(uint32_t aIndex, bool& aFound)
  {
    nsIContent* item = Item(aIndex);
    aFound = !!item;
    return item;
  }
};

#define NS_NODELIST_OFFSET_AND_INTERFACE_TABLE_BEGIN(_class)                  \
  NS_OFFSET_AND_INTERFACE_TABLE_BEGIN_AMBIGUOUS(_class, nsINodeList)

NS_DEFINE_STATIC_IID_ACCESSOR(nsINodeList, NS_INODELIST_IID)

#endif /* nsINodeList_h___ */


text:
react-differ
======

A react component for code diff.

### Sample

[Demo](http://differ.nighca.me/)

[Sample Code](https://github.com/nighca/differ/blob/master/sample/src/App.js)

### Usage

```shell
npm i react-differ --save

# Or

yarn add react-differ
```

```javascript
import React, { Component } from 'react'
import Differ from 'react-differ'

const from = `import React, { Component } from 'react'
import Differ from 'react-differ'`

const to = `import React from 'react'
import Differ from 'react-differ'`

class App extends Component {
  render() {
    return (
      <Differ from={from} to={to} />
    )
  }
}
```


text:
package org.apache.hadoop.fs.azure.contract;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.contract.AbstractContractGetFileStatusTest;
import org.apache.hadoop.fs.contract.AbstractFSContract;

/**
 * Contract test.
 */
public class ITestAzureNativeContractGetFileStatus
    extends AbstractContractGetFileStatusTest {

  @Override
  protected AbstractFSContract createContract(Configuration conf) {
    return new NativeAzureFileSystemContract(conf);
  }
}


text:
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;

using Nucleo.EventArguments;
using Nucleo.Models;
using Nucleo.Views;
using Nucleo.Dependencies;
using Nucleo.Presentation.Creation;
using Nucleo.Presentation.Discovery;
using Nucleo.Presentation.Initialization;

namespace Nucleo.Presentation
{
	/// <summary>
	/// Represents the manager used to create presenters.
	/// </summary>
	public class PresentationManager
	{
		private IPresenterCreator _builder = null;
		private IPresentationDiscoveryStrategy _discoveryStrategy = null;
		private IDependencyResolver _resolver = null;
		private ModelInjectionManager _register = null;

		#region " Events "

		/// <summary>
		/// Fires when the presenter is created, but not yet returned from the caller.
		/// </summary>
		public static event PresenterEventHandler PresenterFound;

		#endregion

		#region " Constructors "

		private PresentationManager() { }

		#endregion

		#region " Methods "

		/// <summary>
		/// Creates an instance of the presentation manager.
		/// </summary>
		/// <returns>The manager.</returns>
		public static PresentationManager Create()
		{
			return new PresentationManager();
		}

		/// <summary>
		/// Creates an instance of the presentation manager using a builder of type <see cref="IPresenterCreator"/>.
		/// </summary>
		/// <param name="builder">The builder used to create the presenter.</param>
		/// <returns>The manager.</returns>
		public static PresentationManager Create(PresenterOptions options)
		{
			if (options == null)
				throw new ArgumentNullException("options");

			PresentationManager mgr = new PresentationManager();
			mgr._builder = options.Creator;
			mgr._discoveryStrategy = options.DiscoveryStrategy;
			mgr._resolver = options.Resolver;
			return mgr;
		}

		private IPresenter CreatePresenter(Type presenterType, IView view, IPresenterCreator creator)
		{
			return ((creator != null)
				? creator.Create(presenterType, view)
				: Activator.CreateInstance(presenterType, new object[] { view })) as IPresenter;
		}

		private void Initialize(IPresenter presenter)
		{
			if (_resolver == null)
				return;

			var initializer = _resolver.GetDependency<IPresenterInitializer>();
			if (initializer == null)
				return;

			initializer.Initialize(presenter);
		}

		/// <summary>
		/// Loads the presenter mapped to the view.  Currently, this process looks for a <see cref="PresenterBindingAttribute"/> definition.
		/// </summary>
		/// <param name="view">The view to load the presenter for.</param>
		/// <returns>The presenter that was mapped, or null if nothing was found.</returns>
		public IPresenter Load(IView view)
		{
			if (_discoveryStrategy == null)
				_discoveryStrategy = new DefaultPresentationDiscoveryStrategy();

			//PresenterBindingAttribute presenterBinding = view.GetType().GetCustomAttribute<PresenterBindingAttribute>(true);
			//if (presenterBinding == null)
			//    return null;

			//Type presenterType = presenterBinding.GetPresenterType();
			//if (presenterType == null)
			//    return null;

			Type presenterType = _discoveryStrategy.FindPresenterType(new DiscoveryOptions { View = view });
			if (presenterType == null) return null;

			IPresenter presenter = this.CreatePresenter(presenterType, view, _builder);
			if (presenter == null) return null;

			this.Initialize(presenter);

			OnPresenterFound(this, presenter, view);
			return presenter;
		}

		/// <summary>
		/// Loads the presenter with the associated view.
		/// </summary>
		/// <typeparam name="TPresenter">The type of presenter to load.</typeparam>
		/// <param name="view">The view to pass to the presenter.</param>
		/// <returns>The loaded presenter.</returns>
		/// <example>
		/// var presenter = PresenterManager.Create().Load<MyPresenter>(myView);
		/// </example>
		public TPresenter Load<TPresenter>(IView view)
			where TPresenter : IPresenter
		{
			TPresenter presenter = (TPresenter)this.Load(typeof(TPresenter), view);

			return presenter;
		}

		/// <summary>
		/// Loads the presenter with the associated view.
		/// </summary>
		/// <typeparam name="TPresenter">The type of presenter to load.</typeparam>
		/// <typeparam name="TView">The type of view to load.</typeparam>
		/// <param name="view">The view to pass to the presenter.</param>
		/// <returns>The loaded presenter.</returns>
		/// <example>
		/// var presenter = PresenterManager.Create().Load<MyPresenter>(myView);
		/// </example>
		public TPresenter Load<TPresenter, TView>(TView view)
			where TPresenter: IPresenter<TView>
			where TView: IView
		{
			TPresenter presenter = (TPresenter)this.Load(typeof(TPresenter), view);

			return presenter;
		}

		/// <summary>
		/// Loads the presenter with the associated view.
		/// </summary>
		/// <param name="presenterType">The type of presenter to create.</param>
		/// <param name="view">The view to pass to the presenter.</param>
		/// <returns>The loaded presenter.</returns>
		/// <example>
		/// var presenter = PresenterManager.Create().Load<MyPresenter>(myView);
		/// </example>
		public IPresenter Load(Type presenterType, object view)
		{
			IPresenter presenter = this.CreatePresenter(presenterType, (IView)view, _builder);

			OnPresenterFound(this, presenter, (IView)view);

			return presenter;
		}

		protected static void OnPresenterFound(PresentationManager manager, IPresenter presenter, IView view)
		{
			if (PresenterFound != null)
				PresenterFound(manager, new PresenterEventArgs(presenter, view));
		}

		#endregion
	}
}


text:
import * as JSON from './JSON'
import * as JSONRecovery from './JSONRecovery'
import * as Brainfuck from './Brainfuck'
import * as Expressions from './Expressions'

let LAST_USED = {
  name: '',
  grammar: localStorage.getItem('__grammar') || JSON.grammar,
  example: localStorage.getItem('__example') || JSON.example
}

export default [
  LAST_USED,
  JSON,
  JSONRecovery,
  Brainfuck,
  Expressions
]


text:
if __name__ == '__main__':
    import sys
    received = sys.argv[1]
    if received.find("show error") >= 0:
        print "ERROR: bla bla bla"
    elif received.find("show stderr") >= 0:
        print >> sys.stderr, "bla bla bla"
    elif received.find("return -1") >= 0:
        sys.exit(-1)


text:
function Controller() {
    require("alloy/controllers/BaseController").call(this);
    var $ = this, exports = {};
    _.extend($, $.__views), _.extend($, exports);
}

var Alloy = require("alloy"), Backbone = Alloy.Backbone, _ = Alloy._, A$ = Alloy.A;

module.exports = Controller;


text:
package org.springframework.boot.autoconfigure.jersey;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.ws.rs.ApplicationPath;
import javax.ws.rs.GET;
import javax.ws.rs.Path;

import org.glassfish.jersey.server.ResourceConfig;
import org.junit.Test;
import org.junit.runner.RunWith;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
import org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration;
import org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.client.RestTemplate;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * Tests for {@link JerseyAutoConfiguration} with a ObjectMapper.
 *
 * @author Eddú Meléndez
 */
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@DirtiesContext
public class JerseyAutoConfigurationObjectMapperProviderTests {

	@Autowired
	private RestTemplate restTemplate;

	@Test
	public void contextLoads() {
		ResponseEntity<String> response = this.restTemplate.getForEntity("/rest/message",
				String.class);
		assertThat(HttpStatus.OK).isEqualTo(response.getStatusCode());
		assertThat("{\"subject\":\"Jersey\",\"body\":null}")
				.isEqualTo(response.getBody());
	}

	@MinimalWebConfiguration
	@ApplicationPath("/rest")
	@Path("/message")
	public static class Application extends ResourceConfig {

		@GET
		public Message message() {
			return new Message("Jersey", null);
		}

		public Application() {
			register(Application.class);
		}

		public static void main(String[] args) {
			SpringApplication.run(Application.class, args);
		}

	}

	public static class Message {

		private String subject;

		private String body;

		public Message() {

		}

		public Message(String subject, String body) {
			this.subject = subject;
			this.body = body;
		}

		public String getSubject() {
			return this.subject;
		}

		public void setSubject(String subject) {
			this.subject = subject;
		}

		public String getBody() {
			return this.body;
		}

		public void setBody(String body) {
			this.body = body;
		}

	}

	@Target(ElementType.TYPE)
	@Retention(RetentionPolicy.RUNTIME)
	@Documented
	@Configuration
	@Import({ EmbeddedServletContainerAutoConfiguration.class,
			JacksonAutoConfiguration.class, ServerPropertiesAutoConfiguration.class,
			JerseyAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class })
	protected @interface MinimalWebConfiguration {

	}

}


text:
<?php

require_once __DIR__ . "/../../../src/FluentAssertionsTestCase.php";

class BeObjectTest extends FluentAssertionsTestCase
{
    /**
     * @expectedException        FluentAssertionException
     * @expectedExceptionMessage Expected true to be of type object
     */
    public function testBool()
    {
        $this->assert(true)->should()->beObject();
    }

    /**
     * @expectedException        FluentAssertionException
     * @expectedExceptionMessage Expected 1 to be of type object
     */
    public function testIntOne()
    {
        $this->assert(1)->should()->beObject();
    }

    /**
     * @expectedException        FluentAssertionException
     * @expectedExceptionMessage Expected 3.14 to be of type object
     */
    public function testFloat()
    {
        $this->assert(3.14)->should()->beObject();
    }

    /**
     * @expectedException        FluentAssertionException
     * @expectedExceptionMessage Expected "nevada" to be of type object
     */
    public function testString()
    {
        $this->assert("nevada")->should()->beObject();
    }

    /**
     * @expectedException        FluentAssertionException
     * @expectedExceptionMessage Expected array to be of type object
     */
    public function testArray()
    {
        $this->assert(array("1st", "2nd"))->should()->beObject();
    }

    /**
     * @expectedException        FluentAssertionException
     * @expectedExceptionMessage Expected null to be of type object
     */
    public function testNull()
    {
        $this->assert(null)->should()->beObject();
    }

    // TODO -- Handle testing resources
    // public function testResource()
    // {
    //     $this->assert(null)->should()->be(null);
    // }

    /**
     * @expectedException        FluentAssertionException
     * @expectedExceptionMessage Expected callable to be of type object
     */
    public function testCallable()
    {
        $data = function() { return "test"; };
        $this->assert($data)->should()->beObject();
    }

    public function testObject()
    {
        $data = new stdClass();
        $this->assert($data)->should()->beObject();
    }
}


text:
using System;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using SampleProject.Domain.Customers;
using SampleProject.Domain.Customers.Orders;
using SampleProject.Infrastructure.Database;
using SampleProject.Infrastructure.SeedWork;

namespace SampleProject.Infrastructure.Domain.Customers
{
    public class CustomerRepository : ICustomerRepository
    {
        private readonly OrdersContext _context;

        public CustomerRepository(OrdersContext context)
        {
            this._context = context ?? throw new ArgumentNullException(nameof(context));
        }

        public async Task AddAsync(Customer customer)
        {
            await this._context.Customers.AddAsync(customer);
        }

        public async Task<Customer> GetByIdAsync(CustomerId id)
        {
            return await this._context.Customers
                .IncludePaths(
                    CustomerEntityTypeConfiguration.OrdersList,
                    CustomerEntityTypeConfiguration.OrderProducts)
                .SingleAsync(x => x.Id == id);
        }
    }
}


text:
package org.wso2.carbon.user.mgt.multiplecredentials;

import org.wso2.carbon.user.core.multiplecredentials.Credential;
import org.wso2.carbon.user.mgt.common.ClaimValue;
import org.wso2.carbon.user.mgt.common.MultipleCredentialsUserAdminException;

public class MultipleCredentialsUserAdmin {

    public void addUserWithUserId(String userId, Credential credential, String[] roleList, ClaimValue[] claims,
                        String profileName) throws MultipleCredentialsUserAdminException {
        MultipleCredentialsUserProxy multipleCredentialsUserProxy =
                new MultipleCredentialsUserProxy();
        multipleCredentialsUserProxy.addUser(userId, credential, roleList, claims, profileName);
    }

    public String getUserId(Credential credential) throws MultipleCredentialsUserAdminException {
        MultipleCredentialsUserProxy multipleCredentialsUserProxy =
                new MultipleCredentialsUserProxy();
        return multipleCredentialsUserProxy.getUserId(credential);
    }

    /**
	 *
	 * @param credential
	 * @param roleList
	 * @param claims
	 * @param profileName
	 * @throws MultipleCredentialsUserAdminException
	 */
	public void addUser(Credential credential, String[] roleList, ClaimValue[] claims,
	                    String profileName) throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		multipleCredentialsUserProxy.addUser(credential, roleList, claims, profileName);
	}

	/**
	 *
	 * @param credential
	 * @param roleList
	 * @param claims
	 * @param profileName
	 * @throws MultipleCredentialsUserAdminException
	 */
	public void addUsers(Credential[] credential, String[] roleList, ClaimValue[] claims,
	                     String profileName) throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		multipleCredentialsUserProxy.addUsers(credential, roleList, claims, profileName);
	}

	/**
	 *
	 * @param identifier
	 * @param credentialType
	 * @throws MultipleCredentialsUserAdminException
	 */
	public void deleteUser(String identifier, String credentialType)
	                                                                throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		multipleCredentialsUserProxy.deleteUser(identifier, credentialType);
	}

	/**
	 *
	 * @param anIdentifier
	 * @param credentialType
	 * @param credential
	 * @throws MultipleCredentialsUserAdminException
	 */
	public void addCredential(String anIdentifier, String credentialType, Credential credential)
	                                                                               throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		multipleCredentialsUserProxy.addCredential(anIdentifier, credentialType, credential);
	}

	/**
	 *
	 * @param identifier
	 * @param credentialType
	 * @param credential
	 * @throws MultipleCredentialsUserAdminException
	 */
	public void updateCredential(String identifier, String credentialType, Credential credential)
	                                                                               throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		multipleCredentialsUserProxy.updateCredential(identifier, credentialType, credential);
	}

	// public void updateCredentialByUser(Credential credential) throws
	// MultipleCredentialsUserAdminException {
	// MultipleCredentialsUserProxy multipleCredentialsUserProxy = new
	// MultipleCredentialsUserProxy(super.getUserRealm());
	// multipleCredentialsUserProxy.updateCredentialByUser(credential);
	// }

	/**
	 *
	 * @param identifier
	 * @param credentialType
	 * @throws MultipleCredentialsUserAdminException
	 */
	public void deleteCredential(String identifier, String credentialType)
	                                                                      throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		multipleCredentialsUserProxy.deleteCredential(identifier, credentialType);
	}

	/**
	 *
	 * @param anIdentifier
	 * @param credentialType
	 * @return
	 * @throws MultipleCredentialsUserAdminException
	 */
	public Credential[] getCredentials(String anIdentifier, String credentialType)
	                                                                              throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		return multipleCredentialsUserProxy.getCredentials(anIdentifier, credentialType);
	}

	/**
	 *
	 * @param credential
	 * @return
	 * @throws MultipleCredentialsUserAdminException
	 */
	public boolean authenticate(Credential credential) throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		return multipleCredentialsUserProxy.authenticate(credential);
	}

	public void setUserClaimValue(String identifer, String credentialType, String claimURI, String claimValue,
	                              String profileName) throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		multipleCredentialsUserProxy.setUserClaimValue(identifer, credentialType, claimURI, claimValue, profileName);
	}

	public void setUserClaimValues(String identifer, String credentialType, ClaimValue[] claims, String profileName)
	                                                                               throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		multipleCredentialsUserProxy.setUserClaimValues(identifer, credentialType, claims, profileName);
	}

	public void deleteUserClaimValue(String identifer, String credentialType, String claimURI, String profileName)
	                                                                               throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		multipleCredentialsUserProxy.deleteUserClaimValue(identifer, credentialType, claimURI, profileName);
	}

	public void deleteUserClaimValues(String identifer, String credentialType, String[] claims, String profileName)
	                                                                               throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		multipleCredentialsUserProxy.deleteUserClaimValues(identifer, credentialType, claims, profileName);
	}

	public String getUserClaimValue(String identifer, String credentialType, String claimUri, String profileName)
	                                                                               throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		return multipleCredentialsUserProxy.getUserClaimValue(identifer, credentialType,
                                                              claimUri, profileName);

	}

	public ClaimValue[] getUserClaimValues(String identifer, String credentialType, String[] claims, String profileName)
	                                                                               throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		return multipleCredentialsUserProxy.getUserClaimValues(identifer, credentialType,
                                                               claims, profileName);

	}

	public ClaimValue[] getAllUserClaimValues(String identifer, String credentialType, String profileName)
	                                                                           throws MultipleCredentialsUserAdminException {
		MultipleCredentialsUserProxy multipleCredentialsUserProxy =
		                                                            new MultipleCredentialsUserProxy();
		return multipleCredentialsUserProxy.getAllUserClaimValues(identifer, credentialType,
                                                                  profileName);

	}

}


text:
"""
Verifies libraries (in link_settings) are properly found.
"""

import TestGyp

import sys

if sys.platform == 'darwin':
  test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])

  test.run_gyp('subdir/test.gyp', chdir='libraries')

  test.build('subdir/test.gyp', test.ALL, chdir='libraries')

  test.pass_test()


text:
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-comp-4466',
  templateUrl: './comp-4466.component.html',
  styleUrls: ['./comp-4466.component.css']
})
export class Comp4466Component implements OnInit {

  constructor() { }

  ngOnInit() {
  }

}


text:
<?php

use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model app\models\AttributeModel */

$this->title = 'Create Attribute Model';
$this->params['breadcrumbs'][] = ['label' => 'Attribute Models', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?= Html::encode($this->title) ?>

    <?= $this->render('_form', [
        'model' => $model,
    ]) ?>


text:
from collections import OrderedDict

from mmcv.runner import get_dist_info
from mmcv.runner.hooks import HOOKS, Hook
from torch import nn

from ..utils.dist_utils import all_reduce_dict

def get_norm_states(module):
    async_norm_states = OrderedDict()
    for name, child in module.named_modules():
        if isinstance(child, nn.modules.batchnorm._NormBase):
            for k, v in child.state_dict().items():
                async_norm_states['.'.join([name, k])] = v
    return async_norm_states

@HOOKS.register_module()
class SyncNormHook(Hook):
    """Synchronize Norm states after training epoch, currently used in YOLOX.

    Args:
        num_last_epochs (int): The number of latter epochs in the end of the
            training to switch to synchronizing norm interval. Default: 15.
        interval (int): Synchronizing norm interval. Default: 1.
    """

    def __init__(self, num_last_epochs=15, interval=1):
        self.interval = interval
        self.num_last_epochs = num_last_epochs

    def before_train_epoch(self, runner):
        epoch = runner.epoch
        if (epoch + 1) == runner.max_epochs - self.num_last_epochs:
            # Synchronize norm every epoch.
            self.interval = 1

    def after_train_epoch(self, runner):
        """Synchronizing norm."""
        epoch = runner.epoch
        module = runner.model
        if (epoch + 1) % self.interval == 0:
            _, world_size = get_dist_info()
            if world_size == 1:
                return
            norm_states = get_norm_states(module)
            if len(norm_states) == 0:
                return
            norm_states = all_reduce_dict(norm_states, op='mean')
            module.load_state_dict(norm_states, strict=False)


text:
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("Microsoft Azure Powershell - NotificationHubs")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure Powershell")]
[assembly: AssemblyCopyright("Copyright © Microsoft")]

[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: Guid("9e93b969-6685-4a67-b07d-cfd5ebd0091e")]
[assembly: AssemblyVersion("2.1.0")]
[assembly: AssemblyFileVersion("2.1.0")]
#if SIGN
[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.NotificationHubs.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
#else
[assembly: InternalsVisibleTo("Microsoft.Azure.Commands.NotificationHubs.Test")]
#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:s="urn:java:ee"
    xmlns:weld="http://jboss.org/schema/weld/beans"
    xmlns:security="urn:java:org.jboss.seam.security"
    xmlns:guvnorRepository="urn:java:org.drools.guvnor.server.repository"
    xmlns:guvnorSecurity="urn:java:org.drools.guvnor.server.security"
    xsi:schemaLocation="
        http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd
        http://jboss.org/schema/weld/beans http://jboss.org/schema/weld/beans_1_1.xsd">

  <guvnorRepository:GuvnorBootstrapConfiguration>
    <s:modifies/>

    <!-- JackRabbit  -->
    <guvnorRepository:properties>
      <s:entry><s:key>org.drools.repository.configurator</s:key><s:value>org.drools.repository.jackrabbit.JackrabbitRepositoryConfigurator</s:value></s:entry>
      <!--  the root directory for the repo storage the directory must exist. -->
      <!--<s:entry><s:key>repository.root.directory</s:key><s:value>/opt/yourpath</s:value></s:entry>-->
    </guvnorRepository:properties>

    <!-- ModeShape -->
    <!--
      passwords for the background users (logInAdmin and mailman), these need to match the setting
      you provided for JAAS (used by ModeShape only).
    -->
    <!--<guvnorRepository:properties>-->
      <!--<s:entry><s:key>org.drools.repository.configurator</s:key><s:value>org.drools.repository.modeshape.ModeShapeRepositoryConfigurator</s:value></s:entry>-->
      <!--<s:entry><s:key>org.modeshape.jcr.URL</s:key><s:value>jndi:jcr/local?repositoryName=brms</s:value></s:entry>-->
      <!--<s:entry><s:key>org.drools.repository.secure.passwords</s:key><s:value>false</s:value></s:entry>-->
      <!--<s:entry><s:key>org.drools.repository.logInAdmin.password</s:key><s:value>logInAdmin</s:value></s:entry>-->
      <!--<s:entry><s:key>org.drools.repository.mailman.password</s:key><s:value>mailman</s:value></s:entry>-->
    <!--</guvnorRepository:properties>-->

  </guvnorRepository:GuvnorBootstrapConfiguration>

  <security:IdentityImpl>
    <s:modifies/>

    <!-- No real authentication: demo authentication for demo purposes -->
    <security:authenticatorClass>org.drools.guvnor.server.security.DemoAuthenticator</security:authenticatorClass>

    <!-- JAAS based authentication -->
    <!--<security:authenticatorName>jaasAuthenticator</security:authenticatorName>-->

    <!-- IDM based authentication (supports LDAP, see Seam 3 and PicketLink IDM documentation) -->
    <!--<security:authenticatorClass>org.jboss.seam.security.management.IdmAuthenticator</security:authenticator>-->
  </security:IdentityImpl>

  <!--<security:jaas.JaasAuthenticator>-->
    <!--<s:modifies/>-->
    <!--
      The following one will use the jaas configuration called "other",
      which in jboss AS means you can use properties files for users.
    -->
    <!--<jaasConfigName>other</jaasConfigName>-->
  <!--</security:jaas.JaasAuthenticator>-->

  <!-- SECURITY AUTHORIZATION CONFIGURATION -->
  <!--
      This is used to enable or disable role-based authorization. By default it is disabled.
  -->
  <!--<guvnorSecurity:RoleBasedPermissionResolver>-->
    <!--<s:modifies/>-->
    <!--<guvnorSecurity:enableRoleBasedAuthorization>true</guvnorSecurity:enableRoleBasedAuthorization>-->
  <!--</guvnorSecurity:RoleBasedPermissionResolver>-->

  <weld:scan>
    <!-- Disable the seam-security by drools rules -->
    <weld:exclude name="org.jboss.seam.security.permission.RuleBasedPermissionResolver"/>
    <!-- TODO remove me when GUVNOR-1196 is fixed -->
    <weld:exclude name="org.drools.guvnor.gwtutil.**"/>
    <weld:exclude name="org.drools.guvnor.client.**"/>
  </weld:scan>

</beans>


text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="HandheldFriendly" content="true" />
  <link rel="shortcut icon" href="https://www.epa.gov/sites/all/themes/epa/favicon.ico" type="image/vnd.microsoft.icon" />
  <meta name="MobileOptimized" content="width" />
  <meta http-equiv="cleartype" content="on" />
  <meta http-equiv="ImageToolbar" content="false" />
  <meta name="viewport" content="width=device-width" />
  <meta name="version" content="20161218" />

  <meta name="DC.description" content="" />
  <meta name="DC.title" content="" />
  <title>
  Groundwater Remediation through Environmental Biotechnology: Transgenic Phytoremediation of Methyl Tertiary Butyl Ether|

  Research Project Database | Grantee Research Project | ORD | US EPA</title>

  <meta name="keywords" content="" />
  <link rel="shortlink" href="" />
  <link rel="canonical" href="" />
  <meta name="DC.creator" content="" />
  <meta name="DC.language" content="en" />
  <meta name="DC.Subject.epachannel" content="" />
  <meta name="DC.type" content="" />
  <meta name="DC.date.created" content="" />
  <meta name="DC.date.modified" content="2004-06-16" />

  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/misc/ui/jquery.ui.autocomplete.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/themes/epa/css/lib/jquery.ui.theme.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/libraries/template2/s.css" media="all" />

	<link rel="alternate" type="application/atom+xml" title="EPA.gov All Press Releases" href="https://www.epa.gov/newsreleases/search/rss" />
	<link rel="alternate" type="application/atom+xml" title="EPA.gov Headquarters Press Releases" href="https://www.epa.gov/newsreleases/search/rss/field_press_office/headquarters" />
	<link rel="alternate" type="application/atom+xml" title="Greenversations, EPA's Blog" href="https://blog.epa.gov/blog/feed/" />

Jump to main content

  <hgroup class="site-name-and-slogan">

US EPA

United States Environmental Protection Agency

  </hgroup>
  <form class="epa-search" method="get" action="https://search.epa.gov/epasearch/epasearch">
    Search
    <input class="form-text" placeholder="Search EPA.gov" name="querytext" id="search-box" value=""/>
    <button class="epa-search-button" id="search-button" type="submit" title="Search">Search</button>
    <input type="hidden" name="fld" value="" />
    <input type="hidden" name="areaname" value="" />
    <input type="hidden" name="areacontacts" value="" />
    <input type="hidden" name="areasearchurl" value="" />
    <input type="hidden" name="typeofsearch" value="epa" />
    <input type="hidden" name="result_template" value="2col.ftl" />
    <input type="hidden" name="filter" value="sample4filt.hts" />
  </form>

Contact Us

Related Information

Research Grants

P3: Student Design Competition

Research Fellowships

Small Business Innovation Research (SBIR)

Grantee Research Project Results Search

      Groundwater Remediation through Environmental Biotechnology: Transgenic Phytoremediation of Methyl Tertiary Butyl Ether

    EPA Grant Number: U916152

    Title: Groundwater Remediation through Environmental Biotechnology: Transgenic Phytoremediation of Methyl Tertiary Butyl Ether

    Investigators:
     Skinner, Kristin M.

    Institution:

      Oregon State University

    	EPA Project Officer:

           Jones, Brandon

      Project Period:
      January 1, 2003 through
        January 1, 2006

        Project Amount:

          $105,983

      RFA:
      STAR Graduate Fellowships (2003)

          Recipients Lists

      Research Category:

          Fellowship - Environmental Engineering
          ,
          Academic Fellowships
          ,
          Engineering and Environmental Chemistry

Objective:

The objectives of this research project are
  to design and characterize a transgenic phytoremediation system for the attenuation
  of the fuel additive
  methyl tertiary-butyl ether (MtBE) and other recalcitrant environmental pollutants
from contaminated groundwater.

Approach:

A filamentous fungus, Graphium sp. cometabolizes
  MtBE. A cytochrome P450 propane monooxygenase (PMO) is thought to be responsible
  for this activity
  in Graphium sp. The gene encoding this protein will be heterologously expressed
  in an alternate fungus to demonstrate function and to determine the substrate
  range of the cytochrome P450 PMO. Once proof of function is established, the
  cytochrome P450 PMO will be transformed into plants using established Agrobacterium
  tumefaciens transformation techniques. Kanamycin-resistant tobacco plants will
  be transferred to soil and grown in a growth chamber. Reverse transcriptase-polymerase
  chain reaction will be used to determine if the cytochrome P450 PMO gene is
  transcriptionally active. Transformed tobacco plants that demonstrate high
  levels of expression will be evaluated further in subsequent microcosm tests.
  Although it ultimately will be necessary to tranform the cytochrome P450 PMO
  into poplar hybrids, a plant that is practical for phytoremediation, proof
  of concept and modeling experiments will be conducted initially in tobacco.
  Transgenic and null vector individuals will be grown under greenhouse conditions
  that mimic the presence of groundwater. Aqueous concentrations of MtBE will
  be monitored with a gas chromatograph to determine specific kinetic parameters
  including rates of reaction and the limiting concentration at which MtBE can
  be taken up and transformed. Similar assays with radiolabeled MtBE will establish
  the metabolic fate of MtBE and MtBE oxidation products in transgenic plants.
  This work is expected to generate an innovative and inexpensive system for
  the removal of recalcitrant chemicals from contaminated groundwater.

Supplemental Keywords:

      fellowship, methyl tertiary-butyl ether, MtBE, cytochrome P450 propane monooxygenase, PMO, Graphium sp., Agrobacterium tumefaciens, recalcitrant chemicals, groundwater remediation, transgenic phytoremediation., RFA, Scientific Discipline, Water, Biochemistry, Bioremediation, Ecology and Ecosystems, Environmental Engineering, biodegradation, MTBE, aquatic restoration, cometabolism, biotransformation, phytoremediation, Graphium sp

Relevant Websites:

2004 STAR Graduate Fellowship Conference Poster (PDF, 1p., 82KB, about PDF)

Top of Page

 The perspectives, information and conclusions conveyed in research project abstracts, progress reports, final reports, journal abstracts and journal publications convey the viewpoints of the principal investigator and may not represent the views and policies of ORD and EPA.  Conclusions drawn by the principal investigators have not been reviewed by the Agency.

Main menu

Environmental Topics

Laws & Regulations

About EPA

Discover.

Accessibility

EPA Administrator

Budget & Performance

Contracting

Grants

No FEAR Act Data

Privacy and Security

Connect.

Data.gov

Inspector General

Jobs

Newsroom

Open Government

Regulations.gov

Subscribe

USA.gov

White House

Ask.

Contact Us

Hotlines

FOIA Requests

Frequent Questions

Follow.

Facebook

Twitter

YouTube

Flickr

Instagram

Last updated on Wednesday, June 16, 2004


text:
#!/usr/bin/env python3.2

import http.client

#class InvalidResponse(http.client.HTTPException):
#    """ Exception raised when the Closure Compilder URL
#        returned an HTTP return code other than 200 """
#    def __init__(self, code, message):
#        self.code = code
#        self.message = message

#    def __str__(self):
#        return "%s : %s" % (self.code, self.message)

# That kinda sucks (see notes about the state var in ClosureResult's constructor)... Better idea anyone ?
class _Namespace: pass

class ServerError(http.client.HTTPException):
    """ Exception raised when the Closure Compiler
        returned a server error

        """
    def __init__(self, data):
        self.errors = data

class ClosureMessage:
    """ Represents a message sent by the Closure Compiler """
    def __init__(self, line, char, description, text, id, file, is_error):
        self.line = line
        self.char = char
        self.description = description
        self.text = text
        self.id = id
        self.file = file
        self.is_error = is_error

    def __str__(self):
        char_marker = ''.join(' ' for i in range(self.char)) + '^'
        return """%s: %s at line %d character %d\n%s\n%s""" % (self.id, self.description, self.line, self.char, self.text, char_marker)

class ClosureResult:
    """ Contains the Closure Compiler output, returned by
        a call to the compile method

        """
    def __init__(self, closure_message):
        import xml.parsers.expat

        # Initialize state
        self.errors = []
        self.warnings = []
        self.compiled_code = None
        self.original_size = 0
        self.compressed_size = 0
        self.compile_time = 0

        # Reading state holders
        # Here I made this state object so xmlstart can modify
        # current_section_type without creating its own local value
        # I don't really like creating a class just for that purpose,
        # but I don't see any other way yet
        state = _Namespace()
        state.current_section_type = None
        state.current_section_attrs = None
        state.server_error = False
        state.server_errors_list = []

        # XML handler functions
        def xmlstart(name, attrs):
            state.current_section_type = name
            state.current_section_attrs = attrs

        def xmlcontent(text):
            if state.current_section_type == "error":
                if state.server_error:
                    state.server_errors_list.append(state.current_section_attrs['code'], text)
                else:
                    csa = state.current_section_attrs
                    self.errors.append(ClosureMessage(
                        int(csa["lineno"]),
                        int(state.current_section_attrs['charno']),
                        text,
                        state.current_section_attrs['line'],
                        state.current_section_attrs['type'],
                        state.current_section_attrs['file'],
                        True))
            elif state.current_section_type == "warning":
                self.warnings.append(ClosureMessage(
                    int(state.current_section_attrs["lineno"]),
                    int(state.current_section_attrs['charno']),
                    text,
                    state.current_section_attrs['line'],
                    state.current_section_attrs['type'],
                    state.current_section_attrs['file'],
                    False))
            elif state.current_section_type == "compiledCode":
                self.compiled_code = self.compiled_code or ''
                self.compiled_code += text
            elif state.current_section_type == "serverErrors":
                state.server_error = True
            elif state.current_section_type == "originalSize":
                self.original_size = int(text)
            elif state.current_section_type == "compressedSize":
                self.compressed_size = int(text)
            elif state.current_section_type == "compileTime":
                self.compile_time = int(text)

        #self.section_managers[state.current_section_type](text)

        if state.server_error:
            raise ServerError(state.server_errors_list)

        parser = xml.parsers.expat.ParserCreate()

        parser.StartElementHandler = xmlstart
        parser.CharacterDataHandler = xmlcontent

        parser.Parse(closure_message)

def compile(files, debug=False):
    """ Shrinks the specified list of Javascript files into a single one.

        If the debug parameter is false, the script is processed by Google's
        Closure Compiler service, with a SIMPLE_OPTIMIZATIONS compilation level.

        If the debug parameter is True, then the files will only be joined
        without any minimizing. This was made to allow easier debugging during
        the developpement process. Note that this will still call the Closure
        Compiler service in order to get the statistics, warnings and errors.
        The compiled script, however, will not be the script minimized by
        the compiler.

        """
    import urllib.parse
    import urllib.request

    if isinstance(files, str):
        files = files,

    # Static parameters
    params = [("compilation_level", "SIMPLE_OPTIMIZATIONS"),
        ("output_format", "xml"), ("output_info", "errors"),
        ("output_info", "warnings"), ("output_info", "compiled_code"), \
        ("output_info", "statistics")]
    # Source files
    params.extend(("js_code", open(f).read()) for f in files)
    params = urllib.parse.urlencode(params)
    params = params.encode('utf-8');

    # Setting up the request
    response = urllib.request.urlopen("http://closure-compiler.appspot.com/compile", params)

    result = ClosureResult(response.read().decode('utf-8'))

    if not result.errors and debug:
        result.compiled_code = ''.join(open(f).read() for f in files)

    return result


text:
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="@color/Gray">
    <item>
        <color android:color="@color/White" />
    </item>
    <item>
        <color android:color="@color/White" />
    </item>
</ripple>


text:
dnCita (do not click in this area) prevents clicks in one or multiple areas of your choice.

Verifies the coordinates of the click, whether they are in a predetermined non-clickable area to perform this or not.

----

Designed for Diablo 3 without thinking of the hardcore community. ;-)

I hope it will save some hc characters in future.


text:
/// <reference path="../_all.ts" />
var app;
(function (app) {
    angular.module('app.core').config(toastrConfig);
    toastrConfig.$inject = ['toastr'];
    function toastrConfig(toastr) {
        toastr.options.timeOut = 4000;
        toastr.options.positionClass = 'toast-bottom-right';
    }

    var config = {
        appTitle: 'Angular Typescript Template',
        version: '1.0.0'
    };
    angular.module('app.core').value('config', config);

    angular.module('app.core').config(configureTranslation);
    configureTranslation.$inject = ['$i18nextProvider'];
    function configureTranslation($i18nextProvider) {
        $i18nextProvider.options = {
            lng: 'en-US',
            useCookie: false,
            //cookieName: 'lang',  /* default 'i18next' */
            useLocalStorage: false,
            //localStorageExpirationTime: 86400000, // in ms, default 1 week
            //preload: ['de-DE', 'fr'],
            fallbackLng: 'dev',
            lowerCaseLng: true,
            //dynamicLoad: false,
            getAsync: true,
            resGetPath: '/api/translate/__lng__/',
            defaultLoadingValue: ''
        };
    }
})(app || (app = {}));
//# sourceMappingURL=config.js.map


text:
PocApp.module("LoginApp.Show", function (Show, App, Backbone, Marionette, $, _) {

    Show.Controller = {
        showLogin: function() {
            var loginView = new Show.Login();

            loginView.on("signin:button:clicked", function(){
                var data = Backbone.Syphon.serialize(loginView);
                PocApp.commands.execute("user:signin", data);
            });

            App.mainRegion.show(loginView);
        }
    };
});


text:
#include "application_manager/event_engine/event_observer.h"
#include "application_manager/event_engine/event.h"

namespace application_manager {
namespace event_engine {

EventObserver::EventObserver()
 : id_(0) {
  //Get unique id based on this
  id_ = reinterpret_cast<unsigned long>(this);
}

EventObserver::~EventObserver() {
  unsubscribe_from_all_events();
}

void EventObserver::subscribe_on_event(const Event::EventID& event_id,
                                       int32_t hmi_correlation_id) {
  EventDispatcherImpl::instance()->add_observer(event_id, hmi_correlation_id, this);
}

void EventObserver::unsubscribe_from_event(const Event::EventID& event_id) {
  EventDispatcherImpl::instance()->remove_observer(event_id, this);
}

void EventObserver::unsubscribe_from_all_events() {
  EventDispatcherImpl::instance()->remove_observer(this);
}

}  // namespace event_engine
}  // namespace application_manager


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/html; charset=utf-8"/>
    <title>compound:svc</title>
    <link rel="root" href=""/>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/jquery-ui-redmond.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style-vis.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/hint.css"/>

          home

          edit page
          issue tracker

          <gcse:search></gcse:search>

        This page pertains to UD version 2.

            It appears that you have Javascript disabled.
            Please consider enabling Javascript for this page to see the visualizations.

compound:svc: serial compound verb

compound:svc marks compound verb constructs, in non-nominal complex predicates.
These typically consist of a non-finite verb and a semantically bleached finite verb,
although both verbs being finite is not impossible.
The relation is governed by the finite verb that controls the argument structure of the construct,
and the same finite verb also governs all relevant arguments.
If both verbs are finite, the finite verb that controls the argument structure is the head.
These verbs are also often the semantic heads of the clause.

तो पुस्तक वाचत राहिला . \n He book.NSG read-PPRS stayed-NSG .
compound:svc(राहिला, वाचत)
compound:svc(stayed-NSG, read-PPRS)
nsubj(राहिला, तो)
nsubj(stayed-NSG, He)

त्याला खुर्ची विकावी लागली . \n He chair.FSG sell-SUBJ-FSG attached-FSG .
compound:svc(लागली, विकावी)
compound:svc(attached-FSG, sell-SUBJ-FSG)
obj(विकावी, खुर्ची)
obj(sell-SUBJ-FSG, chair.FSG)

compound:svc in other languages:

[hy]

[mr]

[pa]

[pcm]

[swl]

[u]

[vi]

© 2014–2021
            Universal Dependencies contributors.
            Site powered by Annodoc and brat
.


text:
"use strict";

angular.module("authentication", []);
angular.module("home", []);
angular.module("header", []);
angular.module("communicationModule", []);
angular.module("profile", []);
angular.module("kml", []);
angular.module("lines", []);
angular.module('underDev', []);
angular.module('inspection', []);

var inspectionapp = angular.module('inspectionapp', [
    'ngAnimate',
    'ngResource',
    'ui.router',
    'oc.lazyLoad',
    'ngTable',
    'ngStorage',
    'ngMap',
    'ngCookies',
    'ngSanitize',
    'ngTouch',
    'ngMessages',
    'picardy.fontawesome',
    'ui.bootstrap',
    'ui.utils',
    'ngMask',
    'angular-loading-bar',
    'angular-momentjs',
    'FBAngular',
    'lazyModel',
    'angularBootstrapNavTree',
    'oc.lazyLoad',
    'ui.select',
    'ui.tree',
    'textAngular',
    'colorpicker.module',
    'angularFileUpload',
    'ngImgCrop',
    'datatables',
    'datatables.bootstrap',
    'datatables.colreorder',
    'datatables.colvis',
    'datatables.tabletools',
    'datatables.scroller',
    'datatables.columnfilter',
    'ui.grid',
    'ui.grid.resizeColumns',
    'ui.grid.edit',
    'ui.grid.moveColumns',
    'ngTable',
    'smart-table',
    'angular-flot',
    'angular-rickshaw',
    'easypiechart',
    'uiGmapgoogle-maps',
    'ui.calendar',
    'ngTagsInput',
    'pascalprecht.translate',
    'ngMaterial',
    'localytics.directives',
    'wu.masonry',
    'ipsum',
    'angular-intro',
    'dragularModule',
    'toastr',
    'angular-confirm',
    'authentication',
    'home',
    'communicationModule',
    "profile",
    'ngFileUpload',
    'ngImgCrop',
    'angularSpinner',
    'file-model',
    'header',
    'kml',
    'lines',
    'underDev',
    'inspection'

]).run(['$rootScope', '$state', '$stateParams', function($rootScope, $state, $stateParams) {
    $rootScope.$state = $state;
    $rootScope.$stateParams = $stateParams;
    $rootScope.$on('$stateChangeSuccess', function(event, toState) {

        event.targetScope.$watch('$viewContentLoaded', function() {

            angular.element('html, body, #content').animate({
                scrollTop: 0
            }, 200);

            setTimeout(function() {
                angular.element('#wrap').css('visibility', 'visible');

                if (!angular.element('.dropdown').hasClass('open')) {
                    angular.element('.dropdown').find('>ul').slideUp();
                }
            }, 200);
        });
        $rootScope.containerClass = toState.containerClass;
    });
}])

.config(['uiSelectConfig', function(uiSelectConfig) {
    uiSelectConfig.theme = 'bootstrap';
}])

inspectionapp.value('loggedUser', window.user);
inspectionapp.factory('basicAuthenticationInterceptor', ['$localStorage', function($localStorage) {
    var basicAuthenticationInterceptor = {
        request: function(config) {
            config.headers['Authorization'] = 'Bearer' + " " + window.user.myToken;
            // config.headers['Content-Type'] = headerConstants.json;
            config.headers['userAgent'] = headerConstants.agent;
            return config;
        }
    };
    return basicAuthenticationInterceptor;
}])

var checkloggedIn = function($q, $http, loggedUser, $state) {
    var deferred = $q.defer();
    $http.get(baseUrl + '/auth/getSession').then(function(res) {
        if (res.status == 200) {
            if (loggedUser.userType == userTypes.masterInspector || loggedUser.userType == userTypes.tlc) {
                deferred.resolve();
            } else {
                window.location.href = baseUrl + '/login';
                setTimeout(function() {
                    deferred.reject()
                }, 0);
            }

        } else {
            window.location.href = baseUrl + '/login';
            setTimeout(function() {
                deferred.reject()
            }, 0);
        }

        return deferred.promise;
    }, function(response) {
        window.location.href = baseUrl + '/login';
        setTimeout(function() {
            deferred.reject()
        }, 0);
    });
}

inspectionapp.config(['$controllerProvider', 'usSpinnerConfigProvider', function($controllerProvider, usSpinnerConfigProvider) {
        // this option might be handy for migrating old apps, but please don't use it
        // in new ones!
        $controllerProvider.allowGlobals();

    }])
    .config(['cfpLoadingBarProvider', function(cfpLoadingBarProvider) {
        cfpLoadingBarProvider.includeSpinner = false;
        cfpLoadingBarProvider.includeBar = false;
    }])

/* Configure ocLazyLoader(refer: https://github.com/ocombe/ocLazyLoad) */
inspectionapp.config(['$ocLazyLoadProvider', function($ocLazyLoadProvider) {
    $ocLazyLoadProvider.config({
        // global configs go here
        // debug:true,
        // events:true
    });

}]);

/* Toaster Settings  */
inspectionapp.config(function(toastrConfig) {
    angular.extend(toastrConfig, {
        autoDismiss: false,
        closeButton: true,
        containerId: 'toast-container',
        maxOpened: 0,
        newestOnTop: true,
        positionClass: 'toast-top-right',
        preventDuplicates: false,
        preventOpenDuplicates: true,
        target: 'body'
    });
});

//common function for lazy loading of controller and service files
function lazyLoadFiles(fileArray, angularModule) {
    return {
        loadModule: ['$ocLazyLoad', '$q', function($ocLazyLoad, $q) {
            var deferred = $q.defer();

            $ocLazyLoad.load({
                name: angularModule,
                files: fileArray
            }).then(function() {
                deferred.resolve();
            });
            return deferred.promise;
        }],
        logged_in: checkloggedIn
    };

}

inspectionapp.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$locationProvider', function($stateProvider, $urlRouterProvider, $httpProvider, $locationProvider) {

        $httpProvider.interceptors.push('basicAuthenticationInterceptor');

        $stateProvider
            .state('inspectionapp', {
                abstract: true,
                url: '/inspectionapp',
                templateUrl: '/modules/masterInspector/header/views/app.html',
                loginRequired: true,
                resolve: {
                    'logged_in': checkloggedIn
                }

            })
            .state('inspectionapp.404', {
                url: '/404',
                templateUrl: '/modules/authentication/views/404.html',
                loginRequired: true,
                resolve: {
                    'logged_in': checkloggedIn
                }

            }).state('inspectionapp.kml', {
                url: '/kml',
                template: '

'

            })
            .state('inspectionapp.lines', {
                url: '/lines',
                template: '

',
                loginRequired: true,
                resolve: {
                    'logged_in': checkloggedIn
                }
            })

        .state('inspectionapp.underDevelopment', {
                url: '/underDevelopment',
                templateUrl: '/modules/authentication/views/underDevelopment.html',
                loginRequired: true,
                resolve: {
                    'logged_in': checkloggedIn
                }

            })
            .state('inspectionapp.inspection', {
                url: '/inspection',
                template: '

',
                loginRequired: true,
                resolve: {
                    'logged_in': checkloggedIn
                }

            })
            .state("inspectionapp.home", {
                url: "/home",
                templateUrl: "/modules/masterInspector/home/views/home.html",
                controller: "homeController",
                loginRequired: true,
                resolve: lazyLoadFiles([
                    '/modules/masterInspector/home/service.js',
                    '/modules/masterInspector/home/controller.js',
                ], "home")

            })

        .state('inspectionapp.profile', {
            url: "/profile",
            templateUrl: '/modules/superAdmin/profile/views/profile.html',
            controller: 'profileCtrl',
            loginRequired: true,
            resolve: lazyLoadFiles([
                '/modules/superAdmin/profile/service.js',
                '/modules/superAdmin/profile/controller.js'
            ], "profile")

        })

        .state('inspectionapp.kml.listKmlFiles', {
                url: "/listKmlFiles",
                templateUrl: '/modules/superAdmin/kml/views/listKmlFiles.html',
                controller: 'kmlCtrl',
                loginRequired: true,
                resolve: lazyLoadFiles([
                    '/modules/superAdmin/kml/service.js',
                    '/modules/superAdmin/kml/controller.js'
                ], "kml")

            })
            .state('inspectionapp.lines.listAllLines', {
                url: "/listAllLines",
                templateUrl: '/modules/superAdmin/lines/views/listAllLines.html',
                controller: 'linesCtrl',
                loginRequired: true,
                resolve: lazyLoadFiles([
                    '/modules/superAdmin/lines/service.js',
                    '/modules/superAdmin/lines/controller.js'
                ], "lines")

            })

        .state('inspectionapp.lines.overlayLineMap', {
                url: "/overlayLineMap/:id",
                templateUrl: '/modules/superAdmin/lines/views/overlayLineMap.html',
                controller: 'overlayLineMapCtrl',
                loginRequired: true,
                resolve: lazyLoadFiles([
                    '/modules/superAdmin/lines/service.js',
                    '/modules/superAdmin/lines/controller.js'
                ], "lines")

            })
            .state('inspectionapp.lines.loadStructures', {
                url: "/loadStructures/:lineId",
                templateUrl: '/modules/superAdmin/lines/views/listStructures.html',
                controller: 'linesCtrl',
                loginRequired: true,
                resolve: lazyLoadFiles([
                    '/modules/superAdmin/lines/service.js',
                    '/modules/superAdmin/lines/controller.js'
                ], "lines")

            })
            .state('inspectionapp.kml.overlayAllLines', {
                url: "/overlayAllLines/:id/:fileType",
                templateUrl: '/modules/superAdmin/kml/views/overlayAllLines.html',
                controller: 'overlayAllLinesCtrl',
                loginRequired: true,
                resolve: lazyLoadFiles([
                    '/modules/superAdmin/kml/service.js',
                    '/modules/superAdmin/kml/controller.js'
                ], "kml")

            })

        .state('inspectionapp.inspection.listInspections', {
                url: "/listInspections",
                templateUrl: '/modules/masterInspector/inspection/views/listInspections.html',
                controller: 'inspectionCtrl',
                loginRequired: true,
                resolve: lazyLoadFiles([
                    '/modules/masterInspector/inspection/service.js',
                    '/modules/masterInspector/inspection/controller.js'
                ], "inspection")

            })
            .state('inspectionapp.inspection.lineInspection', {
                url: "/lineInspection/:id",
                templateUrl: '/modules/masterInspector/inspection/views/lineInspectionDetails.html',
                controller: 'inspectionCtrl',
                loginRequired: true,
                resolve: lazyLoadFiles([
                    '/scripts/vendor/mixitup/jquery.mixitup.js',
                    '/modules/masterInspector/inspection/service.js',
                    '/modules/masterInspector/inspection/controller.js'
                ], "inspection")

            })
            .state('inspectionapp.inspection.inspectionImages', {
                url: "/inspectionImages/:inspectionId/:lineInspectionId",
                templateUrl: '/modules/masterInspector/inspection/views/loadInspImages.html',
                controller: 'inspectionCtrl',
                loginRequired: true,
                resolve: lazyLoadFiles([
                    '/scripts/vendor/mixitup/jquery.mixitup.js',
                    '/modules/masterInspector/inspection/service.js',
                    '/modules/masterInspector/inspection/controller.js'
                ], "inspection")

            })
            .state('inspectionapp.inspection.updateInspection', {
                url: "/updateInspection/:inspectionId/:lineInspectionId",
                templateUrl: '/modules/masterInspector/inspection/views/editInspection.html',
                controller: 'updateInspectionCtrl',
                loginRequired: true,
                resolve: lazyLoadFiles([
                    '/modules/masterInspector/inspection/service.js',
                    '/modules/masterInspector/inspection/controller.js'
                ], "inspection")

            })

        // default redirect for any url in app.
        $locationProvider.html5Mode({
            enabled: true,
            requireBase: false
        });
        /*   $urlRouterProvider.otherwise("/inspectionapp/home");
         */
        $urlRouterProvider.otherwise("/inspectionapp/home");

    }])
    .run(['$rootScope', '$location', '$http', '$localStorage', '$state', function($rootScope, $location, $http, $localStorage, $state) {

        $rootScope.$on("$stateChangeStart", function(event, nextRoute, currentRoute) {

        });

        $rootScope.$on('$stateChangeSuccess', function(event, nextRoute, currentRoute) {

        });
        $rootScope.$on('$stateChangeError', function(event, toState, toParams, fromState, fromParams, error) {

            $state.go('inspectionapp.404');
        });

    }]);


text:
var mongoClient = require('mongodb').MongoClient;
var fs= require('fs');

var mongoDbUrl =  'mongodb://localhost:27017/mandi';
var collectionName = 'user';
var jsonObject;

fs.readFile('data.json', 'utf8', function(err, data) {
	if(err)
		console.log(err);
	else {
		jsonObject = JSON.parse(data);
	}
})

mongoClient.connect(mongoDbUrl, function(err, db) {
	if(!err) {
		console.log('Connected to mongoDB');
        insertDocument(db, collectionName, jsonObject)
	}
})

var endConnection = function(db) {
        	db.close();
        	console.log("connection closed");
        };

var insertDocument = function(db, collectionName, document) {
	var collection = db.collection(collectionName);
	var counter = 0;
	for(var i in document) {
		collection.insert(document[i], function(err, result) {
		counter++;
		if(err){
			console.log(err);
		}
		else {
			console.log(result);
		}
		if(counter == document.length) {
			endConnection(db);
		}
	})
	}
}


text:
/* autogenerated from orcfunctions.orc */

#ifndef _ORCFUNCTIONS_H_
#define _ORCFUNCTIONS_H_

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _ORC_INTEGER_TYPEDEFS_
#define _ORC_INTEGER_TYPEDEFS_
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#include <stdint.h>
typedef int8_t orc_int8;
typedef int16_t orc_int16;
typedef int32_t orc_int32;
typedef int64_t orc_int64;
typedef uint8_t orc_uint8;
typedef uint16_t orc_uint16;
typedef uint32_t orc_uint32;
typedef uint64_t orc_uint64;
#define ORC_UINT64_C(x) UINT64_C(x)
#elif defined(_MSC_VER)
typedef signed __int8 orc_int8;
typedef signed __int16 orc_int16;
typedef signed __int32 orc_int32;
typedef signed __int64 orc_int64;
typedef unsigned __int8 orc_uint8;
typedef unsigned __int16 orc_uint16;
typedef unsigned __int32 orc_uint32;
typedef unsigned __int64 orc_uint64;
#define ORC_UINT64_C(x) (x##Ui64)
#else
#include <limits.h>
typedef signed char orc_int8;
typedef short orc_int16;
typedef int orc_int32;
typedef unsigned char orc_uint8;
typedef unsigned short orc_uint16;
typedef unsigned int orc_uint32;
#if INT_MAX == LONG_MAX
typedef long long orc_int64;
typedef unsigned long long orc_uint64;
#define ORC_UINT64_C(x) (x##ULL)
#else
typedef long orc_int64;
typedef unsigned long orc_uint64;
#define ORC_UINT64_C(x) (x##UL)
#endif
#endif
typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16;
typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32;
typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;
#endif
void orc_memcpy (void * d1, const void * s1, int n);
void orc_memset (void * d1, int p1, int n);

#ifdef __cplusplus
}
#endif

#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<tei xmlns="http://www.tei-c.org/ns/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML">
	<teiHeader>
		<fileDesc>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>

						<affiliation>
							<marker>1</marker>
							<orgName type="institution">Auckland Clinical Studies</orgName>,
							<address>
								<settlement>Auckland</settlement>,
								<region>New Zealand</region>;
							<lb/>
							</address>
						</affiliation>
						<affiliation>
							<marker>2</marker>
							<orgName type="institution">Christchurch Clinical Studies Trust</orgName>,
							<address>
								<settlement>Christchurch</settlement>,
								<region>New Zealand</region>;
							<lb/>
							</address>
						</affiliation>
						<affiliation>
							<marker>3</marker>
							<orgName type="institution">Gilead Science, Inc</orgName>,
							<address>
								<settlement>Foster City</settlement>,
								<region>CA</region>
							</address>
						</affiliation>

						</author>
					</analytic>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
	</teiHeader>
</tei>


text:
<?php

namespace app\modules\emr\models;

use app\modules\emr\query\BiosignalTypeQuery;
use yii\db\ActiveRecord;

class BiosignalType extends ActiveRecord
{
    /**
     * @return mixed
     */
    public function rules() : array
    {
        return [
            ['description', 'required', 'message' => '{attribute} не может быть пустым'],
            ['description', 'string', 'max' => 255,
                'tooLong' => 'Описание не может быть длиннее 255 символов'],
        ];
    }

    /**
     * @return array
     */
    public function attributeLabels() : array
    {
        return [
            'id' => 'ID',
            'description' => 'Описание биосигнала',
        ];
    }

        /**
     * @return BiosignalTypeQuery
     */
    public static function find() : BiosignalTypeQuery
    {
        return new BiosignalTypeQuery(get_called_class());
    }

    /**
     * @return string
     */
    public static function tableName()
    {
        return 'biosignal_type';
    }
}


text:
module ApplicationHelper

  def pretty_price(price)
    number_to_currency(price, delimiter: '', format: "%u %n")
  end

  def format_date(date)
    date.strftime("%d.%m.%Y")
  end

  def submit_button_text(action)
    texts = {
        'new' => 'Create',
        'edit' => 'Update'
    }
    texts[action]
  end

  def show_check(value)
    classes = {
        "true" => 'fa-check-square-o',
        "false" => 'fa-square-o'
    }
    content_tag(:i, nil, class: "fa #{classes[value.to_s]}")
  end

end


text:
package edu.duke.cabig.c3pr.esb;

import java.util.Hashtable;

import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;

/**
 * Created by IntelliJ IDEA.
 * User: kherm
 * Date: Mar 21, 2007
 * Time: 3:24:36 PM
 * To change this template use File | Settings | File Templates.
 */
public class TestJMXClient{

    private MBeanServerConnection mbsc = null;
    //properties
    private String username = "smx";
    private String password = "smx";

    public static void main(String[] args) throws Exception{
        TestJMXClient client = new TestJMXClient();

        client.connectToESB("localhost","1098");

        System.out.println("Getting Remote Logger");
        ObjectName remoteLogger = client.createBean();
        System.out.println("Logger instantiated of type " + remoteLogger.getClass());

        System.out.println("Remote Logger level is " + client.getLogLevel(remoteLogger));

        String newLogLevel = "INFO";

        System.out.println("Setting logger level to " + newLogLevel);
        client.setLogLevel(remoteLogger,newLogLevel);

        System.out.println("Remote Logger level is" + client.getLogLevel(remoteLogger));

         }

    private void connectToESB(String hostname,String port) throws Exception
    {

        JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+hostname+":"+port+"/jmxrmi");

        Hashtable h  = new Hashtable();

        //crendetial
        String[] credentials = new String[] {username ,password };
        h.put("jmx.remote.credentials", credentials);

        //Establish the JMX connection.
        JMXConnector jmxc = JMXConnectorFactory.connect(url, h);

        //Get the MBean server connection instance.
        mbsc = jmxc.getMBeanServerConnection();

    }

    private ObjectName createBean() throws Exception{
        return new ObjectName("java.util.logging:type=Logging");
    }

    private void setLogLevel(ObjectName remoteLogger,String level) throws Exception{
        mbsc.invoke(remoteLogger,"setLoggerLevel",
                new Object[]{
                        "global",level
                },
                new String[]{
                        "java.lang.String","java.lang.String"
                });
    }

    private String getLogLevel(ObjectName remoteLogger) throws Exception{
        return (String)mbsc.invoke(remoteLogger,"getLoggerLevel",
                new Object[]{
                        "global"
                },
                new String[]{
                        "java.lang.String"
                });

    }
}


text:
package com.streamsets.pipeline.spark;

import com.streamsets.pipeline.ClusterBinding;
import com.streamsets.pipeline.Utils;
import kafka.serializer.DefaultDecoder;
import org.apache.spark.SparkConf;
import org.apache.spark.streaming.Duration;
import org.apache.spark.streaming.api.java.JavaPairInputDStream;
import org.apache.spark.streaming.api.java.JavaStreamingContext;
import org.apache.spark.streaming.kafka.KafkaUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Properties;

public class SparkStreamingBinding implements ClusterBinding {
  private static final String MAX_WAIT_TIME = "maxWaitTime";
  private static final String METADATA_BROKER_LIST = "metadataBrokerList";
  private static final String TOPIC = "topic";
  private static final String AUTO_OFFSET_RESET = "auto.offset.reset";
  private static final Logger LOG = LoggerFactory.getLogger(SparkStreamingBinding.class);

  private JavaStreamingContext ssc;
  private Properties properties;

  public SparkStreamingBinding(Properties properties) {
    this.properties = Utils.checkNotNull(properties, "Properties");
  }

  @Override
  public void init() throws Exception {
    SparkConf conf = new SparkConf().setAppName("StreamSets Data Collector - Streaming Mode");
    conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer");
    long duration;
    String durationAsString = getProperty(MAX_WAIT_TIME);
    try {
      duration = Long.parseLong(durationAsString);
    } catch (NumberFormatException ex) {
      String msg = "Invalid " + MAX_WAIT_TIME  + " '" + durationAsString + "' : " + ex;
      throw new IllegalArgumentException(msg, ex);
    }
    ssc = new JavaStreamingContext(conf, new Duration(duration));
    final Thread shutdownHookThread = new Thread("Spark.shutdownHook") {
      @Override
      public void run() {
        LOG.debug("Gracefully stopping Spark Streaming Application");
        ssc.stop(true, true);
        LOG.info("Application stopped");
      }
    };
    Runtime.getRuntime().addShutdownHook(shutdownHookThread);
    LOG.info("Making calls through spark context ");
    if ("kafka".equalsIgnoreCase(getProperty("cluster.source.name"))) {
      JavaPairInputDStream<byte[], byte[]> dStream = createDirectStreamForKafka();
      dStream.foreachRDD(new SparkDriverFunction());
    } else {
      throw new IllegalStateException("Property value " + getProperty("cluster.source.name") + " is invalid");
    }
    ssc.start();
  }

  private String getProperty(String name) {
    Utils.checkArgumentNotNull(properties.getProperty(name),
      "Property " + name +" cannot be null");
    return properties.getProperty(name).trim();
  }

  private JavaPairInputDStream<byte[], byte[]> createDirectStreamForKafka() {
    HashMap<String, String> props = new HashMap<String, String>();
    // Check for null values
    // require only the broker list for direct stream API (low level consumer API)
    String metaDataBrokerList = getProperty(METADATA_BROKER_LIST);
    String topic = getProperty(TOPIC);
    props.put("metadata.broker.list", metaDataBrokerList);
    String autoOffsetValue = properties.getProperty(AUTO_OFFSET_RESET, "").trim();
    if (!autoOffsetValue.isEmpty()) {
      props.put(AUTO_OFFSET_RESET, autoOffsetValue);
    }
    String[] topicList = topic.split(",");
    LOG.info("Meta data broker list " + metaDataBrokerList);
    LOG.info("topic list " + topic);
    LOG.info("Auto offset is set to " + autoOffsetValue);
    JavaPairInputDStream<byte[], byte[]> dStream =
      KafkaUtils.createDirectStream(ssc, byte[].class, byte[].class, DefaultDecoder.class, DefaultDecoder.class, props,
        new HashSet<String>(Arrays.asList(topicList)));
    return dStream;
  }

  @Override
  public void awaitTermination() {
    ssc.awaitTermination();
  }

  @Override
  public void close() {
    if (ssc != null) {
      ssc.close();
    }
  }
}


text:
@implementation NSBundle (VisionUIKit)

+ (instancetype)vs_sourceBundle
{
    static NSBundle *sourceBundle = nil;
    if (sourceBundle == nil) {
        // 这里不使用mainBundle是为了适配pod 1.x和0.x
        sourceBundle = [self vs_bundleName:@"VisionUIKit" forClass:[VSConfig class]];
    }
    return sourceBundle;
}

+ (NSBundle *)vs_bundleName:(NSString *) name {
    return [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:name ofType:@"bundle"]];
}

+ (NSBundle *)vs_bundleName:(NSString *) name forClass:(Class) class {
    return [NSBundle bundleWithPath:[[NSBundle bundleForClass:class] pathForResource:name ofType:@"bundle"]];
}

@end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
MemcachedFactory.MemcachedAlerter
</TITLE>

<META NAME="date" CONTENT="2013-03-11">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.parthparekh.service.cache

Class MemcachedFactory.MemcachedAlerter

java.lang.Object
  com.parthparekh.service.cache.MemcachedFactory.MemcachedAlerter

All Implemented Interfaces:
net.spy.memcached.ConnectionObserver

Enclosing class:
MemcachedFactory

static class MemcachedFactory.MemcachedAlerter
extends java.lang.Object
implements net.spy.memcached.ConnectionObserver

Field Summary

private static org.slf4j.Logger
logger

Constructor Summary

MemcachedFactory.MemcachedAlerter()

Method Summary

 void
connectionEstablished(java.net.SocketAddress sa,
                      int reconnectCount)

 void
connectionLost(java.net.SocketAddress sa)

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

logger

private static final org.slf4j.Logger logger

Constructor Detail

MemcachedFactory.MemcachedAlerter

MemcachedFactory.MemcachedAlerter()

Method Detail

connectionEstablished

public void connectionEstablished(java.net.SocketAddress sa,
                                  int reconnectCount)

Specified by:
connectionEstablished in interface net.spy.memcached.ConnectionObserver

connectionLost

public void connectionLost(java.net.SocketAddress sa)

Specified by:
connectionLost in interface net.spy.memcached.ConnectionObserver

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
package com.akh.JSON;

import java.net.URL;
import java.util.Date;
import java.util.List;

public class App {

	private String mAppId;
	private AppType mAppType;
	private boolean mIsManaged;
	private String mAppName;
	private URL mIconURL;
	private List<URL> mScreenShotURLs;
	private URL mDownloadURL;
	private List<String> mCategory;
	private String mDescription;
	private String mVersion;
	private long mVersionCode;
	private Date mReleaseDate;
	private String mPublisher;
	private String mReleaseNotes;
	private long mFileSizeBytes;
	private double mAverageUserRating;
	private long mUserRatingCount;
	private double mLastUserRating;
	private boolean mRequired;
	private String mURLScheme;

	public App() {
	}

	public String getAppId() {
		return mAppId;
	}
	public void setAppId(String mAppId) {
		this.mAppId = mAppId;
	}
	public AppType getAppType() {
		return mAppType;
	}
	public void setAppType(AppType mAppType) {
		this.mAppType = mAppType;
	}
	public boolean isManaged() {
		return mIsManaged;
	}
	public void setIsManaged(boolean mIsManaged) {
		this.mIsManaged = mIsManaged;
	}
	public String getAppName() {
		return mAppName;
	}
	public void setAppName(String mAppName) {
		this.mAppName = mAppName;
	}
	public URL getIconURL() {
		return mIconURL;
	}
	public void setIconURL(URL mIconURL) {
		this.mIconURL = mIconURL;
	}
	public List<URL> getScreenShotURLs() {
		return mScreenShotURLs;
	}
	public void setScreenShotURLs(List<URL> mScreenShotURLs) {
		this.mScreenShotURLs = mScreenShotURLs;
	}
	public URL getDownloadURL() {
		return mDownloadURL;
	}
	public void setDownloadURL(URL mDownloadURL) {
		this.mDownloadURL = mDownloadURL;
	}
	public List<String> getCategory() {
		return mCategory;
	}
	public void setCategory(List<String> mCategory) {
		this.mCategory = mCategory;
	}
	public String getDescription() {
		return mDescription;
	}
	public void setDescription(String mDescription) {
		this.mDescription = mDescription;
	}
	public String getVersion() {
		return mVersion;
	}
	public void setVersion(String mVersion) {
		this.mVersion = mVersion;
	}
	public long getVersionCode() {
		return mVersionCode;
	}
	public void setVersionCode(long mVersionCode) {
		this.mVersionCode = mVersionCode;
	}
	public Date getReleaseDate() {
		return mReleaseDate;
	}
	public void setReleaseDate(Date mReleaseDate) {
		this.mReleaseDate = mReleaseDate;
	}
	public String getPublisher() {
		return mPublisher;
	}
	public void setPublisher(String mPublisher) {
		this.mPublisher = mPublisher;
	}
	public String getReleaseNotes() {
		return mReleaseNotes;
	}
	public void setReleaseNotes(String mReleaseNotes) {
		this.mReleaseNotes = mReleaseNotes;
	}
	public long getFileSizeBytes() {
		return mFileSizeBytes;
	}
	public void setFileSizeBytes(long mFileSizeBytes) {
		this.mFileSizeBytes = mFileSizeBytes;
	}
	public double getAverageUserRating() {
		return mAverageUserRating;
	}
	public void setAverageUserRating(double mAverageUserRating) {
		this.mAverageUserRating = mAverageUserRating;
	}
	public long getUserRatingCount() {
		return mUserRatingCount;
	}
	public void setUserRatingCount(long mUserRatingCount) {
		this.mUserRatingCount = mUserRatingCount;
	}
	public double getLastUserRating() {
		return mLastUserRating;
	}
	public void setLastUserRating(double mLastUserRating) {
		this.mLastUserRating = mLastUserRating;
	}
	public boolean isRequired() {
		return mRequired;
	}
	public void setRequired(boolean mRequired) {
		this.mRequired = mRequired;
	}
	public String getURLScheme() {
		return mURLScheme;
	}
	public void setURLScheme(String mURLScheme) {
		this.mURLScheme = mURLScheme;
	}

}