text:
---
external help file: Microsoft.Azure.Commands.NotificationHubs.dll-Help.xml
Module Name: AzureRM.NotificationHubs
ms.assetid: A03F32C3-BB01-46A5-86C5-B7A4DDC42351
online version: https://docs.microsoft.com/en-us/powershell/module/azurerm.notificationhubs/new-azurermnotificationhubkey
schema: 2.0.0
---

# New-AzureRmNotificationHubKey

## SYNOPSIS
Regenerate the Authorization Rule Key for a NotificationHub .

## SYNTAX

```
New-AzureRmNotificationHubKey [-ResourceGroup] <String> [-Namespace] <String> [-NotificationHub] <String>
 [[-AuthorizationRule] <String>] [-PolicyKey] <String> [-Force] [-DefaultProfile <IAzureContextContainer>]
 [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
New-AzureRmNotificationHubKey cmdlet regenerates the Primary Key/Secondary Key for the NotificationHub Authorization Rule.

## EXAMPLES

### Example 1
```
PS C:\> {{ Add example code here }}
```

{{ Add example description here }}

## PARAMETERS

### -AuthorizationRule
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

```yaml
Type: IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Force
Do not ask for confirmation.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Namespace
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -NotificationHub
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -PolicyKey
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Accepted values: PrimaryKey, SecondaryKey

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ResourceGroup
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

### Microsoft.Azure.Management.NotificationHubs.Models.ResourceListKeys

## NOTES

## RELATED LINKS


text:
<?php
class customer_rateController extends Zend_Controller_Action {
	const REDIRECT_URL = '/group/index';
	public function init()
	{
		header('content-type: text/html; charset=utf8');
		defined('BASE_URL')	|| define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());
	}
	public function indexAction(){
		//$this->_helper->layout()->disableLayout();
		$frm = new customer_Form_FrmGroup();
		$this->view->form = $frm->FrmGroup();
	}
	public function addAction(){
		//$this->_helper->layout()->disableLayout();
		$frm = new customer_Form_FrmGroup();
		$this->view->form = $frm->FrmGroup();
	}

}

redpajama_set_name: RedPajamaGithub


text:
package org.apache.flink.table.data.vector.heap;

import org.apache.flink.table.data.vector.writable.WritableBytesVector;

import java.util.Arrays;

/**
 * This class supports string and binary data by value reference -- i.e. each field is
 * explicitly present, as opposed to provided by a dictionary reference.
 * In some cases, all the values will be in the same byte array to begin with,
 * but this need not be the case. If each value is in a separate byte
 * array to start with, or not all of the values are in the same original
 * byte array, you can still assign data by reference into this column vector.
 * This gives flexibility to use this in multiple situations.
 *
 * <p>When setting data by reference, the caller
 * is responsible for allocating the byte arrays used to hold the data.
 * You can also set data by value, as long as you call the initBuffer() method first.
 * You can mix "by value" and "by reference" in the same column vector,
 * though that use is probably not typical.
 */
public class HeapBytesVector extends AbstractHeapVector implements WritableBytesVector {

	private static final long serialVersionUID = -8529155738773478597L;

	/**
	 * start offset of each field.
	 */
	public int[] start;

	/**
	 * The length of each field.
	 */
	public int[] length;

	/**
	 * buffer to use when actually copying in data.
	 */
	public byte[] buffer;

	/**
	 * Hang onto a byte array for holding smaller byte values.
	 */
	private int elementsAppended = 0;
	private int capacity;

	/**
	 * Don't call this constructor except for testing purposes.
	 *
	 * @param size number of elements in the column vector
	 */
	public HeapBytesVector(int size) {
		super(size);
		capacity = size;
		buffer = new byte[capacity];
		start = new int[size];
		length = new int[size];
	}

	@Override
	public void reset() {
		super.reset();
		elementsAppended = 0;
	}

	@Override
	public void appendBytes(int elementNum, byte[] sourceBuf, int start, int length) {
		reserve(elementsAppended + length);
		System.arraycopy(sourceBuf, start, buffer, elementsAppended, length);
		this.start[elementNum] = elementsAppended;
		this.length[elementNum] = length;
		elementsAppended += length;
	}

	@Override
	public void fill(byte[] value) {
		reserve(start.length * value.length);
		for (int i = 0; i < start.length; i++) {
			System.arraycopy(value, 0, buffer, i * value.length, value.length);
		}
		for (int i = 0; i < start.length; i++) {
			this.start[i] = i * value.length;
		}
		Arrays.fill(this.length, value.length);
	}

	private void reserve(int requiredCapacity) {
		if (requiredCapacity > capacity) {
			int newCapacity = requiredCapacity * 2;
				try {
					byte[] newData = new byte[newCapacity];
					System.arraycopy(buffer, 0, newData, 0, elementsAppended);
					buffer = newData;
					capacity = newCapacity;
				} catch (OutOfMemoryError outOfMemoryError) {
					throw new UnsupportedOperationException(requiredCapacity + " cannot be satisfied.", outOfMemoryError);
				}
		}
	}

	@Override
	public Bytes getBytes(int i) {
		if (dictionary == null) {
			return new Bytes(buffer, start[i], length[i]);
		} else {
			byte[] bytes = dictionary.decodeToBinary(dictionaryIds.vector[i]);
			return new Bytes(bytes, 0, bytes.length);
		}
	}
}


text:
from __future__ import absolute_import, division, print_function, with_statement
from api import BaseService
from tornado import gen
import tornado.escape
import base64
import io
import qrcode
import time
from tornado.options import options

class Service(BaseService):
    @gen.coroutine
    def do_request(self):
        """ this method return the server player data version to the client side
        to judge if need to download old data; then update current player id to
        a active player list for inviting friends
        """
        data = tornado.escape.json_decode(self.message)
        uid = data.get("uid")
        channel = data.get("channel")
        uids = self.connection.get_uids(channel)
        if not uids:
            uids = []
        if uid not in uids:
            uids.append(uid)

        if self.connection.channel != channel:
            self.connection.join(channel)

        raise gen.Return(tornado.escape.json_encode(uids))


text:
/**
 * created at Jan 3, 2002
 * @author Jeka
 */
package com.intellij.compiler;

import com.intellij.CommonBundle;
import com.intellij.ProjectTopics;
import com.intellij.compiler.impl.javaCompiler.BackendCompiler;
import com.intellij.compiler.impl.javaCompiler.eclipse.EclipseCompiler;
import com.intellij.compiler.impl.javaCompiler.javac.JavacCompiler;
import com.intellij.compiler.server.BuildManager;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ApplicationNamesInfo;
import com.intellij.openapi.compiler.CompilerBundle;
import com.intellij.openapi.compiler.CompilerManager;
import com.intellij.openapi.compiler.options.ExcludeEntryDescription;
import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration;
import com.intellij.openapi.compiler.options.ExcludesConfiguration;
import com.intellij.openapi.components.*;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.project.ModuleAdapter;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ProjectRootManager;
import com.intellij.openapi.ui.InputValidator;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.*;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.packaging.artifacts.Artifact;
import com.intellij.packaging.impl.artifacts.ArtifactBySourceFileFinder;
import com.intellij.util.ArrayUtil;
import com.intellij.util.messages.MessageBusConnection;
import com.intellij.util.xmlb.Accessor;
import com.intellij.util.xmlb.SkipDefaultValuesSerializationFilters;
import com.intellij.util.xmlb.XmlSerializer;
import org.apache.oro.text.regex.*;
import org.jdom.Element;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.model.java.compiler.JavaCompilers;
import org.jetbrains.jps.model.java.compiler.ProcessorConfigProfile;
import org.jetbrains.jps.model.java.impl.compiler.ProcessorConfigProfileImpl;
import org.jetbrains.jps.model.serialization.java.compiler.AnnotationProcessorProfileSerializer;
import org.jetbrains.jps.model.serialization.java.compiler.JpsJavaCompilerConfigurationSerializer;

import java.io.File;
import java.util.*;

@State(
  name = "CompilerConfiguration",
  storages = {
    @Storage(file = StoragePathMacros.PROJECT_FILE),
    @Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/compiler.xml", scheme = StorageScheme.DIRECTORY_BASED)
  }
)
public class CompilerConfigurationImpl extends CompilerConfiguration implements PersistentStateComponent<Element>, ProjectComponent {
  private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.CompilerConfiguration");
  public static final String TESTS_EXTERNAL_COMPILER_HOME_PROPERTY_NAME = "tests.external.compiler.home";
  public static final int DEFAULT_BUILD_PROCESS_HEAP_SIZE = 700;

  private BackendCompiler myDefaultJavaCompiler;
  private State myState = new State();

  // extensions of the files considered as resource files
  private final List<Pattern> myRegexpResourcePatterns = new ArrayList<Pattern>();
  // extensions of the files considered as resource files. If present, overrides patterns in old regexp format stored in myRegexpResourcePatterns
  private final List<String> myWildcardPatterns = new ArrayList<String>();
  private final List<CompiledPattern> myCompiledPatterns = new ArrayList<CompiledPattern>();
  private final List<CompiledPattern> myNegatedCompiledPatterns = new ArrayList<CompiledPattern>();
  private boolean myWildcardPatternsInitialized = false;
  private final Project myProject;
  private final ExcludesConfigNotificationsWrapper<ExcludedEntriesConfiguration> myExcludesConfiguration;

  private final Collection<BackendCompiler> myRegisteredCompilers = new ArrayList<BackendCompiler>();
  private JavacCompiler JAVAC_EXTERNAL_BACKEND;
  private final Perl5Matcher myPatternMatcher = new Perl5Matcher();

  {
    loadDefaultWildcardPatterns();
  }
  private boolean myAddNotNullAssertions = true;

  private final ProcessorConfigProfile myDefaultProcessorsProfile = new ProcessorConfigProfileImpl("Default");
  private final List<ProcessorConfigProfile> myModuleProcessorProfiles = new ArrayList<ProcessorConfigProfile>();

  // the map is calculated by module processor profiles list for faster access to module settings
  private Map<Module, ProcessorConfigProfile> myProcessorsProfilesMap = null;

  @Nullable
  private String myBytecodeTargetLevel = null;  // null means same as effective language level
  private final Map<String, String> myModuleBytecodeTarget = new HashMap<String, String>();

  public CompilerConfigurationImpl(Project project) {
    myProject = project;
    myExcludesConfiguration = new ExcludesConfigNotificationsWrapper<ExcludedEntriesConfiguration>(project, new ExcludedEntriesConfiguration());
    Disposer.register(project, myExcludesConfiguration.getDelegate());
    MessageBusConnection connection = project.getMessageBus().connect(project);
    connection.subscribe(ProjectTopics.MODULES, new ModuleAdapter() {
      @Override
      public void beforeModuleRemoved(@NotNull Project project, @NotNull Module module) {
        getAnnotationProcessingConfiguration(module).removeModuleName(module.getName());
      }

      @Override
      public void moduleAdded(@NotNull Project project, @NotNull Module module) {
        myProcessorsProfilesMap = null; // clear cache
      }
    });
  }

  private static class State {
    public String DEFAULT_COMPILER = JavaCompilers.JAVAC_ID;
    public int BUILD_PROCESS_HEAP_SIZE = DEFAULT_BUILD_PROCESS_HEAP_SIZE;
    public String BUILD_PROCESS_ADDITIONAL_VM_OPTIONS = "";

    private boolean compilerWasSpecified;
  }

  @Override
  public Element getState() {
    Element state = new Element("state");
    XmlSerializer.serializeInto(myState, state, new SkipDefaultValuesSerializationFilters() {
      @Override
      public boolean accepts(@NotNull Accessor accessor, @NotNull Object bean) {
        if (myState.compilerWasSpecified && "DEFAULT_COMPILER".equals(accessor.getName())) {
          return true;
        }
        return super.accepts(accessor, bean);
      }
    });

    if (!myAddNotNullAssertions) {
      addChild(state, JpsJavaCompilerConfigurationSerializer.ADD_NOTNULL_ASSERTIONS).setAttribute(
        JpsJavaCompilerConfigurationSerializer.ENABLED, String.valueOf(myAddNotNullAssertions));
    }

    if (myExcludesConfiguration.getExcludeEntryDescriptions().length > 0) {
      myExcludesConfiguration.getDelegate().writeExternal(addChild(state, JpsJavaCompilerConfigurationSerializer.EXCLUDE_FROM_COMPILE));
    }

    final Element newChild = addChild(state, JpsJavaCompilerConfigurationSerializer.RESOURCE_EXTENSIONS);
    for (final String pattern : getRegexpPatterns()) {
      addChild(newChild, JpsJavaCompilerConfigurationSerializer.ENTRY).setAttribute(JpsJavaCompilerConfigurationSerializer.NAME, pattern);
    }

    if (myWildcardPatternsInitialized || !myWildcardPatterns.isEmpty()) {
      final Element wildcardPatterns = addChild(state, JpsJavaCompilerConfigurationSerializer.WILDCARD_RESOURCE_PATTERNS);
      for (final String wildcardPattern : myWildcardPatterns) {
        addChild(wildcardPatterns, JpsJavaCompilerConfigurationSerializer.ENTRY).setAttribute(JpsJavaCompilerConfigurationSerializer.NAME, wildcardPattern);
      }
    }

    final Element annotationProcessingSettings = addChild(state, JpsJavaCompilerConfigurationSerializer.ANNOTATION_PROCESSING);
    final Element defaultProfileElem = addChild(annotationProcessingSettings, "profile").setAttribute("default", "true");
    AnnotationProcessorProfileSerializer.writeExternal(myDefaultProcessorsProfile, defaultProfileElem);
    for (ProcessorConfigProfile profile : myModuleProcessorProfiles) {
      final Element profileElem = addChild(annotationProcessingSettings, "profile").setAttribute("default", "false");
      AnnotationProcessorProfileSerializer.writeExternal(profile, profileElem);
    }

    if (!StringUtil.isEmpty(myBytecodeTargetLevel) || !myModuleBytecodeTarget.isEmpty()) {
      final Element bytecodeTarget = addChild(state, JpsJavaCompilerConfigurationSerializer.BYTECODE_TARGET_LEVEL);
      if (!StringUtil.isEmpty(myBytecodeTargetLevel)) {
        bytecodeTarget.setAttribute(JpsJavaCompilerConfigurationSerializer.TARGET_ATTRIBUTE, myBytecodeTargetLevel);
      }
      if (!myModuleBytecodeTarget.isEmpty()) {
        final List<String> moduleNames = new ArrayList<String>(myModuleBytecodeTarget.keySet());
        Collections.sort(moduleNames, String.CASE_INSENSITIVE_ORDER);
        for (String name : moduleNames) {
          final Element moduleElement = addChild(bytecodeTarget, JpsJavaCompilerConfigurationSerializer.MODULE);
          moduleElement.setAttribute(JpsJavaCompilerConfigurationSerializer.NAME, name);
          final String value = myModuleBytecodeTarget.get(name);
          moduleElement.setAttribute(JpsJavaCompilerConfigurationSerializer.TARGET_ATTRIBUTE, value != null ? value : "");
        }
      }
    }
    return state;
  }

  @Override
  public void loadState(Element state) {
    readExternal(state);
  }

  public int getBuildProcessHeapSize(final int javacPreferredHeapSize) {
    final int heapSize = myState.BUILD_PROCESS_HEAP_SIZE;
    if (heapSize != DEFAULT_BUILD_PROCESS_HEAP_SIZE) {
      return heapSize;
    }
    // compatibility with older builds: if javac is set to use larger heap, and if so, use it.
    return Math.max(heapSize, javacPreferredHeapSize);
  }

  public void setBuildProcessHeapSize(int size) {
    myState.BUILD_PROCESS_HEAP_SIZE = size > 0? size : DEFAULT_BUILD_PROCESS_HEAP_SIZE;
  }

  public String getBuildProcessVMOptions() {
    return myState.BUILD_PROCESS_ADDITIONAL_VM_OPTIONS;
  }

  public void setBuildProcessVMOptions(String options) {
    myState.BUILD_PROCESS_ADDITIONAL_VM_OPTIONS = options == null? "" : options.trim();
  }

  @Override
  public void setProjectBytecodeTarget(@Nullable String level) {
    final String previous = myBytecodeTargetLevel;
    myBytecodeTargetLevel = level;
    if (!myProject.isDefault() && !Comparing.equal(previous, level)) {
      BuildManager.getInstance().clearState(myProject);
    }
  }

  @Override
  @Nullable
  public String getProjectBytecodeTarget() {
    return myBytecodeTargetLevel;
  }

  public void setModulesBytecodeTargetMap(@NotNull Map<String, String> mapping) {
    final boolean shouldNotify = !myProject.isDefault() && !myModuleBytecodeTarget.equals(mapping);
    myModuleBytecodeTarget.clear();
    myModuleBytecodeTarget.putAll(mapping);
    if (shouldNotify) {
      BuildManager.getInstance().clearState(myProject);
    }
  }

  public Map<String, String> getModulesBytecodeTargetMap() {
    return myModuleBytecodeTarget;
  }

  @Override
  public void setBytecodeTargetLevel(Module module, String level) {
    final String previous;
    if (StringUtil.isEmpty(level)) {
      previous = myModuleBytecodeTarget.remove(module.getName());
    }
    else {
      previous = myModuleBytecodeTarget.put(module.getName(), level);
    }
    if (!Comparing.equal(previous, level)) {
      final Project project = module.getProject();
      if (!project.isDefault()) {
        BuildManager.getInstance().clearState(project);
      }
    }
  }

  @Override
  @Nullable
  public String getBytecodeTargetLevel(Module module) {
    final String level = myModuleBytecodeTarget.get(module.getName());
    if (level != null) {
      return level.isEmpty() ? null : level;
    }
    return myBytecodeTargetLevel;
  }

  private void loadDefaultWildcardPatterns() {
    if (!myWildcardPatterns.isEmpty()) {
      removeWildcardPatterns();
    }
    try {
      addWildcardResourcePattern("!?*.java");
      addWildcardResourcePattern("!?*.form");
      addWildcardResourcePattern("!?*.class");
      addWildcardResourcePattern("!?*.groovy");
      addWildcardResourcePattern("!?*.scala");
      addWildcardResourcePattern("!?*.flex");
      addWildcardResourcePattern("!?*.kt");
      addWildcardResourcePattern("!?*.clj");
      addWildcardResourcePattern("!?*.aj");
    }
    catch (MalformedPatternException e) {
      LOG.error(e);
    }
  }

  public static String getTestsExternalCompilerHome() {
    String compilerHome = System.getProperty(TESTS_EXTERNAL_COMPILER_HOME_PROPERTY_NAME, null);
    if (compilerHome == null) {
      File javaHome = new File(System.getProperty("java.home"));
      if (SystemInfo.isMac || !new File(javaHome.getParentFile(), "bin").exists()) {
        compilerHome = javaHome.getAbsolutePath();
      }
      else {
        compilerHome = javaHome.getParentFile().getAbsolutePath();
      }
    }
    return compilerHome;
  }

  private static Pattern compilePattern(@NonNls String s) throws MalformedPatternException {
    try {
      final PatternCompiler compiler = new Perl5Compiler();
      return SystemInfo.isFileSystemCaseSensitive? compiler.compile(s) : compiler.compile(s, Perl5Compiler.CASE_INSENSITIVE_MASK);
    }
    catch (org.apache.oro.text.regex.MalformedPatternException ex) {
      throw new MalformedPatternException(ex);
    }
  }

  @Override
  public void disposeComponent() {
  }

  @Override
  public void initComponent() { }

  @Override
  public void projectClosed() {
  }

  public JavacCompiler getJavacCompiler() {
    createCompilers();
    return JAVAC_EXTERNAL_BACKEND;
  }

  @Override
  public void projectOpened() {
    createCompilers();
  }

  private void createCompilers() {
    if (JAVAC_EXTERNAL_BACKEND != null) {
      return;
    }

    JAVAC_EXTERNAL_BACKEND = new JavacCompiler(myProject);
    myRegisteredCompilers.add(JAVAC_EXTERNAL_BACKEND);

    if (!ApplicationManager.getApplication().isUnitTestMode()) {
      if (EclipseCompiler.isInitialized()) {
        final EclipseCompiler eclipse = new EclipseCompiler(myProject);
        myRegisteredCompilers.add(eclipse);
      }
    }

    final Set<FileType> types = new HashSet<FileType>();
    for (BackendCompiler compiler : Extensions.getExtensions(BackendCompiler.EP_NAME, myProject)) {
      myRegisteredCompilers.add(compiler);
      types.addAll(compiler.getCompilableFileTypes());
    }

    final CompilerManager compilerManager = CompilerManager.getInstance(myProject);
    for (FileType type : types) {
      compilerManager.addCompilableFileType(type);
    }

    myDefaultJavaCompiler = JAVAC_EXTERNAL_BACKEND;
    for (BackendCompiler compiler : myRegisteredCompilers) {
      if (compiler.getId().equals(myState.DEFAULT_COMPILER)) {
        myDefaultJavaCompiler = compiler;
        break;
      }
    }
    myState.DEFAULT_COMPILER = myDefaultJavaCompiler.getId();
  }

  public Collection<BackendCompiler> getRegisteredJavaCompilers() {
    createCompilers();
    return myRegisteredCompilers;
  }

  public String[] getResourceFilePatterns() {
    return getWildcardPatterns();
  }

  private String[] getRegexpPatterns() {
    String[] patterns = ArrayUtil.newStringArray(myRegexpResourcePatterns.size());
    int index = 0;
    for (final Pattern myRegexpResourcePattern : myRegexpResourcePatterns) {
      patterns[index++] = myRegexpResourcePattern.getPattern();
    }
    return patterns;
  }

  private String[] getWildcardPatterns() {
    return ArrayUtil.toStringArray(myWildcardPatterns);
  }

  @Override
  public void addResourceFilePattern(String namePattern) throws MalformedPatternException {
    addWildcardResourcePattern(namePattern);
  }

  // need this method only for handling patterns in old regexp format
  private void addRegexpPattern(String namePattern) throws MalformedPatternException {
    Pattern pattern = compilePattern(namePattern);
    if (pattern != null) {
      myRegexpResourcePatterns.add(pattern);
    }
  }

  @Override
  public ExcludesConfiguration getExcludedEntriesConfiguration() {
    return myExcludesConfiguration;
  }

  @Override
  public boolean isExcludedFromCompilation(final VirtualFile virtualFile) {
    return myExcludesConfiguration.isExcluded(virtualFile);
  }

  @Override
  public boolean isResourceFile(VirtualFile virtualFile) {
    return isResourceFile(virtualFile.getName(), virtualFile.getParent());
  }

  @Override
  public boolean isAddNotNullAssertions() {
    return myAddNotNullAssertions;
  }

  @Override
  public void setAddNotNullAssertions(boolean enabled) {
    myAddNotNullAssertions = enabled;
  }

  @NotNull
  public ProcessorConfigProfile getDefaultProcessorProfile() {
    return myDefaultProcessorsProfile;
  }

  public void setDefaultProcessorProfile(ProcessorConfigProfile profile) {
    myDefaultProcessorsProfile.initFrom(profile);
  }

  @NotNull
  public List<ProcessorConfigProfile> getModuleProcessorProfiles() {
    return myModuleProcessorProfiles;
  }

  public void setModuleProcessorProfiles(Collection<ProcessorConfigProfile> moduleProfiles) {
    myModuleProcessorProfiles.clear();
    myModuleProcessorProfiles.addAll(moduleProfiles);
    myProcessorsProfilesMap = null;
  }

  @Nullable
  public ProcessorConfigProfile findModuleProcessorProfile(@NotNull String name) {
    for (ProcessorConfigProfile profile : myModuleProcessorProfiles) {
      if (name.equals(profile.getName())) {
        return profile;
      }
    }

    return null;
  }

  public void removeModuleProcessorProfile(ProcessorConfigProfile profile) {
    myModuleProcessorProfiles.remove(profile);
    myProcessorsProfilesMap = null; // clear cache
  }

  public void addModuleProcessorProfile(@NotNull ProcessorConfigProfile profile) {
    myModuleProcessorProfiles.add(profile);
    myProcessorsProfilesMap = null; // clear cache
  }

  @Override
  @NotNull
  public ProcessorConfigProfile getAnnotationProcessingConfiguration(Module module) {
    Map<Module, ProcessorConfigProfile> map = myProcessorsProfilesMap;
    if (map == null) {
      map = new HashMap<Module, ProcessorConfigProfile>();
      final Map<String, Module> namesMap = new HashMap<String, Module>();
      for (Module m : ModuleManager.getInstance(module.getProject()).getModules()) {
        namesMap.put(m.getName(), m);
      }
      if (!namesMap.isEmpty()) {
        for (ProcessorConfigProfile profile : myModuleProcessorProfiles) {
          for (String name : profile.getModuleNames()) {
            final Module mod = namesMap.get(name);
            if (mod != null) {
              map.put(mod, profile);
            }
          }
        }
      }
      myProcessorsProfilesMap = map;
    }
    final ProcessorConfigProfile profile = map.get(module);
    return profile != null? profile : myDefaultProcessorsProfile;
  }

  @Override
  public boolean isAnnotationProcessorsEnabled() {
    if (myDefaultProcessorsProfile.isEnabled()) {
      return true;
    }
    for (ProcessorConfigProfile profile : myModuleProcessorProfiles) {
      if (profile.isEnabled()) {
        return true;
      }
    }
    return false;
  }

  private void addWildcardResourcePattern(@NonNls final String wildcardPattern) throws MalformedPatternException {
    final CompiledPattern pattern = convertToRegexp(wildcardPattern);
    if (pattern != null) {
      myWildcardPatterns.add(wildcardPattern);
      if (isPatternNegated(wildcardPattern)) {
        myNegatedCompiledPatterns.add(pattern);
      }
      else {
        myCompiledPatterns.add(pattern);
      }
    }
  }

  public void removeResourceFilePatterns() {
    removeWildcardPatterns();
  }

  private void removeRegexpPatterns() {
    myRegexpResourcePatterns.clear();
  }

  private void removeWildcardPatterns() {
    myWildcardPatterns.clear();
    myCompiledPatterns.clear();
    myNegatedCompiledPatterns.clear();
  }

  private static CompiledPattern convertToRegexp(String wildcardPattern) {
    if (isPatternNegated(wildcardPattern)) {
      wildcardPattern = wildcardPattern.substring(1);
    }

    wildcardPattern = FileUtil.toSystemIndependentName(wildcardPattern);

    String srcRoot = null;
    int colon = wildcardPattern.indexOf(":");
    if (colon > 0) {
      srcRoot = wildcardPattern.substring(0, colon);
      wildcardPattern = wildcardPattern.substring(colon + 1);
    }

    String dirPattern = null;
    int slash = wildcardPattern.lastIndexOf('/');
    if (slash >= 0) {
      dirPattern = wildcardPattern.substring(0, slash + 1);
      wildcardPattern = wildcardPattern.substring(slash + 1);
      if (!dirPattern.startsWith("/")) {
        dirPattern = "/" + dirPattern;
      }
      //now dirPattern starts and ends with '/'

      dirPattern = normalizeWildcards(dirPattern);

      dirPattern = StringUtil.replace(dirPattern, "/.*.*/", "(/.*)?/");
      dirPattern = StringUtil.trimEnd(dirPattern, "/");

      dirPattern = optimize(dirPattern);
    }

    wildcardPattern = normalizeWildcards(wildcardPattern);
    wildcardPattern = optimize(wildcardPattern);

    final Pattern dirCompiled = dirPattern == null ? null : compilePattern(dirPattern);
    final Pattern srcCompiled = srcRoot == null ? null : compilePattern(optimize(normalizeWildcards(srcRoot)));
    return new CompiledPattern(compilePattern(wildcardPattern), dirCompiled, srcCompiled);
  }

  private static String optimize(String wildcardPattern) {
    return wildcardPattern.replaceAll("(?:\\.\\*)+", ".*");
  }

  private static String normalizeWildcards(String wildcardPattern) {
    wildcardPattern = StringUtil.replace(wildcardPattern, "\\!", "!");
    wildcardPattern = StringUtil.replace(wildcardPattern, ".", "\\.");
    wildcardPattern = StringUtil.replace(wildcardPattern, "*?", ".+");
    wildcardPattern = StringUtil.replace(wildcardPattern, "?*", ".+");
    wildcardPattern = StringUtil.replace(wildcardPattern, "*", ".*");
    wildcardPattern = StringUtil.replace(wildcardPattern, "?", ".");
    return wildcardPattern;
  }

  public static boolean isPatternNegated(String wildcardPattern) {
    return wildcardPattern.length() > 1 && wildcardPattern.charAt(0) == '!';
  }

  @Override
  public boolean isResourceFile(String name) {
    return isResourceFile(name, null);
  }

  private boolean matches(String s, Pattern p) {
    synchronized (myPatternMatcher) {
      try {
        return myPatternMatcher.matches(s, p);
      }
      catch (Exception e) {
        LOG.error("Exception matching file name \"" + s + "\" against the pattern \"" + p + "\"", e);
        return false;
      }
    }
  }

  private boolean isResourceFile(String name, @Nullable VirtualFile parent) {
    final Ref<String> parentRef = Ref.create(null);
    //noinspection ForLoopReplaceableByForEach
    for (int i = 0; i < myCompiledPatterns.size(); i++) {
      if (matches(name, parent, parentRef, myCompiledPatterns.get(i))) {
        return true;
      }
    }

    if (myNegatedCompiledPatterns.isEmpty()) {
      return false;
    }

    //noinspection ForLoopReplaceableByForEach
    for (int i = 0; i < myNegatedCompiledPatterns.size(); i++) {
      if (matches(name, parent, parentRef, myNegatedCompiledPatterns.get(i))) {
        return false;
      }
    }
    return true;
  }

  private boolean matches(String name, VirtualFile parent, Ref<String> parentRef, CompiledPattern pair) {
    if (!matches(name, pair.fileName)) {
      return false;
    }

    if (parent != null && (pair.dir != null || pair.srcRoot != null)) {
      VirtualFile srcRoot = ProjectRootManager.getInstance(myProject).getFileIndex().getSourceRootForFile(parent);
      if (pair.dir != null) {
        String parentPath = parentRef.get();
        if (parentPath == null) {
          parentRef.set(parentPath = srcRoot == null ? parent.getPath() : VfsUtilCore.getRelativePath(parent, srcRoot, '/'));
        }
        if (parentPath == null || !matches("/" + parentPath, pair.dir)) {
          return false;
        }
      }

      if (pair.srcRoot != null) {
        String srcRootName = srcRoot == null ? null : srcRoot.getName();
        if (srcRootName == null || !matches(srcRootName, pair.srcRoot)) {
          return false;
        }
      }
    }

    return true;
  }

  public void readExternal(Element parentNode)  {
    myState = XmlSerializer.deserialize(parentNode, State.class);
    if (!myProject.isDefault()) {
      for (Element option : parentNode.getChildren("option")) {
        if ("DEFAULT_COMPILER".equals(option.getAttributeValue("name"))) {
          myState.compilerWasSpecified = true;
          break;
        }
      }
      if (myState.BUILD_PROCESS_HEAP_SIZE == DEFAULT_BUILD_PROCESS_HEAP_SIZE) {
        final CompilerWorkspaceConfiguration workspace = CompilerWorkspaceConfiguration.getInstance(myProject);
        // older version compatibility: as a fallback load this setting from workspace
        myState.BUILD_PROCESS_HEAP_SIZE = workspace.COMPILER_PROCESS_HEAP_SIZE;
      }
    }

    final Element notNullAssertions = parentNode.getChild(JpsJavaCompilerConfigurationSerializer.ADD_NOTNULL_ASSERTIONS);
    if (notNullAssertions != null) {
      myAddNotNullAssertions = Boolean.valueOf(notNullAssertions.getAttributeValue(JpsJavaCompilerConfigurationSerializer.ENABLED, "true"));
    }

    Element node = parentNode.getChild(JpsJavaCompilerConfigurationSerializer.EXCLUDE_FROM_COMPILE);
    if (node != null) {
      myExcludesConfiguration.getDelegate().readExternal(node);
    }

    try {
      removeRegexpPatterns();
      node = parentNode.getChild(JpsJavaCompilerConfigurationSerializer.RESOURCE_EXTENSIONS);
      if (node != null) {
        for (final Object o : node.getChildren(JpsJavaCompilerConfigurationSerializer.ENTRY)) {
          Element element = (Element)o;
          String pattern = element.getAttributeValue(JpsJavaCompilerConfigurationSerializer.NAME);
          if (!StringUtil.isEmpty(pattern)) {
            addRegexpPattern(pattern);
          }
        }
      }

      removeWildcardPatterns();
      node = parentNode.getChild(JpsJavaCompilerConfigurationSerializer.WILDCARD_RESOURCE_PATTERNS);
      if (node != null) {
        myWildcardPatternsInitialized = true;
        for (final Object o : node.getChildren(JpsJavaCompilerConfigurationSerializer.ENTRY)) {
          final Element element = (Element)o;
          String pattern = element.getAttributeValue(JpsJavaCompilerConfigurationSerializer.NAME);
          if (!StringUtil.isEmpty(pattern)) {
            addWildcardResourcePattern(pattern);
          }
        }
      }
    }
    catch (MalformedPatternException e) {
      LOG.error(e);
    }

    myModuleProcessorProfiles.clear();
    myProcessorsProfilesMap = null;

    final Element annotationProcessingSettings = parentNode.getChild(JpsJavaCompilerConfigurationSerializer.ANNOTATION_PROCESSING);
    if (annotationProcessingSettings != null) {
      final List profiles = annotationProcessingSettings.getChildren("profile");
      if (!profiles.isEmpty()) {
        for (Object elem : profiles) {
          final Element profileElement = (Element)elem;
          final boolean isDefault = "true".equals(profileElement.getAttributeValue("default"));
          if (isDefault) {
            AnnotationProcessorProfileSerializer.readExternal(myDefaultProcessorsProfile, profileElement);
          }
          else {
            final ProcessorConfigProfile profile = new ProcessorConfigProfileImpl("");
            AnnotationProcessorProfileSerializer.readExternal(profile, profileElement);
            myModuleProcessorProfiles.add(profile);
          }
        }
      }
      else {
        // assuming older format
        loadProfilesFromOldFormat(annotationProcessingSettings);
      }
    }

    myBytecodeTargetLevel = null;
    myModuleBytecodeTarget.clear();
    final Element bytecodeTargetElement = parentNode.getChild(JpsJavaCompilerConfigurationSerializer.BYTECODE_TARGET_LEVEL);
    if (bytecodeTargetElement != null) {
      myBytecodeTargetLevel = bytecodeTargetElement.getAttributeValue(JpsJavaCompilerConfigurationSerializer.TARGET_ATTRIBUTE);
      for (Element elem : bytecodeTargetElement.getChildren(JpsJavaCompilerConfigurationSerializer.MODULE)) {
        final String name = elem.getAttributeValue(JpsJavaCompilerConfigurationSerializer.NAME);
        if (name == null) {
          continue;
        }
        final String target = elem.getAttributeValue(JpsJavaCompilerConfigurationSerializer.TARGET_ATTRIBUTE);
        if (target == null) {
          continue;
        }
        myModuleBytecodeTarget.put(name, target);
      }
    }
  }

  private void loadProfilesFromOldFormat(Element processing) {
    // collect data
    final boolean isEnabled = Boolean.parseBoolean(processing.getAttributeValue(JpsJavaCompilerConfigurationSerializer.ENABLED, "false"));
    final boolean isUseClasspath = Boolean.parseBoolean(processing.getAttributeValue("useClasspath", "true"));
    final StringBuilder processorPath = new StringBuilder();
    final Set<String> optionPairs = new HashSet<String>();
    final Set<String> processors = new HashSet<String>();
    final List<Couple<String>> modulesToProcess = new ArrayList<Couple<String>>();

    for (Object child : processing.getChildren("processorPath")) {
      final Element pathElement = (Element)child;
      final String path = pathElement.getAttributeValue("value", (String)null);
      if (path != null) {
        if (processorPath.length() > 0) {
          processorPath.append(File.pathSeparator);
        }
        processorPath.append(path);
      }
    }

    for (Object child : processing.getChildren("processor")) {
      final Element processorElement = (Element)child;
      final String proc = processorElement.getAttributeValue(JpsJavaCompilerConfigurationSerializer.NAME, (String)null);
      if (proc != null) {
        processors.add(proc);
      }
      final StringTokenizer tokenizer = new StringTokenizer(processorElement.getAttributeValue("options", ""), " ", false);
      while (tokenizer.hasMoreTokens()) {
        final String pair = tokenizer.nextToken();
        optionPairs.add(pair);
      }
    }

    for (Object child : processing.getChildren("processModule")) {
      final Element moduleElement = (Element)child;
      final String name = moduleElement.getAttributeValue(JpsJavaCompilerConfigurationSerializer.NAME, (String)null);
      if (name == null) {
        continue;
      }
      final String dir = moduleElement.getAttributeValue("generatedDirName", (String)null);
      modulesToProcess.add(Couple.of(name, dir));
    }

    myDefaultProcessorsProfile.setEnabled(false);
    myDefaultProcessorsProfile.setObtainProcessorsFromClasspath(isUseClasspath);
    if (processorPath.length() > 0) {
      myDefaultProcessorsProfile.setProcessorPath(processorPath.toString());
    }
    if (!optionPairs.isEmpty()) {
      for (String pair : optionPairs) {
        final int index = pair.indexOf("=");
        if (index > 0) {
          myDefaultProcessorsProfile.setOption(pair.substring(0, index), pair.substring(index + 1));
        }
      }
    }
    for (String processor : processors) {
      myDefaultProcessorsProfile.addProcessor(processor);
    }

    final Map<String, Set<String>> dirNameToModulesMap = new HashMap<String, Set<String>>();
    for (Couple<String> moduleDirPair : modulesToProcess) {
      final String dir = moduleDirPair.getSecond();
      Set<String> set = dirNameToModulesMap.get(dir);
      if (set == null) {
        set = new HashSet<String>();
        dirNameToModulesMap.put(dir, set);
      }
      set.add(moduleDirPair.getFirst());
    }

    int profileIndex = 0;
    for (Map.Entry<String, Set<String>> entry : dirNameToModulesMap.entrySet()) {
      final String dirName = entry.getKey();
      final ProcessorConfigProfile profile = new ProcessorConfigProfileImpl(myDefaultProcessorsProfile);
      profile.setName("Profile" + (++profileIndex));
      profile.setEnabled(isEnabled);
      profile.setGeneratedSourcesDirectoryName(dirName, false);
      for (String moduleName : entry.getValue()) {
        profile.addModuleName(moduleName);
      }
      myModuleProcessorProfiles.add(profile);
    }
  }

  @Override
  @NotNull @NonNls
  public String getComponentName() {
    return "CompilerConfiguration";
  }

  public BackendCompiler getDefaultCompiler() {
    createCompilers();
    return myDefaultJavaCompiler;
  }

  /**
   * @param defaultCompiler The compiler that is passed as a parameter to setDefaultCompiler()
   * must be one of the registered compilers in compiler configuration.
   * Otherwise because of lazy compiler initialization, the value of default compiler will point to some other compiler instance
   */
  public void setDefaultCompiler(BackendCompiler defaultCompiler) {
    myDefaultJavaCompiler = defaultCompiler;
    myState.DEFAULT_COMPILER = defaultCompiler.getId();
  }

  public void convertPatterns() {
    if (!needPatternConversion()) {
      return;
    }
    try {
      boolean ok;
      try {
        ok = doConvertPatterns();
      }
      catch (MalformedPatternException ignored) {
        ok = false;
      }
      if (!ok) {
        final String initialPatternString = patternsToString(getRegexpPatterns());
        final String message = CompilerBundle.message(
          "message.resource.patterns.format.changed",
          ApplicationNamesInfo.getInstance().getProductName(),
          initialPatternString,
          CommonBundle.getOkButtonText(),
          CommonBundle.getCancelButtonText()
        );
        final String wildcardPatterns = Messages.showInputDialog(
          myProject, message, CompilerBundle.message("pattern.conversion.dialog.title"), Messages.getWarningIcon(), initialPatternString, new InputValidator() {
          @Override
          public boolean checkInput(String inputString) {
            return true;
          }
          @Override
          public boolean canClose(String inputString) {
            final StringTokenizer tokenizer = new StringTokenizer(inputString, ";", false);
            StringBuilder malformedPatterns = new StringBuilder();

            while (tokenizer.hasMoreTokens()) {
              String pattern = tokenizer.nextToken();
              try {
                addWildcardResourcePattern(pattern);
              }
              catch (MalformedPatternException e) {
                malformedPatterns.append("\n\n");
                malformedPatterns.append(pattern);
                malformedPatterns.append(": ");
                malformedPatterns.append(e.getMessage());
              }
            }

            if (malformedPatterns.length() > 0) {
              Messages.showErrorDialog(CompilerBundle.message("error.bad.resource.patterns", malformedPatterns.toString()),
                                       CompilerBundle.message("bad.resource.patterns.dialog.title"));
              removeWildcardPatterns();
              return false;
            }
            return true;
          }
        });
        if (wildcardPatterns == null) { // cancel pressed
          loadDefaultWildcardPatterns();
        }
      }
    }
    finally {
      myWildcardPatternsInitialized = true;
    }
  }

  private boolean needPatternConversion() {
    return !myWildcardPatternsInitialized && !myRegexpResourcePatterns.isEmpty();
  }

  private boolean doConvertPatterns() throws MalformedPatternException {
    final String[] regexpPatterns = getRegexpPatterns();
    final List<String> converted = new ArrayList<String>();
    final Pattern multipleExtensionsPatternPattern = compilePattern("\\.\\+\\\\\\.\\((\\w+(?:\\|\\w+)*)\\)");
    final Pattern singleExtensionPatternPattern = compilePattern("\\.\\+\\\\\\.(\\w+)");
    final Perl5Matcher matcher = new Perl5Matcher();
    for (final String regexpPattern : regexpPatterns) {
      //final Matcher multipleExtensionsMatcher = multipleExtensionsPatternPattern.matcher(regexpPattern);
      if (matcher.matches(regexpPattern, multipleExtensionsPatternPattern)) {
        final MatchResult match = matcher.getMatch();
        final StringTokenizer tokenizer = new StringTokenizer(match.group(1), "|", false);
        while (tokenizer.hasMoreTokens()) {
          converted.add("?*." + tokenizer.nextToken());
        }
      }
      else {
        //final Matcher singleExtensionMatcher = singleExtensionPatternPattern.matcher(regexpPattern);
        if (matcher.matches(regexpPattern, singleExtensionPatternPattern)) {
          final MatchResult match = matcher.getMatch();
          converted.add("?*." + match.group(1));
        }
        else {
          return false;
        }
      }
    }
    for (final String aConverted : converted) {
      addWildcardResourcePattern(aConverted);
    }
    return true;
  }

  private static String patternsToString(final String[] patterns) {
    final StringBuilder extensionsString = new StringBuilder();
    for (int idx = 0; idx < patterns.length; idx++) {
      if (idx > 0) {
        extensionsString.append(";");
      }
      extensionsString.append(patterns[idx]);
    }
    return extensionsString.toString();
  }

  @Override
  public boolean isCompilableResourceFile(final Project project, final VirtualFile file) {
    if (!isResourceFile(file)) {
      return false;
    }
    final Collection<? extends Artifact> artifacts = ArtifactBySourceFileFinder.getInstance(project).findArtifacts(file);
    return artifacts.isEmpty();
  }

  private static class CompiledPattern {
    @NotNull final Pattern fileName;
    @Nullable final Pattern dir;
    @Nullable final Pattern srcRoot;

    private CompiledPattern(@NotNull Pattern fileName, @Nullable Pattern dir, @Nullable Pattern srcRoot) {
      this.fileName = fileName;
      this.dir = dir;
      this.srcRoot = srcRoot;
    }
  }

  private static Element addChild(Element parent, final String childName) {
    final Element child = new Element(childName);
    parent.addContent(child);
    return child;
  }

  private static class ExcludesConfigNotificationsWrapper<T extends ExcludesConfiguration> implements ExcludesConfiguration {
    private final Project myProject;
    private final T myDelegate;

    public ExcludesConfigNotificationsWrapper(@NotNull Project project, @NotNull T delegate) {
      myProject = project;
      myDelegate = delegate;
    }

    @NotNull
    public T getDelegate() {
      return myDelegate;
    }

    @Override
    public ExcludeEntryDescription[] getExcludeEntryDescriptions() {
      return myDelegate.getExcludeEntryDescriptions();
    }

    @Override
    public void addExcludeEntryDescription(ExcludeEntryDescription description) {
      try {
        myDelegate.addExcludeEntryDescription(description);
      }
      finally {
        BuildManager.getInstance().clearState(myProject);
      }
    }

    @Override
    public void removeExcludeEntryDescription(ExcludeEntryDescription description) {
      try {
        myDelegate.removeExcludeEntryDescription(description);
      }
      finally {
        BuildManager.getInstance().clearState(myProject);
      }
    }

    @Override
    public void removeAllExcludeEntryDescriptions() {
      try {
        myDelegate.removeAllExcludeEntryDescriptions();
      }
      finally {
        BuildManager.getInstance().clearState(myProject);
      }
    }

    @Override
    public boolean containsExcludeEntryDescription(ExcludeEntryDescription description) {
      return myDelegate.containsExcludeEntryDescription(description);
    }

    @Override
    public boolean isExcluded(VirtualFile virtualFile) {
      return myDelegate.isExcluded(virtualFile);
    }
  }

}


text:
package com.satan.cimchat.core.android;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;

import com.satan.cimchat.core.nio.mutual.SentBody;

/**
 * 与服务端连接服务
 * @author 3979434
 *
 */
  public class CIMPushService extends Service {

	CIMConnectorManager manager;
	AlarmManager localAlarmManager;
    private IBinder binder=new CIMPushService.LocalBinder();
    PendingIntent localPendingIntent;
    @Override
    public void onCreate()
    {
    	manager = CIMConnectorManager.getManager(this.getApplicationContext());
    	localPendingIntent = PendingIntent.getBroadcast(this, 0, new Intent(this, KeepAliveReceiver.class), PendingIntent.FLAG_CANCEL_CURRENT);
    	localAlarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
    	localAlarmManager.setRepeating(AlarmManager.RTC_WAKEUP, 300000L + System.currentTimeMillis(),300000L, localPendingIntent);
    }

    @Override
    public int onStartCommand(Intent intent,int flags, int startId) {

    	String action;
    	if(intent==null)
    	{
    		 intent = new  Intent(CIMPushManager.ACTION_CONNECTION);
    		 String host = CIMDataConfig.getString(this, CIMDataConfig.KEY_CIM_SERVIER_HOST);
    	     int port =CIMDataConfig.getInt(this, CIMDataConfig.KEY_CIM_SERVIER_PORT);
    	     intent.putExtra(CIMDataConfig.KEY_CIM_SERVIER_HOST, host);
    	     intent.putExtra(CIMDataConfig.KEY_CIM_SERVIER_PORT, port);
    	}

    	action = intent.getStringExtra(CIMPushManager.SERVICE_ACTION);

    	if(CIMPushManager.ACTION_CONNECTION.equals(action))
    	{
    		String host = intent.getStringExtra(CIMDataConfig.KEY_CIM_SERVIER_HOST);
	    	int port = intent.getIntExtra(CIMDataConfig.KEY_CIM_SERVIER_PORT, 8088);
	    	manager.connect(host,port);
    	}

    	if(CIMPushManager.ACTION_SENDREQUEST.equals(action))
    	{
    		manager.send((SentBody) intent.getSerializableExtra(CIMPushManager.KEY_SEND_BODY));
    	}

    	if(CIMPushManager.ACTION_DISCONNECTION.equals(action))
    	{
    		manager.closeSession();
    	}

    	if(CIMPushManager.ACTION_DESTORY.equals(action))
    	{
    		localAlarmManager.cancel(localPendingIntent);
    		localPendingIntent.cancel();
    		manager.destroy();
    		this.stopSelf();
    		android.os.Process.killProcess(android.os.Process.myPid());
    	}

    	if(CIMPushManager.ACTION_CONNECTION_STATUS.equals(action))
    	{
    	     manager.deliverIsConnected();
    	}

    	if(CIMPushManager.ACTION_CONNECTION_KEEPALIVE.equals(action))
    	{

    	    if(!manager.isConnected())
    	    {
    	    	Log.d(CIMPushService.class.getSimpleName(), "isConnected() = false ");
    	    	String host = intent.getStringExtra(CIMDataConfig.KEY_CIM_SERVIER_HOST);
    	    	int port = intent.getIntExtra(CIMDataConfig.KEY_CIM_SERVIER_PORT, 28888);
    	    	manager.connect(host,port);
    	    }else
    	    {
    	    	Log.d(CIMPushService.class.getSimpleName(), "isConnected() = true ");
    	    }
    	}

    	return Service.START_REDELIVER_INTENT;
    }

	@Override
	public IBinder onBind(Intent arg0) {
		return binder;
	}

    public class LocalBinder extends Binder{

    	public CIMPushService getService()
    	{
            return CIMPushService.this;
        }
    }
}


text:
use strict;
use warnings;
use utf8;

use FindBin qw($Bin);
use lib "$Bin/../../lib";
use Google::Ads::GoogleAds::Client;
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
use Google::Ads::GoogleAds::Utils::SearchGoogleAdsIterator;
use
  Google::Ads::GoogleAds::V12::Services::GoogleAdsService::SearchGoogleAdsRequest;

use Getopt::Long qw(:config auto_help);
use Pod::Usage;
use Cwd qw(abs_path);

use constant PAGE_SIZE => 1000;

# The following parameter(s) should be provided to run the example. You can
# either specify these by changing the INSERT_XXX_ID_HERE values below, or on
# the command line.
#
# Parameters passed on the command line will override any parameters set in
# code.
#
# Running the example with -h will print the command line usage.
my $customer_id = "INSERT_CUSTOMER_ID_HERE";

sub get_hotel_ads_performance {
  my ($api_client, $customer_id) = @_;

  # Create a query that retrieves hotel-ads statistics for each campaign
  # and ad group. Returned statistics will be segmented by the check-in
  # day of week and length of stay.
  my $search_query =
    "SELECT campaign.id, campaign.advertising_channel_type, " .
    "ad_group.id, ad_group.status, " .
    "metrics.impressions, metrics.hotel_average_lead_value_micros, " .
    "segments.hotel_check_in_day_of_week, segments.hotel_length_of_stay " .
    "FROM hotel_performance_view WHERE segments.date DURING LAST_7_DAYS " .
    "AND campaign.advertising_channel_type = 'HOTEL' " .
    "AND ad_group.status = 'ENABLED' " .
    "ORDER BY metrics.impressions DESC LIMIT 50";

  # Create a search Google Ads request that will retrieve hotel-ads statistics
  # using pages of the specified page size.
  my $search_request =
    Google::Ads::GoogleAds::V12::Services::GoogleAdsService::SearchGoogleAdsRequest
    ->new({
      customerId => $customer_id,
      query      => $search_query,
      pageSize   => PAGE_SIZE
    });

  # Get the GoogleAdsService.
  my $google_ads_service = $api_client->GoogleAdsService();

  my $iterator = Google::Ads::GoogleAds::Utils::SearchGoogleAdsIterator->new({
    service => $google_ads_service,
    request => $search_request
  });

  # Iterate over all rows in all pages and print the requested field values for
  # each row.
  while ($iterator->has_next) {
    my $google_ads_row = $iterator->next;

    printf "Ad group ID %d in campaign ID %d with hotel check-in on %s " .
      "and %d day(s) of stay had %d impression(s) and %d average lead value " .
      "(in micros) during the last 7 days.\n", $google_ads_row->{adGroup}{id},
      $google_ads_row->{campaign}{id},
      $google_ads_row->{segments}{hotelCheckInDayOfWeek},
      $google_ads_row->{segments}{hotelLengthOfStay},
      $google_ads_row->{metrics}{impressions},
      $google_ads_row->{metrics}{hotelAverageLeadValueMicros};
  }

  return 1;
}

# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
  return 1;
}

# Get Google Ads Client, credentials will be read from ~/googleads.properties.
my $api_client = Google::Ads::GoogleAds::Client->new();

# By default examples are set to die on any server returned fault.
$api_client->set_die_on_faults(1);

# Parameters passed on the command line will override any parameters set in code.
GetOptions("customer_id=s" => \$customer_id);

# Print the help message if the parameters are not initialized in the code nor
# in the command line.
pod2usage(2) if not check_params($customer_id);

# Call the example.
get_hotel_ads_performance($api_client, $customer_id =~ s/-//gr);

=pod

=head1 NAME

get_hotel_ads_performance

=head1 DESCRIPTION

This example gets Hotel-ads performance statistics for the 50 Hotel ad groups with
the most impressions over the last 7 days.

=head1 SYNOPSIS

get_hotel_ads_performance.pl [options]

    -help                       Show the help message.
    -customer_id                The Google Ads customer ID.

=cut


text:
<?php

namespace ZendTest\Dojo\Form\Element;

use Zend\Dojo\Form\Element\FilteringSelect as FilteringSelectElement,
    Zend\Dojo\View\Helper\Dojo as DojoHelper,
    Zend\Registry,
    Zend\Validator\InArray as InArrayValidator,
    Zend\View\View;

/**
 * Test class for Zend_Dojo_Form_Element_FilteringSelect.
 *
 * @category   Zend
 * @package    Zend_Dojo
 * @subpackage UnitTests
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @group      Zend_Dojo
 * @group      Zend_Dojo_Form
 */
class FilteringSelectTest extends \PHPUnit_Framework_TestCase
{
    /**
     * Sets up the fixture, for example, open a network connection.
     * This method is called before a test is executed.
     *
     * @return void
     */
    public function setUp()
    {
        Registry::_unsetInstance();
        DojoHelper::setUseDeclarative();

        $this->view    = $this->getView();
        $this->element = $this->getElement();
        $this->element->setView($this->view);
    }

    public function getView()
    {
        $view = new View();
        \Zend\Dojo\Dojo::enableView($view);
        return $view;
    }

    public function getElement()
    {
        $element = new FilteringSelectElement(
            'foo',
            array(
                'value' => 'some text',
                'label' => 'FilteringSelect',
                'class' => 'someclass',
                'style' => 'width: 100px;',
            )
        );
        return $element;
    }

    public function testShouldRenderFilteringSelectDijit()
    {
        $html = $this->element->render();
        $this->assertContains('dojoType="dijit.form.FilteringSelect"', $html);
    }

    /**
     * @group ZF-3286
     */
    public function testShouldRegisterInArrayValidatorWhenNoStoreProvided()
    {
        $options = array(
            'foo' => 'Foo Value',
            'bar' => 'Bar Value',
            'baz' => 'Baz Value',
        );
        $this->element->setMultiOptions($options);
        $this->assertFalse($this->element->getValidator('InArray'));
        $this->element->isValid('test');
        $validator = $this->element->getValidator('InArray');
        $this->assertTrue($validator instanceof InArrayValidator);
    }

    /**
     * @group ZF-3286
     */
    public function testShouldNotRegisterInArrayValidatorWhenStoreProvided()
    {
        $options = array(
            'foo' => 'Foo Value',
            'bar' => 'Bar Value',
            'baz' => 'Baz Value',
        );
        $this->element->setMultiOptions($options);
        $this->element->setStoreId('fooStore')
                      ->setStoreType('dojo.data.ItemFileReadStore')
                      ->setStoreParams(array('url' => '/foo'));
        $this->assertFalse($this->element->getValidator('InArray'));
        $this->element->isValid('test');
        $this->assertFalse($this->element->getValidator('InArray'));
    }
}


text:
import * as config from 'config'
import * as mock from 'nock'
import * as HttpStatus from 'http-status-codes'

const serviceBaseURL: string = config.get<string>('idam.api.url')
const s2sAuthServiceBaseURL = config.get<string>('idam.service-2-service-auth.url')
const defaultServiceAuthToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpZGFtIiwiaWF0IjoxNDgzMjI4ODAwLCJleHAiOjQxMDI0NDQ4MDAsImF1ZCI6ImNtYyIsInN1YiI6ImNtYyJ9.Q9-gf315saUt007Gau0tBUxevcRwhEckLHzC82EVGIM' // valid until 1st Jan 2100

export function resolveRetrieveUserFor (id: string, ...roles: string[]): mock.Scope {
  return mock(serviceBaseURL)
    .get('/details')
    .reply(HttpStatus.OK, { id: id, roles: roles })
}

export function resolveRetrieveAuthTokenFor (token: string = defaultServiceAuthToken) {

  mock(serviceBaseURL)
    .post(new RegExp('/oauth2/token'))
    .reply(HttpStatus.OK, {
      access_token: token,
      token_type: 'Bearer',
      expires_in: 28800
    })
}

export function rejectRetrieveUserFor (reason: string) {
  mock(serviceBaseURL)
    .get('/details')
    .reply(HttpStatus.FORBIDDEN, reason)
}

export function resolveRetrieveServiceToken (token: string = defaultServiceAuthToken): mock.Scope {
  return mock(s2sAuthServiceBaseURL)
    .post('/lease')
    .reply(HttpStatus.OK, token)
}

export function rejectRetrieveServiceToken (reason: string = 'HTTP error') {
  return mock(s2sAuthServiceBaseURL)
    .post('/lease')
    .reply(HttpStatus.INTERNAL_SERVER_ERROR, reason)
}


text:
package io.github.codemumbler.svn;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import org.tmatesoft.svn.core.SVNDirEntry;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNNodeKind;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
import org.tmatesoft.svn.core.wc.SVNWCUtil;

import java.util.Calendar;
import java.util.Date;

@RunWith(PowerMockRunner.class)
@PrepareForTest({SVNRepositoryFactory.class, SVNWCUtil.class})
public class SVNScannerTest {

	private static final String SVN_URL = "svn://url";
	private SVNScanner scanner;

	@Before
	public void setUp() throws Exception {
		MockSVNRepository repository = new MockSVNRepository(SVNURL.parseURIEncoded(SVN_URL), null);
		Calendar date = Calendar.getInstance();
		repository.addSVNDirEntry(createDirEntry("/branches", "branchA", date.getTime()));
		repository.addSVNDirEntry(createDirEntry("/tags", "tagA", date.getTime()));
		date.roll(Calendar.YEAR, -1);
		repository.addSVNDirEntry(createDirEntry("/branches", "branchB", date.getTime()));
		repository.addSVNDirEntry(createDirEntry("/tags", "tagB", date.getTime()));
		PowerMockito.mockStatic(SVNRepositoryFactory.class);
		PowerMockito.doReturn(repository).when(SVNRepositoryFactory.class, "create", org.mockito.Matchers.any(SVNURL.class));
		scanner = new SVNScanner(SVN_URL, "username", "password");
	}

	private SVNDirEntry createDirEntry(String path, String name, Date date) throws SVNException {
		return new SVNDirEntry(SVNURL.parseURIEncoded(SVN_URL + path),
				SVNURL.parseURIEncoded(SVN_URL), name, SVNNodeKind.DIR, 4, false, 5, date, "user1");
	}

	@Test
	public void listBranches() throws Exception {
		Assert.assertEquals("[branchA, branchB]", scanner.listBranches().toString());
	}

	@Test
	public void listOldBranches() throws Exception {
		Calendar threeMonthsAgo = Calendar.getInstance();
		threeMonthsAgo.roll(Calendar.MONTH, -3);
		Assert.assertEquals("[branchB]", scanner.listBranches(threeMonthsAgo).toString());
	}

	@Test
	public void listOldTags() throws Exception {
		Calendar threeMonthsAgo = Calendar.getInstance();
		threeMonthsAgo.roll(Calendar.MONTH, -3);
		Assert.assertEquals("[tagB]", scanner.listTags(threeMonthsAgo).toString());
	}
}


text:
<?php
namespace Xicrow\PhpDebug;

/**
 * Class TimerItem
 *
 * @package Xicrow\PhpDebug
 */
class TimerItem
{
	public ?string $strKey    = null;
	public ?string $strParent = null;
	public ?int    $iLevel    = null;
	public ?int    $iCount    = null;
	public ?float  $fBegin    = null;
	public ?float  $fEnd      = null;

	/**
	 * TimerItem constructor.
	 *
	 * @param string|null $strKey
	 * @param string|null $strParent
	 * @param int|null    $iLevel
	 * @param int|null    $iCount
	 * @param float|null  $fStart
	 * @param float|null  $fStop
	 */
	public function __construct(?string $strKey = null, ?string $strParent = null, ?int $iLevel = null, ?int $iCount = null, ?float $fStart = null, ?float $fStop = null)
	{
		$this->strKey    = $strKey;
		$this->strParent = $strParent;
		$this->iLevel    = $iLevel;
		$this->iCount    = $iCount;
		$this->fBegin    = $fStart;
		$this->fEnd      = $fStop;
	}

	/**
	 * @return float|null
	 */
	public function getElapsed(): ?float
	{
		if ($this->fBegin === null || $this->fEnd === null) {
			return null;
		}

		return $this->fEnd - $this->fBegin;
	}
}


text:
package com.blogspot.sontx.bottle.view.interfaces;

import com.blogspot.sontx.bottle.model.bean.chat.Channel;

import java.util.List;

public interface ListChannelView extends ViewBase {
    void clearChannels();

    void showChannel(Channel channel);

    void showChannels(List<Channel> channels);

    void removeChannel(String channelId);
}


text:
'''
https://github.com/dghost/glslRiftDistort
http://rifty-business.blogspot.de/2013/09/a-complete-cross-platform-oculus-rift.html
https://developer.oculusvr.com/forums/viewtopic.php?f=20&t=88

http://openglbook.com/chapter-4-entering-the-third-dimension.html
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/
http://pyopengl.sourceforge.net/context/tutorials/
http://pyopengl.sourceforge.net/context/tutorials/shader_2.html
http://pyopengl.sourceforge.net/context/tutorials/shader_1.html

'''
from   OpenGL.arrays import vbo
from   OpenGL.GL import *
from   OpenGL.GL import shaders
import numpy
from   numpy import array
import pyglfw.pyglfw as fw
import sys

def main():
  ### Initialize
  fw.init()

  ### Hints
  # ok, that doesn't work... can't get context for that
  # fw.Window.hint(stereo=True)

  ### Monitor Info
  # print_all_monitors()

  ### Rift
  monitor = get_rift()
  curmode = monitor.video_mode
  curmode.refresh_rate # should be 74

  # Check for Monitor - really should check for Rift attach/detach...
  # this doesn't work like I think it should
  fw.Monitor.set_callback(on_monitor)

  win = CbWindow(640, 480, 'pyglfw')
  win.make_current()

  while not win.should_close:

    render()

    win.swap_buffers()
    fw.poll_events()

    if win.keys.escape:
        win.should_close = True

  fw.terminate()

def render():
  # blue bg
  blue = (0.0, 0.0, 1.0, 0.0)
  glClearColor(*blue)
  glClear(GL_COLOR_BUFFER_BIT)

  # this should go in an init function really
  # http://pyopengl.sourceforge.net/context/tutorials/shader_1.html
  VERTEX_SHADER = shaders.compileShader("""
    #version 120
    void main() {
      gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
    }
  """, GL_VERTEX_SHADER)

  FRAGMENT_SHADER = shaders.compileShader("""
    #version 120
    void main() {
      gl_FragColor = vec4( 0, 1, 0, 1 );
    }
  """, GL_FRAGMENT_SHADER)

  shader = shaders.compileProgram(VERTEX_SHADER,FRAGMENT_SHADER)

  myvbo = vbo.VBO(
    array( [
      [  0, 1, 0 ],
      [ -1,-1, 0 ],
      [  1,-1, 0 ],
      [  2,-1, 0 ],
      [  4,-1, 0 ],
      [  4, 1, 0 ],
      [  2,-1, 0 ],
      [  4, 1, 0 ],
      [  2, 1, 0 ],
    ],'f')
  )

  shaders.glUseProgram(shader)
  try:
    myvbo.bind()
    try:
      glEnableClientState(GL_VERTEX_ARRAY);
      glVertexPointerf(myvbo)
      glDrawArrays(GL_TRIANGLES, 0, 9)
    finally:
      myvbo.unbind()
      glDisableClientState(GL_VERTEX_ARRAY);
  finally:
    shaders.glUseProgram(0)

class DK2():
  def __init__(self):
    pass

def on_monitor(_monitor, _event):
  change_markers = {fw.Monitor.CONNECTED: '+', fw.Monitor.DISCONNECTED: '-'}
  change = change_markers.get(_event, '~')
  print("screen: %s %s" % (change, _monitor.name))

class CbWindow(fw.Window):
  def __init__(self, *args, **kwargs):
    super(CbWindow, self).__init__(*args, **kwargs)

    self.set_key_callback(CbWindow.key_callback)
    self.set_char_callback(CbWindow.char_callback)
    self.set_scroll_callback(CbWindow.scroll_callback)
    self.set_mouse_button_callback(CbWindow.mouse_button_callback)
    self.set_cursor_enter_callback(CbWindow.cursor_enter_callback)
    self.set_cursor_pos_callback(CbWindow.cursor_pos_callback)
    self.set_window_size_callback(CbWindow.window_size_callback)
    self.set_window_pos_callback(CbWindow.window_pos_callback)
    self.set_window_close_callback(CbWindow.window_close_callback)
    self.set_window_refresh_callback(CbWindow.window_refresh_callback)
    self.set_window_focus_callback(CbWindow.window_focus_callback)
    self.set_window_iconify_callback(CbWindow.window_iconify_callback)
    self.set_framebuffer_size_callback(CbWindow.framebuffer_size_callback)

  def key_callback(self, key, scancode, action, mods):
    print(
      "keybrd: key=%s scancode=%s action=%s mods=%s" %
      (key, scancode, action, mods))

  def char_callback(self, char):
    print("unichr: char=%s" % char)

  def scroll_callback(self, off_x, off_y):
    print("scroll: x=%s y=%s" % (off_x, off_y))

  def mouse_button_callback(self, button, action, mods):
    print("button: button=%s action=%s mods=%s" % (button, action, mods))

  def cursor_enter_callback(self, status):
    print("cursor: status=%s" % status)

  def cursor_pos_callback(self, pos_x, pos_y):
    print("curpos: x=%s y=%s" % (pos_x, pos_y))

  def window_size_callback(self, wsz_w, wsz_h):
    print("window: w=%s h=%s" % (wsz_w, wsz_h))

  def window_pos_callback(self, pos_x, pos_y):
    print("window: x=%s y=%s" % (pos_x, pos_y))

  def window_close_callback(self):
    print("should: %s" % self.should_close)

  def window_refresh_callback(self):
    print("redraw")

  def window_focus_callback(self, status):
    print("active: status=%s" % status)

  def window_iconify_callback(self, status):
    print("hidden: status=%s" % status)

  def framebuffer_size_callback(self, fbs_x, fbs_y):
    print("buffer: x=%s y=%s" % (fbs_x, fbs_y))

  ### Swap
  # window.swap_interval(0)
  # window.make_current()
  # window.swap_buffers()

def print_all_monitors():
  '''
  note you can run xrandr in the command line to get the info as well
  rift will look like:

  DP-0 connected primary 1920x1080+0+0 left (normal left inverted right x axis y axis) 71mm x 126mm
    1080x1920      75.0*+   72.0     60.0
    1080x948      120.0

  '''
  print
  for monitor in fw.get_monitors():
    print monitor.name
    print monitor.physical_size
    print monitor.pos
    for mode in monitor.video_modes:
      print '  mode:'
      print '    %s' % mode.width
      print '    %s' % mode.height
      print '    %s' % mode.refresh_rate
    print

def get_rift():
  '''
  http://unix.stackexchange.com/questions/67983/get-monitor-make-and-model-and-other-info-in-human-readable-form
  http://superuser.com/questions/800572/interpret-edid-information-to-get-manufacturer-and-type-number-of-my-laptop-scre
  http://ubuntuforums.org/showthread.php?t=1946208
  https://github.com/glfw/glfw/issues/212

  If we could easily read the EDID that'd be much easier
  Vendor is OVR

  read-edid barfs w/ Nvida (maybe can use NV-CONTROL)

  xrandr --verbose works...
  '''

  # For now, lets do the easiest thing and get it by physical size of DK2
  for monitor in fw.get_monitors():
    if monitor.physical_size == (71, 126):
      return monitor

  ### TODO: DK1 physical size

  # If we're still here (no rift?), lets just return the primary display
  return fw.get_primary_monitor()

'''
# If a new monitor is connected...
def on_monitor_event(monitor, event):
  if event == glfw.Monitor.CONNECTED:
    print(monitor.name)

glfw.Monitor.set_callback(on_monitor_event)

# Hints
glfw.Window.hint()
glfw.Window.hint(client_api=glfw.Window.OPENGL_API)
w, h = curmode.width, curmode.height
window = glfw.Window(w, h, 'pyglfw')
window.close()

GLFW_STEREO   GL_FALSE  GL_TRUE or GL_FALSE
The GLFW_STEREO hint specifies whether to use stereoscopic rendering.

GLFW_REFRESH_RATE   0   0 to INT_MAX
The GLFW_REFRESH_RATE hint specifies the desired refresh rate for full screen windows. If set to zero, the highest available refresh rate will be used. This hint is ignored for windowed mode windows.

# Swap
# makes context current
# and restores previous
window.swap_interval(0)
window.make_current()
window.swap_buffers()

# Windows
if not window.should_close:
  window.set_title('pyglfw')
  size = window.size
  window.show()
is_visible = window.visible
client_api = window.client_api
window.has_focus = True

def on_window_size(window, w, h):
  window.size = size

window.set_window_size_callback(on_window_size)

# Inputs
mode = window.sticky_keys
window.sticky_mice = mode
is_escape = window.keys.escape
is_middle = window.mice.middle
cursor_at = window.cursor_pos

def on_key(window, key, scancode, action, mods):
  if key == glfw.Keys.ESCAPE:
    window.should_close = True

window.set_key_callback(on_key)

js = glfw.Joystick(0)

if js:
  joy_name = js.name
  joy_axes = js.axes
'''

if __name__ == '__main__':
  main()


text:
<?php
// $Id: panels-twocol.tpl.php,v 1.1.2.1 2008/12/16 21:27:58 merlinofchaos Exp $
/**
 * @file
 * Template for a 2 column panel layout.
 *
 * This template provides a two column panel display layout, with
 * each column roughly equal in width.
 *
 * Variables:
 * - $id: An optional CSS id to use for the layout.
 * - $content: An array of content, each item in the array is keyed to one
 *   panel of the layout. This layout supports the following sections:
 *   - $content['left']: Content in the left column.
 *   - $content['right']: Content in the right column.
 */
?>
<div class="panel-display panel-wideright clear-block" <?php if (!empty($css_id)) { print "id=\"$css_id\""; } ?>>

<?php print $content['right']; ?>

<?php print $content['rightlower']; ?>

		<?php
		if (!empty($content['left'])) {
			echo "

" . $content['left'] . "
";
		} ?>

		<?php
		if (!empty($content['left2'])) {
			echo "
" . $content['left2'] . "
";
		} ?>

		<?php
		if (!empty($content['left3'])) {
			echo "
" . $content['left3'] . "
";
		} ?>


text:
package system

import (
    "os"
    "path/filepath"
)

// MkdirAll creates a directory named path along with any necessary parents,
// with permission specified by attribute perm for all dir created.
func MkdirAll(path string, perm os.FileMode) error {
    return os.MkdirAll(path, perm)
}

// IsAbs is a platform-specific wrapper for filepath.IsAbs.
func IsAbs(path string) bool {
    return filepath.IsAbs(path)
}


text:
// .NAME vtkSMPThreadLocalObject - Thread local storage for VTK objects.
// .SECTION Description
// This class essentially does the same thing as vtkSMPThreadLocal with
// 2 additional functions:
// - Local() allocates an object of the template argument type using ::New
// - The destructor calls Delete() on all objects created with Local().
//
// .SECTION Warning
// There is absolutely no guarantee to the order in which the local objects
// will be stored and hence the order in which they will be traversed when
// using iterators. You should not even assume that two vtkSMPThreadLocal
// populated in the same parallel section will be populated in the same
// order. For example, consider the following
// \verbatim
// vtkSMPThreadLocal<int> Foo;
// vtkSMPThreadLocal<int> Bar;
// class AFunctor
// {
//    void Initialize() const
//    {
//      int& foo = Foo.Local();
//      int& bar = Bar.Local();
//      foo = random();
//      bar = foo;
//    }
//
//    void operator()(vtkIdType, vtkIdType)
//    {}
//    void Finalize()
//    {}
// };
//
// AFunctor functor;
// vtkSMPTools::For(0, 100000, functor);
//
// vtkSMPThreadLocal<int>::iterator itr1 = Foo.begin();
// vtkSMPThreadLocal<int>::iterator itr2 = Bar.begin();
// while (itr1 != Foo.end())
// {
//   assert(*itr1 == *itr2);
//   ++itr1; ++itr2;
// }
// \endverbatim
//
// It is possible and likely that the assert() will fail using the TBB
// backend. So if you need to store values related to each other and
// iterate over them together, use a struct or class to group them together
// and use a thread local of that class.
//
// .SECTION See Also
// vtkSMPThreadLocal

#ifndef __vtkSMPThreadLocalObject_h
#define __vtkSMPThreadLocalObject_h

#include <vtkSMPThreadLocal.h>

template <typename T>
class vtkSMPThreadLocalObject
{
  typedef vtkSMPThreadLocal<T*> TLS;
  typedef typename vtkSMPThreadLocal<T*>::iterator TLSIter;

  // Hide the copy constructor for now and assignment
  // operator for now.
  vtkSMPThreadLocalObject(const vtkSMPThreadLocalObject&);
  void operator=(const vtkSMPThreadLocalObject&);

public:
  // Description:
  // Default constructor.
  vtkSMPThreadLocalObject() : Internal(0)
    {
    }

  virtual ~vtkSMPThreadLocalObject()
    {
      iterator iter = this->begin();
      while (iter != this->end())
        {
        if (*iter)
          {
          (*iter)->Delete();
          }
        ++iter;
        }
    }

  // Description:
  // Returns an object local to the current thread.
  // This object is allocated with ::New() and will
  // be deleted in the destructor of vtkSMPThreadLocalObject.
  T*& Local()
    {
      T*& vtkobject = this->Internal.Local();
      if (!vtkobject)
        {
        vtkobject = T::New();
        }
      return vtkobject;
    }

  // Description:
  // Subset of the standard iterator API.
  // The most common design patter is to use iterators in a sequential
  // code block and to use only the thread local objects in parallel
  // code blocks.
  class iterator
  {
  public:
    iterator& operator++()
      {
        ++this->Iter;
        return *this;
      }

    bool operator!=(const iterator& other)
      {
        return this->Iter != other.Iter;
      }

    T*& operator*()
      {
        return *this->Iter;
      }

  private:
    TLSIter Iter;

    friend class vtkSMPThreadLocalObject<T>;
  };

  iterator begin()
    {
      iterator iter;
      iter.Iter = this->Internal.begin();
      return iter;
    };

  iterator end()
    {
      iterator iter;
      iter.Iter = this->Internal.end();
      return iter;
    }

private:
  TLS Internal;
};

#endif
// VTK-HeaderTest-Exclude: vtkSMPThreadLocalObject.h


text:
// A Unique Ptr like class that manages the lifecycle of any dependencies in
// addition to the primary owned object.
//
// This enables the use-case of returning ownership of an object to some client
// code without giving the client access to the dependencies, and automatically
// handling destruction upon destruction of the primary owned object.
#ifndef TENSORFLOW_SERVING_UTIL_UNIQUE_PTR_WITH_DEPS_H_
#define TENSORFLOW_SERVING_UTIL_UNIQUE_PTR_WITH_DEPS_H_

#include <algorithm>
#include <memory>
#include <vector>

#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow_serving/util/any_ptr.h"

namespace tensorflow {
namespace serving {

// Holds an object with its dependencies. On destruction deletes the main
// object and all dependencies, in the order inverse to the order of
// AddDependency/SetOwned calls.
template<typename T>
class UniquePtrWithDeps {
 public:
  UniquePtrWithDeps() {}
  explicit UniquePtrWithDeps(std::unique_ptr<T> object) {
    SetOwned(std::move(object));
  }
  explicit UniquePtrWithDeps(T* owned_object) { SetOwnedPtr(owned_object); }
  UniquePtrWithDeps(UniquePtrWithDeps&& other) = default;

  ~UniquePtrWithDeps() {
    // Delete all dependencies, starting with the one added last. Order of
    // destructing elements in vector/list is unspecified. The ownership of the
    // main object is kept as one of the dependencies.
    while (!deleters_.empty()) {
      deleters_.pop_back();
    }
  }

  template <typename X>
  X* AddDependency(std::unique_ptr<X> dependency) {
    X* raw = dependency.get();
    deleters_.emplace_back(std::move(dependency));
    return raw;
  }

  void SetOwned(std::unique_ptr<T> object) {
    object_ = AddDependency<T>(std::move(object));
  }
  void SetOwnedPtr(T* owned_object) {
    SetOwned(std::unique_ptr<T>(owned_object));
  }

  T* get() const { return object_; }
  const T& operator*() const { return *object_; }
  T* operator->() const { return get(); }

 private:
  std::vector<UniqueAnyPtr> deleters_;
  T* object_ = nullptr;
};

}  // namespace serving
}  // namespace tensorflow

#endif  // TENSORFLOW_SERVING_UTIL_UNIQUE_PTR_WITH_DEPS_H_


text:
import unittest
from paddle.v2.framework.framework import g_program
import paddle.v2.framework.core as core

class TestParameter(unittest.TestCase):
    def test_param(self):
        b = g_program.create_block()
        param = b.create_parameter(
            name='fc.w',
            shape=[784, 100],
            dtype='float32',
            initialize_attr={
                'type': 'uniform_random',
                'seed': 13,
                'min': -5.0,
                'max': 5.0
            })
        self.assertIsNotNone(param)
        self.assertEqual('fc.w', param.name)
        self.assertEqual((784, 100), param.shape)
        self.assertEqual(core.DataType.FP32, param.data_type)
        self.assertEqual(0, param.block.idx)

if __name__ == '__main__':
    unittest.main()


text:
package org.datavec.api.transform.metadata;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.datavec.api.transform.ColumnType;
import org.datavec.api.writable.Writable;
import org.nd4j.shade.jackson.annotation.JsonProperty;

/**
 * Metadata for an integer column
 *
 * @author Alex Black
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BooleanMetaData extends BaseColumnMetaData {

    public BooleanMetaData(@JsonProperty("name") String name) {
        super(name);
    }

    @Override
    public ColumnType getColumnType() {
        return ColumnType.Boolean;
    }

    @Override
    public boolean isValid(Writable writable) {
        boolean value;
        try {
            value = Boolean.parseBoolean(writable.toString());
        } catch (NumberFormatException e) {
            return false;
        }

        return true;
    }

    /**
     * Is the given object valid for this column,
     * given the column type and any
     * restrictions given by the
     * ColumnMetaData object?
     *
     * @param input object to check
     * @return true if value, false if invalid
     */
    @Override
    public boolean isValid(Object input) {
        boolean value;
        try {
            value = Boolean.parseBoolean(input.toString());
        } catch (NumberFormatException e) {
            return false;
        }

        return true;
    }

    @Override
    public BooleanMetaData clone() {
        return new BooleanMetaData(name);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("BooleanMetaData(name=\"").append(name).append("\",");
        sb.append(")");
        return sb.toString();
    }
}


text:
(function () {
    'use strict';

    angular.module('components')
        .filter('scientillaNumber', () => {
            return (number, digits) => {
                const num = parseFloat(number);
                if (!num) return '0';
                if (digits >= 0)
                    return num.toFixed(digits);

                return num.toString();
            };
        });
})();


text:
using System.ComponentModel.DataAnnotations;

namespace Discitur.CommandStack.ViewModel
{
    public class RegisterUserViewModel
    {
        public int UserId { get; set; }
        [Required]
        public string Name { get; set; }
        [Required]
        public string Surname { get; set; }
        [Required]
        public string Email { get; set; }
        [Required]
        [Display(Name = "User name")]
        public string UserName { get; set; }
        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }
        public string ActivationKey { get; set; }
    }

    public class ActivateUserViewModel
    {
        [Required]
        public string UserName { get; set; }
        [Required]
        public string Key { get; set; }
    }

    public class UpdateUserViewModel
    {
        [Required]
        public int UserId { get; set; }
        [Required]
        public string Name { get; set; }
        [Required]
        public string Surname { get; set; }
        [Required]
        public string Email { get; set; }
        [Required]
        public string UserName { get; set; }
        public string Picture { get; set; }
        public string Thumb { get; set; }
    }

    public class ChangeUserEmailViewModel
    {
        [Required]
        public int UserId { get; set; }
        [Required]
        public string Email { get; set; }
        [Required]
        public string UserName { get; set; }
    }

    public class ChangeUserPictureViewModel
    {
        [Required]
        public int UserId { get; set; }
        [Required]
        public byte[] Picture { get; set; }
    }

}


text:
package dc.longshot.screens;

import java.util.Collections;
import java.util.List;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
import com.badlogic.gdx.utils.viewport.ScreenViewport;

import dc.longshot.eventing.EventDelegate;
import dc.longshot.eventing.NoArgsEvent;
import dc.longshot.eventing.NoArgsListener;
import dc.longshot.game.FontSize;
import dc.longshot.models.GameSession;
import dc.longshot.models.Paths;
import dc.longshot.models.ScoreEntry;
import dc.longshot.models.ScoreEntryComparator;
import dc.longshot.system.Input;
import dc.longshot.ui.UIPack;
import dc.longshot.util.InputUtils;
import dc.longshot.util.Timer;
import dc.longshot.util.XmlContext;

public class HighScoresScreen implements Screen {

	private final EventDelegate<NoArgsListener> closedDelegate = new EventDelegate<NoArgsListener>();

	private final UIPack uiPack;
	private final GameSession gameSession;
	private XmlContext xmlContext = null;
	private ScoreEntry newScoreEntry = null;
	private TextField nameField = null;
	private Stage stage;
	private InputProcessor highScoresInputProcessor;
	private final Timer transitionTimer = new Timer(1);

	public HighScoresScreen(final UIPack uiPack, final GameSession gameSession) {
		this.uiPack = uiPack;
		this.gameSession = gameSession;
	}

	public HighScoresScreen(final UIPack uiPack, final GameSession gameSession, final XmlContext xmlContext,
			final int newScore) {
		this(uiPack, gameSession);
		this.xmlContext = xmlContext;
		newScoreEntry = new ScoreEntry("", newScore);
	}

	public final void addClosedListener(final NoArgsListener listener) {
		closedDelegate.listen(listener);
	}

	@Override
	public void render(final float delta) {
		stage.act(delta);
		transitionTimer.tick(delta);
		Gdx.gl.glClearColor(0, 0, 0, 0);
		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
		stage.draw();
	}

	@Override
	public void resize(final int width, final int height) {
	    stage.getViewport().update(width, height, true);
	}

	@Override
	public void show() {
		stage = createStage();
		Input.addProcessor(stage);
		highScoresInputProcessor = new HighScoresInputProcessor();
		Input.addProcessor(highScoresInputProcessor);
		InputUtils.setCursorVisible(true);
	}

	@Override
	public void hide() {
	}

	@Override
	public void pause() {
	}

	@Override
	public void resume() {
	}

	@Override
	public void dispose() {
		Input.removeProcessor(highScoresInputProcessor);
		Input.removeProcessor(stage);
		stage.dispose();
	}

	private Stage createStage() {
		Stage stage = new Stage(new ScreenViewport());
		Table mainTable = createMainTable(stage);
		stage.addActor(mainTable);
		return stage;
	}

	private Table createMainTable(final Stage stage) {
		Table mainTable = uiPack.table();
		mainTable.setFillParent(true);
		if (newScoreEntry == null) {
			mainTable.add(uiPack.label("High Scores")).row();
		}
		else {
			mainTable.add(uiPack.label("New High Score!  Enter your name below")).row();
		}
		mainTable.add(uiPack.lineBreak()).row();
		mainTable.add(createScoresTable(stage)).row();
		mainTable.add(uiPack.lineBreak()).row();
		mainTable.add(uiPack.label("Click or touch to continue...")).row();
		return mainTable;
	}

	private Table createScoresTable(final Stage stage) {
		Table scoresTable = uiPack.table();
		List<ScoreEntry> sortedHighScores = getSortedHighScores();
		for (ScoreEntry highScore : sortedHighScores) {
			Color fontColor;
			if (newScoreEntry != null && highScore == newScoreEntry) {
				fontColor = Color.YELLOW.cpy();
				nameField = createNameField(fontColor);
				scoresTable.add(nameField).left();
				stage.setKeyboardFocus(nameField);
			}
			else {
				fontColor = Color.WHITE.cpy();
				scoresTable.add(uiPack.label(highScore.name, FontSize.SMALL)).left();
			}
			final int scoreSpaceLeft = 100;
			String scoreString = Integer.toString(highScore.score);
			Label scoreLabel = uiPack.label(scoreString, FontSize.SMALL, fontColor);
			scoresTable.add(scoreLabel).spaceLeft(scoreSpaceLeft).right().row();
		}
		return scoresTable;
	}

	private List<ScoreEntry> getSortedHighScores() {
		List<ScoreEntry> sortedHighScores = gameSession.getSortedHighScores();
		if (newScoreEntry != null) {
			sortedHighScores.add(newScoreEntry);
		}
		Collections.sort(sortedHighScores, new ScoreEntryComparator());
		Collections.reverse(sortedHighScores);
		return sortedHighScores;
	}

	private TextField createNameField(final Color fontColor) {
		TextField nameField = uiPack.textField(FontSize.SMALL);
		nameField.getStyle().background = null;
		nameField.getStyle().fontColor = fontColor;
		final int maxNameLength = 10;
		nameField.setMaxLength(maxNameLength);
		return nameField;
	}

	private final class HighScoresInputProcessor implements InputProcessor {

		@Override
		public final boolean keyDown(final int keycode) {
			return false;
		}

		@Override
		public final boolean keyUp(final int keycode) {
			return false;
		}

		@Override
		public final boolean keyTyped(final char character) {
			return false;
		}

		@Override
		public final boolean touchDown(final int screenX, final int screenY, final int pointer, final int button) {
			if (transitionTimer.isElapsed()) {
				if (newScoreEntry != null) {
					newScoreEntry.name = nameField.getText();
					gameSession.addHighScore(newScoreEntry);
					xmlContext.marshal(gameSession, Gdx.files.local(Paths.GAME_SESSION_PATH));
				}
				closedDelegate.notify(new NoArgsEvent());
				return true;
			}
			return false;
		}

		@Override
		public final boolean touchUp(final int screenX, final int screenY, final int pointer, final int button) {
			return false;
		}

		@Override
		public final boolean touchDragged(final int screenX, final int screenY, final int pointer) {
			return false;
		}

		@Override
		public final boolean mouseMoved(final int screenX, final int screenY) {
			return false;
		}

		@Override
		public final boolean scrolled(final int amount) {
			return false;
		}

	}

}


text:
namespace Quiztroller.ViewModels
{
    using Autofac;

    public class ViewModelLocator
    {
        public ViewModelLocator()
        {
            if (Container == null)
            {
                Register();
            }
        }

        public static IContainer Container { get; private set; }

        public MainViewModel MainViewModel => Container.Resolve<MainViewModel>();

        public Mp3PlayerViewModel Mp3PlayerViewModel => Container.Resolve<Mp3PlayerViewModel>();

        public PowerPointControllerViewModel PowerPointControllerViewModel => Container.Resolve<PowerPointControllerViewModel>();

        public QuestionsViewModel QuestionsViewModel => Container.Resolve<QuestionsViewModel>();

        public ScoreboardViewModel ScoreboardViewModel => Container.Resolve<ScoreboardViewModel>();

        public LoginViewModel LoginViewModel => Container.Resolve<LoginViewModel>();

        public static void Register()
        {
            var containerBuilder = new ContainerBuilder();

            containerBuilder.RegisterType<MainViewModel>().SingleInstance();
            containerBuilder.RegisterType<Mp3PlayerViewModel>().SingleInstance();
            containerBuilder.RegisterType<PowerPointControllerViewModel>().SingleInstance();
            containerBuilder.RegisterType<QuestionsViewModel>().SingleInstance();
            containerBuilder.RegisterType<ScoreboardViewModel>().SingleInstance();
            containerBuilder.RegisterType<LoginViewModel>().SingleInstance();

            Container = containerBuilder.Build();
        }
    }
}


text:
package org.apache.camel.processor;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.processor.idempotent.MemoryIdempotentRepository;
import org.junit.Before;
import org.junit.Test;

/**
 * @version
 */
public class IdempotentConsumerRemoveOnFailureTest extends ContextTestSupport {
    protected Endpoint startEndpoint;
    protected MockEndpoint resultEndpoint;

    @Test
    public void testFailedExchangesNotRemoved() throws Exception {
        resultEndpoint.expectedBodiesReceived("one", "three");

        sendMessage("1", "one");
        sendMessage("2", "two");
        sendMessage("1", "one");
        sendMessage("2", "two");
        sendMessage("1", "one");
        sendMessage("3", "three");

        assertMockEndpointsSatisfied();
    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start").idempotentConsumer(header("messageId"), MemoryIdempotentRepository.memoryIdempotentRepository(200))
                        // in case of a failure we still want the message to be regarded as a duplicate, so we set the option to false
                        .removeOnFailure(false)
                        .process(new Processor() {
                            public void process(Exchange exchange) throws Exception {
                                String id = exchange.getIn().getHeader("messageId", String.class);
                                if (id.equals("2")) {
                                    throw new IllegalArgumentException("Damn I cannot handle id 2");
                                }
                            }
                        }).to("mock:result");
            }
        };
    }

    protected void sendMessage(final Object messageId, final Object body) {
        template.send(startEndpoint, new Processor() {
            public void process(Exchange exchange) {
                // now lets fire in a message
                Message in = exchange.getIn();
                in.setBody(body);
                in.setHeader("messageId", messageId);
            }
        });
    }

    @Override
    @Before
    public void setUp() throws Exception {
        super.setUp();
        startEndpoint = resolveMandatoryEndpoint("direct:start");
        resultEndpoint = getMockEndpoint("mock:result");
    }

}


text:
About Daplie: We're taking back the Internet!
--------------

Down with Google, Apple, and Facebook!

We're re-decentralizing the web and making it read-write again - one home cloud system at a time.

Tired of serving the Empire? Come join the Rebel Alliance:

jobs@daplie.com | [Invest in Daplie on Wefunder](https://daplie.com/invest/) | [Pre-order Cloud](https://daplie.com/preorder/), The World's First Home Server for Everyone

le-store-certbot
================

The "certbot" storage strategy for node-letsencrypt.

This le storage strategy aims to maintain compatibility with the
configuration files and file structure of the official certbot client.

Note: You cannot use this strategy on ephemeral instances (heroku, aws elastic).

Usage
-----

```bash
npm install --save le-store-certbot@2.x
```

```bash
var leStore = require('le-store-certbot').create({
  configDir: require('homedir')() + '/letsencrypt/etc'          // or /etc/letsencrypt or wherever
, privkeyPath: ':configDir/live/:hostname/privkey.pem'          //
, fullchainPath: ':configDir/live/:hostname/fullchain.pem'      // Note: both that :configDir and :hostname
, certPath: ':configDir/live/:hostname/cert.pem'                //       will be templated as expected by
, chainPath: ':configDir/live/:hostname/chain.pem'              //       node-letsencrypt

, workDir: require('homedir')() + '/letsencrypt/var/lib'
, logsDir: require('homedir')() + '/letsencrypt/var/log'

, webrootPath: '~/letsencrypt/srv/www/:hostname/.well-known/acme-challenge'

, debug: false
});

var LE = require('letsencrypt');

LE.create({
  server: LE.stagingServerUrl                               // Change to LE.productionServerUrl in production
, store: leStore
});
```

Example File Structure
----------------------

```
~/letsencrypt/
└── etc
    ├── accounts
    │   └── acme-staging.api.letsencrypt.org
    │       └── directory
    │           └── cd96ac4889ddfa47bfc66300ab223342
    │               ├── meta.json
    │               ├── private_key.json
    │               └── regr.json
    ├── archive
    │   └── example.daplie.me
    │       ├── cert0.pem
    │       ├── chain0.pem
    │       ├── fullchain0.pem
    │       └── privkey0.pem
    ├── live
    │   └── example.daplie.me
    │       ├── cert.pem
    │       ├── chain.pem
    │       ├── fullchain.pem
    │       ├── privkey.pem
    │       └── privkey.pem.bak
    └── renewal
        ├── example.daplie.me.conf
        └── example.daplie.me.conf.bak
```