text:
package org.apache.taverna.scufl2.wfdesc;

import static org.apache.taverna.scufl2.api.common.Scufl2Tools.NESTED_WORKFLOW;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.xml.namespace.QName;

import org.apache.taverna.scufl2.api.activity.Activity;
import org.apache.taverna.scufl2.api.annotation.Annotation;
import org.apache.taverna.scufl2.api.common.Child;
import org.apache.taverna.scufl2.api.common.Named;
import org.apache.taverna.scufl2.api.common.Scufl2Tools;
import org.apache.taverna.scufl2.api.common.URITools;
import org.apache.taverna.scufl2.api.common.WorkflowBean;
import org.apache.taverna.scufl2.api.common.Visitor.VisitorWithPath;
import org.apache.taverna.scufl2.api.configurations.Configuration;
import org.apache.taverna.scufl2.api.container.WorkflowBundle;
import org.apache.taverna.scufl2.api.core.DataLink;
import org.apache.taverna.scufl2.api.core.Processor;
import org.apache.taverna.scufl2.api.core.Workflow;
import org.apache.taverna.scufl2.api.io.WriterException;
import org.apache.taverna.scufl2.api.port.InputPort;
import org.apache.taverna.scufl2.api.port.OutputPort;
import org.apache.taverna.scufl2.api.port.WorkflowPort;
import org.apache.taverna.scufl2.api.profiles.ProcessorBinding;
import org.apache.taverna.scufl2.api.profiles.ProcessorPortBinding;
import org.apache.taverna.scufl2.api.profiles.Profile;
import org.openrdf.OpenRDFException;
import org.openrdf.concepts.rdfs.Resource;
import org.openrdf.elmo.ElmoModule;
import org.openrdf.elmo.sesame.SesameManager;
import org.openrdf.elmo.sesame.SesameManagerFactory;
import org.openrdf.query.parser.QueryParserRegistry;
import org.openrdf.query.parser.sparql.SPARQLParserFactory;
import org.openrdf.repository.Repository;
import org.openrdf.repository.contextaware.ContextAwareConnection;
import org.openrdf.rio.RDFFormat;
import org.openrdf.rio.helpers.OrganizedRDFWriter;
import org.purl.wf4ever.roterms.RotermsResource;
import org.purl.wf4ever.wf4ever.BeanshellScript;
import org.purl.wf4ever.wf4ever.CommandLineTool;
import org.purl.wf4ever.wf4ever.RESTService;
import org.purl.wf4ever.wf4ever.RScript;
import org.purl.wf4ever.wf4ever.SOAPService;
import org.purl.wf4ever.wfdesc.Input;
import org.purl.wf4ever.wfdesc.Output;
import org.purl.wf4ever.wfdesc.Process;
import org.w3.prov.Entity;

import com.fasterxml.jackson.databind.JsonNode;

public class WfdescSerialiser {

    private static Logger logger = Logger.getLogger(WfdescSerialiser.class.getCanonicalName());

    public static URI REST = URI
            .create("http://ns.taverna.org.uk/2010/activity/rest");
	public static URI WSDL = URI
			.create("http://ns.taverna.org.uk/2010/activity/wsdl");
	public static URI SECURITY = WSDL.resolve("wsdl/security");
	public static URI OPERATION = WSDL.resolve("wsdl/operation");
	public static URI BEANSHELL = URI
	.create("http://ns.taverna.org.uk/2010/activity/beanshell");
	public static URI RSHELL = URI
	.create("http://ns.taverna.org.uk/2010/activity/rshell");
	public static URI TOOL = URI
	.create("http://ns.taverna.org.uk/2010/activity/tool");

	private Scufl2Tools scufl2Tools = new Scufl2Tools();
	private SesameManager sesameManager;
	private URITools uriTools = new URITools();
	private WorkflowBundle wfBundle;

	public Repository getRepository() {
		return getSesameManager().getConnection().getRepository();
	}

	public Scufl2Tools getScufl2Tools() {
		return scufl2Tools;
	}

	public SesameManager getSesameManager() {
		if (sesameManager == null) {

		    // Raven workaround - register SPARQLParserFactory
		    QueryParserRegistry.getInstance().add(new SPARQLParserFactory());

			ElmoModule module = new ElmoModule();
			module.addConcept(Labelled.class);
			SesameManagerFactory factory = new SesameManagerFactory(module);
			factory.setInferencingEnabled(true);
			sesameManager = factory.createElmoManager();
		}
		return sesameManager;
	}

	public URITools getUriTools() {
		return uriTools;
	}

	private QName qnameForBean(WorkflowBean bean) {
		URI uri = uriTools.uriForBean(bean);
		org.openrdf.model.URI sesameUri = getRepository().getValueFactory()
				.createURI(uri.toASCIIString());
		return new QName(sesameUri.getNamespace(), sesameUri.getLocalName());
	}

	protected void save(final WorkflowBundle bundle) {
	    bundle.accept(new VisitorWithPath() {
			Scufl2Tools scufl2Tools = new Scufl2Tools();
            public boolean visit() {
                WorkflowBean node = getCurrentNode();
//                System.out.println(node);
                if (node instanceof WorkflowBundle) {
                    return true;
                }
//				@SuppressWarnings("rawtypes")

                if (node instanceof org.apache.taverna.scufl2.api.core.Workflow) {
				    entityForBean(node, org.purl.wf4ever.wfdesc.Workflow.class);
				} else if (node instanceof Processor) {
				    Processor processor = (Processor)node;
				    Process process = entityForBean(processor, Process.class);
				    entityForBean(processor.getParent(), org.purl.wf4ever.wfdesc.Workflow.class).getWfHasSubProcess().add(process);
				} else if (node instanceof InputPort) {
					WorkflowBean parent = ((Child) node).getParent();
                    Input input = entityForBean(node, Input.class);
					Process process = entityForBean(parent, Process.class);
					process.getWfHasInput().add(input);
				} else if (node instanceof OutputPort) {
                    WorkflowBean parent = ((Child) node).getParent();
				    Output output = entityForBean(node, Output.class);
                    Process process = entityForBean(parent, Process.class);
                    process.getWfHasOutput().add(output);
				} else if (node instanceof DataLink) {
				    WorkflowBean parent = ((Child) node).getParent();
                    DataLink link = (DataLink) node;
                    org.purl.wf4ever.wfdesc.DataLink dl = entityForBean(link,
                            org.purl.wf4ever.wfdesc.DataLink.class);
                    Output source = entityForBean(link.getReceivesFrom(),
                            Output.class);
                    dl.getWfHasSource().add(source);
                    Input sink = entityForBean(link.getSendsTo(), Input.class);
                    dl.getWfHasSink().add(sink);
                    entityForBean(parent,
                            org.purl.wf4ever.wfdesc.Workflow.class)
                            .getWfHasDataLink().add(dl);
				} else if (node instanceof Profile) {
				    // So that we can get at the ProcessorBinding - buy only if it is the main Profile
				    return node == bundle.getMainProfile();
                } else if (node instanceof ProcessorBinding) {
                    ProcessorBinding b = (ProcessorBinding) node;
                    Activity a = b.getBoundActivity();
                    Processor boundProcessor = b.getBoundProcessor();
                    Process process = entityForBean(boundProcessor, Process.class);

                    // Note: We don't describe the activity and processor binding in wfdesc. Instead we
                    // assign additional types and attributes to the parent processor

                    try {
                        URI type = a.getType();
                        Configuration c = scufl2Tools.configurationFor(a, b.getParent());
                        JsonNode json = c.getJson();
                        if (type.equals(BEANSHELL)) {
                            BeanshellScript script = getSesameManager().designateEntity(process, BeanshellScript.class);
                            String s = json.get("script").asText();
                            script.getWfScript().add(s);

                            JsonNode localDep = json.get("localDependency");
                            if (localDep != null && localDep.isArray()) {
                                for (int i=0; i<localDep.size(); i++) {
                                    String depStr = localDep.get(i).asText();
                                    RotermsResource res = getSesameManager().designateEntity(script, RotermsResource.class);
                                    RotermsResource dep = getSesameManager().create(RotermsResource.class);
                                    dep.getWfLabel().add(depStr);
                                    dep.getWfComment().add("JAR dependency");
                                    res.getWfRequiresSoftware().add(dep);
                                    // Somehow this gets the whole thing to fall out of the graph!
//                                  QName depQ = new QName("http://google.com/", ""+ UUID.randomUUID());
//                                  sesameManager.rename(dep, depQ);

                                }
                            }
                        }
                        if (type.equals(RSHELL)) {
                            RScript script = getSesameManager().designateEntity(process, RScript.class);
                            String s = json.get("script").asText();
                            script.getWfScript().add(s);
                        }
                        if (type.equals(WSDL)) {
                            SOAPService soap = getSesameManager().designateEntity(process, SOAPService.class);
                            JsonNode operation = json.get("operation");
                            URI wsdl = URI.create(operation.get("wsdl").asText());
                            soap.getWfWsdlURI().add(wsdl);
                            soap.getWfWsdlOperationName().add(operation.get("name").asText());
                            soap.getWfRootURI().add(wsdl.resolve("/"));

                        }
                        if (type.equals(REST)) {
                            RESTService rest = getSesameManager().designateEntity(process, RESTService.class);
//                            System.out.println(json);
                            JsonNode request = json.get("request");
                            String absoluteURITemplate = request.get("absoluteURITemplate").asText();
                            String uriTemplate = absoluteURITemplate.replace("{", "");
                            uriTemplate = uriTemplate.replace("}", "");
                            // TODO: Detect {}
                            try {
                            	URI root = new URI(uriTemplate).resolve("/");
                            	rest.getWfRootURI().add(root);
                            } catch (URISyntaxException e) {
                            	logger.warning("Potentially invalid URI template: " + absoluteURITemplate);
//                            	Uncomment to temporarily break TestInvalidURITemplate:
//								rest.getWfRootURI().add(URI.create("http://example.com/FRED"));
							}
                        }
                        if (type.equals(TOOL)) {
                            CommandLineTool cmd = getSesameManager().designateEntity(process, CommandLineTool.class);
                            JsonNode desc = json.get("toolDescription");
                            //System.out.println(json);
                            JsonNode command = desc.get("command");
                            if (command != null) {
                                cmd.getWfCommand().add(command.asText());
                            }
                        }
                        if (type.equals(NESTED_WORKFLOW)) {
                            Workflow nestedWf = scufl2Tools.nestedWorkflowForProcessor(boundProcessor, b.getParent());
                            // The parent process is a specialization of the nested workflow
                            // (because the nested workflow could exist as several processors)
                            specializationOf(boundProcessor, nestedWf);
                            getSesameManager().designateEntity(process, org.purl.wf4ever.wfdesc.Workflow.class);

                            // Just like the Processor specializes the nested workflow, the
                            // ProcessorPorts specialize the WorkflowPort
                            for (ProcessorPortBinding portBinding : b.getInputPortBindings()) {
                                // Map from activity port (not in wfdesc) to WorkflowPort
                                WorkflowPort wfPort = nestedWf.getInputPorts().getByName(portBinding.getBoundActivityPort().getName());
                                if (wfPort == null) {
                                    continue;
                                }
                                specializationOf(portBinding.getBoundProcessorPort(), wfPort);
                            }
                            for (ProcessorPortBinding portBinding : b.getOutputPortBindings()) {
                                WorkflowPort wfPort = nestedWf.getOutputPorts().getByName(portBinding.getBoundActivityPort().getName());
                                if (wfPort == null) {
                                    continue;
                                }
                                specializationOf(portBinding.getBoundProcessorPort(), wfPort);
                            }
                        }
                    } catch (IndexOutOfBoundsException ex) {
                    }
                    return false;
				} else {
//				    System.out.println("--NO!");
					return false;
				}
                for (Annotation ann : scufl2Tools.annotationsFor(node, bundle)) {
                    String annotationBody = ann.getBody().toASCIIString();
                    String baseURI = bundle.getGlobalBaseURI().resolve(ann.getBody()).toASCIIString();
                    InputStream annotationStream;
                    try {
                        annotationStream = bundle.getResources().getResourceAsInputStream(
                                annotationBody);

                        RDFFormat dataFormat = RDFFormat.TURTLE;
                        try {
                            getSesameManager().getConnection().add(annotationStream, baseURI, dataFormat);
                        } catch (OpenRDFException e) {
                            logger.log(Level.WARNING, "Can't parse RDF Turtle from " + annotationBody, e);
                        } finally {
                            annotationStream.close();
                        }
                    } catch (IOException e) {
                        logger.log(Level.WARNING, "Can't read " + annotationBody, e);
                    }
                }
				if (node instanceof Named) {
					Named named = (Named) node;
                    Labelled labelled = entityForBean(node, Labelled.class);
					labelled.getLabel().add(named.getName());
				}
				return true;
			}

            private void specializationOf(WorkflowBean special, WorkflowBean general) {
                Entity specialEnt = entityForBean(special, Entity.class);
                Entity generalEnt = entityForBean(general, Entity.class);
                specialEnt.getWfSpecializationOf().add(generalEnt);
            }

            private <T> T entityForBean(WorkflowBean bean, Class<T> type) {
                return getSesameManager().create(qnameForBean(bean), type);
            }

//			@Override
//			public boolean visitEnter(WorkflowBean node) {
//                if (node instanceof Processor
//                        || node instanceof org.apache.taverna.scufl2.api.core.Workflow
//                        || node instanceof Port || node instanceof DataLink) {
//					visit(node);
//					return true;
//				}
//                // The other node types (e.g. dispatch stack, configuration) are
//                // not (directly) represented in wfdesc
////				 System.out.println("Skipping " + node);
//				return false;
//			};
		});
	}

	public void save(WorkflowBundle wfBundle, OutputStream output)
			throws WriterException {
		synchronized (this) {
			if (this.wfBundle != null) {
				throw new IllegalStateException(
						"This serializer is not thread-safe and can only save one WorkflowBundle at a time");
			}
			this.wfBundle = wfBundle;
		}
		try {
			final URI baseURI;
			if (wfBundle.getMainWorkflow() != null) {
				Workflow mainWorkflow = wfBundle.getMainWorkflow();
				baseURI = uriTools.uriForBean(mainWorkflow);
				save(wfBundle);
			} else {
				throw new WriterException(
						"wfdesc format requires a main workflow");
			}
			ContextAwareConnection connection = getSesameManager().getConnection();
			try {

				connection.setNamespace("rdfs",
						"http://www.w3.org/2000/01/rdf-schema#");
				connection.setNamespace("xsd", "http://www.w3.org/2001/XMLSchema#");
				connection.setNamespace("owl", "http://www.w3.org/2002/07/owl#");
				connection.setNamespace("prov", "http://www.w3.org/ns/prov#");
				connection.setNamespace("wfdesc",
				        "http://purl.org/wf4ever/wfdesc#");
				connection.setNamespace("wf4ever",
				        "http://purl.org/wf4ever/wf4ever#");
				connection.setNamespace("roterms",
				        "http://purl.org/wf4ever/roterms#");
				connection.setNamespace("dc", "http://purl.org/dc/elements/1.1/");
				connection.setNamespace("dcterms", "http://purl.org/dc/terms/");
				connection.setNamespace("comp", "http://purl.org/DP/components#");
				connection.setNamespace("dep", "http://scape.keep.pt/vocab/dependencies#");
				connection.setNamespace("biocat", "http://biocatalogue.org/attribute/");

                connection.setNamespace("", "#");

				connection.export(new OrganizedRDFWriter(
						new TurtleWriterWithBase(output, baseURI)));
			} catch (OpenRDFException e) {
				throw new WriterException("Can't write to output", e);
			}
		} finally {
			synchronized (this) {
				this.wfBundle = null;
			}
		}
	}

	public void setScufl2Tools(Scufl2Tools scufl2Tools) {
		this.scufl2Tools = scufl2Tools;
	}

	public void setSesameManager(SesameManager sesameManager) {
		this.sesameManager = sesameManager;
	}

	public void setUriTools(URITools uriTools) {
		this.uriTools = uriTools;
	}

}


text:
package org.terasology.asset;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.List;

/**
 * An asset loader provides the functionality to load some type of asset from a stream, or from a set of urls where
 * an asset is composed of multiple files.
 *
 * @author Immortius
 */
public interface AssetLoader<T extends Asset> {

    /**
     * Loads an asset. The uri identifying the asset is provided, along with an stream, and the urls relating to the
     * asset. In simple cases there is just one url, but in some cases an asset is composed of multiple files so the
     * urls for each file is provided. In these cases the stream is for the first url.
     *
     * The provided stream is cleaned up by the caller, and doesn't have to be closed by this method.
     *
     * @param uri    The uri of the asset
     * @param stream A stream containing the assets data.
     * @param urls   The urls related to the asset. The first url is the url providing the stream
     * @return The loaded asset, or null
     * @throws IOException If there is any error loading the asset
     */
    public T load(AssetUri uri, InputStream stream, List<URL> urls) throws IOException;
}

redpajama_set_name: RedPajamaGithub


text:
package com.zhang.mymusic;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Queue;
import com.zhang.mymusic.domain.Mp3Info;
import com.zhang.mymusic.lrc.LrcProcessor;
import com.zhang.mymusic.service.PlayService;
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class Mp3PlayActivity extends Activity {
	Button beginButton = null;
	Button pauseButton = null;
	Button stopButton = null;
	MediaPlayer mediaPlayer = null;

	private ArrayList<Queue> queues = null;
	private TextView lrcTextView = null;
	private Mp3Info mp3Info = null;
	private Handler handler = new Handler();
	private UpdateTimeCallback updateTimeCallback = null;
	private long begin = 0;
	private long nextTimeMill = 0;
	private long currentTimeMill = 0;
	private String message = null;
	private long pauseTimeMills = 0;
	private boolean isPlaying = false;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.playermp3);
		Intent intent = getIntent();
		mp3Info = (Mp3Info) intent.getSerializableExtra("mp3Info");
		beginButton = (Button) findViewById(R.id.begin);
		pauseButton = (Button) findViewById(R.id.pause);
		stopButton = (Button) findViewById(R.id.stop);
		beginButton.setOnClickListener(new BeginButtonListener());
		pauseButton.setOnClickListener(new PauseButtonListener());
		stopButton.setOnClickListener(new StopButtonListener());
		lrcTextView = (TextView)findViewById(R.id.lrcText);
	}

	/**
	 * ¸ù¾Ý¸è´ÊÎļþµÄÃû×Ö£¬À´¶ÁÈ¡¸è´ÊÎļþµ±ÖеÄÐÅÏ¢
	 * @param lrcName
	 */
	private void prepareLrc(String lrcName){
		try {
			InputStream inputStream = new FileInputStream(Environment.getExternalStorageDirectory().getAbsoluteFile() +File.separator + "mp3/" + mp3Info.getLrcName());
			LrcProcessor lrcProcessor = new LrcProcessor();
			queues = lrcProcessor.process(inputStream);
			//´´½¨Ò»¸öUpdateTimeCallback¶ÔÏó
			updateTimeCallback = new UpdateTimeCallback(queues);
			begin = 0 ;
			currentTimeMill = 0 ;
			nextTimeMill = 0 ;
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}
	class BeginButtonListener implements OnClickListener {

		@Override
		public void onClick(View v) {
			//´´½¨Ò»¸öIntent¶ÔÏó£¬ÓÃÓÚͬʱService¿ªÊ¼²¥·ÅMP3
			Intent intent = new Intent();
			intent.setClass(Mp3PlayActivity.this, PlayService.class);
			intent.putExtra("mp3Info", mp3Info);
			intent.putExtra("MSG", AppConstant.PlayMsg.PLAY_MSG);
			//¶ÁÈ¡LRCÎļþ
			prepareLrc(mp3Info.getLrcName());
			//Æô¶¯Service
			startService(intent);
			//½«beginµÄÖµÖÃΪµ±Ç°ºÁÃëÊý
			begin = System.currentTimeMillis();
			//Ö´ÐÐupdateTimeCallback
			handler.postDelayed(updateTimeCallback, 5);
			isPlaying = true;
		}

	}

	class PauseButtonListener implements OnClickListener {

		@Override
		public void onClick(View v) {
			//֪ͨServiceÔÝÍ£²¥·ÅMP3
			Intent intent = new Intent();
			intent.setClass(Mp3PlayActivity.this, PlayService.class);
			intent.putExtra("MSG", AppConstant.PlayMsg.PASU_MSG);
			startService(intent);
			//
			if(isPlaying){
				handler.removeCallbacks(updateTimeCallback);
				pauseTimeMills = System.currentTimeMillis();
			}
			else{
				handler.postDelayed(updateTimeCallback, 5);
				begin = System.currentTimeMillis() - pauseTimeMills + begin;
			}
			isPlaying = isPlaying ? false : true;
		}

	}

	class StopButtonListener implements OnClickListener {

		@Override
		public void onClick(View v) {
			//֪ͨServiceÍ£Ö¹²¥·ÅMP3Îļþ
			Intent intent = new Intent();
			intent.setClass(Mp3PlayActivity.this, PlayService.class);
			intent.putExtra("MSG", AppConstant.PlayMsg.STOP_MSG);
			startService(intent);
			//´ÓHandlerµ±ÖÐÒƳýupdateTimeCallback
			handler.removeCallbacks(updateTimeCallback);
		}

	}

	class UpdateTimeCallback implements Runnable{
		Queue times = null;
		Queue messages = null;
		public UpdateTimeCallback(ArrayList<Queue> queues) {
			//´ÓArrayListµ±ÖÐÈ¡³öÏàÓ¦µÄ¶ÔÏó¶ÔÏó
			times = queues.get(0);
			messages = queues.get(1);
		}
		@Override
		public void run() {
			//¼ÆËãÆ«ÒÆÁ¿£¬Ò²¾ÍÊÇ˵´Ó¿ªÊ¼²¥·ÅMP3µ½ÏÖÔÚΪֹ£¬¹²ÏûºÄÁ˶àÉÙʱ¼ä£¬ÒÔºÁÃëΪµ¥Î»
			long offset = System.currentTimeMillis() - begin;
			if(currentTimeMill == 0){
				nextTimeMill = (Long)times.poll();
				message = (String)messages.poll();
			}
			if(offset >= nextTimeMill){
				lrcTextView.setText(message);
				message = (String)messages.poll();
				nextTimeMill = (Long)times.poll();
			}
			currentTimeMill = currentTimeMill + 10;
			handler.postDelayed(updateTimeCallback, 10);
		}

	}
}


text:
FROM busybox:latest
MAINTAINER kfmaster <fuhaiou@hotmail.com>
RUN mkdir -p /data; chmod 755 /data
VOLUME ["/data"]
COPY ipa-server-install-options  /data/ipa-server-install-options
COPY ipa-user-data /data/ipa-user-data


text:
title: Real User Monitoring
localeTitle: مراقبة المستخدم الحقيقي
---
## مراقبة المستخدم الحقيقي

هذا هو كعب. [ساعد مجتمعنا على توسيعه](https://github.com/freecodecamp/guides/tree/master/src/pages/web-performance/website-monitoring/real-user-monitoring/index.md) .

[سيساعدك دليل النمط السريع هذا على ضمان قبول طلب السحب](https://github.com/freecodecamp/guides/blob/master/README.md) .

#### معلومات اكثر:

[مستخدم حقيقي مراقبة ويكيبيديا المادة](https://en.wikipedia.org/wiki/Real_user_monitoring)


text:
<?php
use \kartik\datecontrol\Module;

$params = array_merge(
    require(__DIR__ . '/../../common/config/params.php'),
    require(__DIR__ . '/../../common/config/params-local.php'),
    require(__DIR__ . '/params.php'),
    require(__DIR__ . '/params-local.php')
);

return [
    'id' => 'app-frontend',
    'basePath' => dirname(__DIR__),
    'bootstrap' => ['log'],
    'controllerNamespace' => 'frontend\controllers',
    'components' => [
        'formatter' => [
           'class' => 'yii\i18n\Formatter',
           'locale' => 'sr-RS',
        ],
        'user' => [
            'identityCookie' => [
                'name'     => '_frontendIdentity',
                'path'     => '/',
                'httpOnly' => true,
            ],
            'identityClass' => 'common\models\User',
            'class' => 'common\components\User',
            'enableAutoLogin' => true,
            'loginUrl' => ['login'],
        ],
        'session' => [
            'name' => 'FRONTENDSESSID',
            'cookieParams' => [
                'httpOnly' => true,
                'path'     => '/',
            ],
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
        'operator' => [
            'class' => 'common\components\Operator',
        ],
        'view' => [
            'class' => 'common\components\View',
        ],
        'authClientCollection' => [
            'class' => yii\authclient\Collection::className(),
            'clients' => [
                'facebook' => [
                    'class'        => 'dektrium\user\clients\Facebook',
                    'clientId'     => '1565800557068729',
                    'clientSecret' => 'f7f7a6e4c23678e9b134be9c3c1d7d89',
                ],
                'twitter' => [
                    'class'          => 'dektrium\user\clients\Twitter',
                    'consumerKey'    => 'CONSUMER_KEY',
                    'consumerSecret' => 'CONSUMER_SECRET',
                ],
                'google' => [
                    'class'        => 'dektrium\user\clients\Google',
                    'clientId'     => 'CLIENT_ID',
                    'clientSecret' => 'CLIENT_SECRET',
                ],
            ],
        ],

    ],
    'bootstrap' => [
        [
            'class' => '\common\components\LanguageSelector',
            'supportedLanguages' => ['en_US', 'sr_RS'],
        ]
    ],
    'modules' => [
        'datecontrol' =>  [
            'class' => '\kartik\datecontrol\Module',
            // format settings for displaying each date attribute (ICU format example)
            'displaySettings' => [
                Module::FORMAT_DATE => 'dd. MMM yyyy.',
                Module::FORMAT_TIME => 'H:mm',
                Module::FORMAT_DATETIME => 'dd. MMM yyyy. H:mm',
            ],

            // format settings for saving each date attribute (PHP format example)
            'saveSettings' => [
                Module::FORMAT_DATE => 'php:Y-m-d', //
                Module::FORMAT_TIME => 'php:H:i:s',
                Module::FORMAT_DATETIME => 'php:Y-m-d H:i:s',
            ],

            // automatically use kartik\widgets for each of the above formats
            'autoWidget' => true,

            // default settings for each widget from kartik\widgets used when autoWidget is true
            'autoWidgetSettings' => [
                Module::FORMAT_DATE => ['type'=>2, 'pluginOptions'=>['autoclose'=>true]], // example
                Module::FORMAT_DATETIME => [], // setup if needed
                Module::FORMAT_TIME => [], // setup if needed
            ],

            // custom widget settings that will be used to render the date input instead of kartik\widgets,
            // this will be used when autoWidget is set to false at module or widget level.
            'widgetSettings' => [
                Module::FORMAT_DATE => [
                    'class' => 'yii\jui\DatePicker', // example
                    'options' => [
                        'dateFormat' => 'php:Y-m-d',
                        'options' => ['class'=>'form-control'],
                    ]
                ]
            ]
        ],
        'user' => [
            // following line will restrict access to admin controller from frontend application
            'as frontend' => 'dektrium\user\filters\FrontendFilter',
        ],
    ],
    'params' => $params,
];


text:
/* global describe, it, expect, before */
/* jshint expr: true */

var FacebookStrategy = require('../lib/strategy');

describe('Strategy#userProfile', function() {

  describe('with default URL and proof enabled', function() {
    var strategy = new FacebookStrategy({
        clientID: 'ABC123',
        clientSecret: 'secret',
        enableProof: true
      },
      function() {});

    // mock
    strategy._oauth2.get = function(url, accessToken, callback) {
      if (url != 'https://graph.facebook.com/v2.2/me?appsecret_proof=e941110e3d2bfe82621f0e3e1434730d7305d106c5f68c87165d0b27a4611a4a') { return callback(new Error('incorrect url argument')); }
      if (accessToken != 'token') { return callback(new Error('incorrect token argument')); }

      var body = '{"id":"500308595","name":"Jared Hanson","first_name":"Jared","last_name":"Hanson","link":"http:\\/\\/www.facebook.com\\/jaredhanson","username":"jaredhanson","gender":"male","email":"jaredhanson\\u0040example.com"}';
      callback(null, body, undefined);
    };

    describe('loading profile', function() {
      var profile;

      before(function(done) {
        strategy.userProfile('token', function(err, p) {
          if (err) { return done(err); }
          profile = p;
          done();
        });
      });

      it('should parse profile', function() {
        expect(profile.provider).to.equal('facebook');
        expect(profile.id).to.equal('500308595');
        expect(profile.username).to.equal('jaredhanson');
      });
    });
  });

  describe('with profile URL option', function() {
    var strategy = new FacebookStrategy({
        clientID: 'ABC123',
        clientSecret: 'secret',
        profileURL: 'https://graph.facebook.com/v2.2/me?fields=id,username'
      },
      function() {});

    // mock
    strategy._oauth2.get = function(url, accessToken, callback) {
      if (url != 'https://graph.facebook.com/v2.2/me?fields=id,username') { return callback(new Error('incorrect url argument')); }
      if (accessToken != 'token') { return callback(new Error('incorrect token argument')); }

      var body = '{"id":"500308595","name":"Jared Hanson","first_name":"Jared","last_name":"Hanson","link":"http:\\/\\/www.facebook.com\\/jaredhanson","username":"jaredhanson","gender":"male","email":"jaredhanson\\u0040example.com"}';
      callback(null, body, undefined);
    };

    describe('loading profile', function() {
      var profile;

      before(function(done) {
        strategy.userProfile('token', function(err, p) {
          if (err) { return done(err); }
          profile = p;
          done();
        });
      });

      it('should parse profile', function() {
        expect(profile.provider).to.equal('facebook');
        expect(profile.id).to.equal('500308595');
        expect(profile.username).to.equal('jaredhanson');
      });
    });
  });

  describe('with profile URL option and proof enabled', function() {
    var strategy = new FacebookStrategy({
        clientID: 'ABC123',
        clientSecret: 'secret',
        profileURL: 'https://graph.facebook.com/v2.2/me?fields=id,username',
        enableProof: true
      },
      function() {});

    // mock
    strategy._oauth2.get = function(url, accessToken, callback) {
      if (url != 'https://graph.facebook.com/v2.2/me?fields=id,username&appsecret_proof=e941110e3d2bfe82621f0e3e1434730d7305d106c5f68c87165d0b27a4611a4a') { return callback(new Error('incorrect url argument')); }
      if (accessToken != 'token') { return callback(new Error('incorrect token argument')); }

      var body = '{"id":"500308595","name":"Jared Hanson","first_name":"Jared","last_name":"Hanson","link":"http:\\/\\/www.facebook.com\\/jaredhanson","username":"jaredhanson","gender":"male","email":"jaredhanson\\u0040example.com"}';
      callback(null, body, undefined);
    };

    describe('loading profile', function() {
      var profile;

      before(function(done) {
        strategy.userProfile('token', function(err, p) {
          if (err) { return done(err); }
          profile = p;
          done();
        });
      });

      it('should parse profile', function() {
        expect(profile.provider).to.equal('facebook');
        expect(profile.id).to.equal('500308595');
        expect(profile.username).to.equal('jaredhanson');
      });
    });
  });

  describe('with profile fields mapped from portable contacts schema', function() {
    var strategy = new FacebookStrategy({
        clientID: 'ABC123',
        clientSecret: 'secret',
        profileFields: ['id', 'username', 'displayName', 'name', 'gender', 'profileUrl', 'emails', 'photos']
      },
      function() {});

    // mock
    strategy._oauth2.get = function(url, accessToken, callback) {
      if (url != 'https://graph.facebook.com/v2.2/me?fields=id,username,name,last_name,first_name,middle_name,gender,link,email,picture') { return callback(new Error('incorrect url argument')); }
      if (accessToken != 'token') { return callback(new Error('incorrect token argument')); }

      var body = '{"id":"500308595","name":"Jared Hanson","first_name":"Jared","last_name":"Hanson","link":"http:\\/\\/www.facebook.com\\/jaredhanson","username":"jaredhanson","gender":"male","email":"jaredhanson\\u0040example.com"}';
      callback(null, body, undefined);
    };

    describe('loading profile', function() {
      var profile;

      before(function(done) {
        strategy.userProfile('token', function(err, p) {
          if (err) { return done(err); }
          profile = p;
          done();
        });
      });

      it('should parse profile', function() {
        expect(profile.provider).to.equal('facebook');
        expect(profile.id).to.equal('500308595');
        expect(profile.username).to.equal('jaredhanson');
      });
    });
  });

  describe('with profile fields not mapped from portable contacts schema', function() {
    var strategy = new FacebookStrategy({
        clientID: 'ABC123',
        clientSecret: 'secret',
        profileFields: ['id', 'username', 'displayName', 'name', 'gender', 'profileUrl', 'emails', 'photos', 'updated_time']
      },
      function() {});

      // mock
      strategy._oauth2.get = function(url, accessToken, callback) {
        if (url != 'https://graph.facebook.com/v2.2/me?fields=id,username,name,last_name,first_name,middle_name,gender,link,email,picture,updated_time') { return callback(new Error('incorrect url argument')); }
        if (accessToken != 'token') { return callback(new Error('incorrect token argument')); }

        var body = '{"id":"500308595","name":"Jared Hanson","first_name":"Jared","last_name":"Hanson","link":"http:\\/\\/www.facebook.com\\/jaredhanson","username":"jaredhanson","gender":"male","email":"jaredhanson\\u0040example.com", "updated_time": "2013-11-02T18:33:09+0000"}';
        callback(null, body, undefined);
      }

    describe('loading profile', function() {
      var profile;

      before(function(done) {
        strategy.userProfile('token', function(err, p) {
          if (err) { return done(err); }
          profile = p;
          done();
        });
      });

      it('should parse profile', function() {
        expect(profile.provider).to.equal('facebook');
        expect(profile.id).to.equal('500308595');
        expect(profile.username).to.equal('jaredhanson');
      });

      it('should have additional fields in profile._json', function() {
        expect(profile._json.updated_time).to.equal('2013-11-02T18:33:09+0000');
      });
    });
  });

  describe('with profile fields mapped from portable contacts schema and proof enabled', function() {
    var strategy = new FacebookStrategy({
        clientID: 'ABC123',
        clientSecret: 'secret',
        profileFields: ['id', 'username', 'displayName', 'name', 'gender', 'profileUrl', 'emails', 'photos'],
        enableProof: true
      },
      function() {});

    // mock
    strategy._oauth2.get = function(url, accessToken, callback) {
      if (url != 'https://graph.facebook.com/v2.2/me?appsecret_proof=e941110e3d2bfe82621f0e3e1434730d7305d106c5f68c87165d0b27a4611a4a&fields=id,username,name,last_name,first_name,middle_name,gender,link,email,picture') { return callback(new Error('incorrect url argument')); }
      if (accessToken != 'token') { return callback(new Error('incorrect token argument')); }

      var body = '{"id":"500308595","name":"Jared Hanson","first_name":"Jared","last_name":"Hanson","link":"http:\\/\\/www.facebook.com\\/jaredhanson","username":"jaredhanson","gender":"male","email":"jaredhanson\\u0040example.com"}';
      callback(null, body, undefined);
    };

    describe('loading profile', function() {
      var profile;

      before(function(done) {
        strategy.userProfile('token', function(err, p) {
          if (err) { return done(err); }
          profile = p;
          done();
        });
      });

      it('should parse profile', function() {
        expect(profile.provider).to.equal('facebook');
        expect(profile.id).to.equal('500308595');
        expect(profile.username).to.equal('jaredhanson');
      });
    });
  });

});


text:
/* globals openRoom */
import {RoomSettingsEnum, RoomTypeConfig, RoomTypeRouteConfig, UiTextContext} from '../RoomTypeConfig';

export class PrivateRoomRoute extends RoomTypeRouteConfig {
	constructor() {
		super({
			name: 'group',
			path: '/group/:name'
		});
	}

	action(params) {
		return openRoom('p', params.name);
	}
}

export class PrivateRoomType extends RoomTypeConfig {
	constructor() {
		super({
			identifier: 'p',
			order: 40,
			icon: 'lock',
			label: 'Private_Groups',
			route: new PrivateRoomRoute()
		});
	}

	findRoom(identifier) {
		const query = {
			t: 'p',
			name: identifier
		};

		return ChatRoom.findOne(query);
	}

	roomName(roomData) {
		if (RocketChat.settings.get('UI_Allow_room_names_with_special_chars')) {
			return roomData.fname || roomData.name;
		}

		return roomData.name;
	}

	condition() {
		const user = Meteor.user();
		const mergeChannels = RocketChat.getUserPreference(user, 'mergeChannels');
		return !mergeChannels && RocketChat.authz.hasAllPermission('view-p-room');
	}

	isGroupChat() {
		return true;
	}

	canAddUser(room) {
		return RocketChat.authz.hasAtLeastOnePermission(['add-user-to-any-p-room', 'add-user-to-joined-room'], room._id);
	}

	allowRoomSettingChange(room, setting) {
		switch (setting) {
			case RoomSettingsEnum.JOIN_CODE:
				return false;
			case RoomSettingsEnum.BROADCAST:
				return room.broadcast;
			case RoomSettingsEnum.READ_ONLY:
				return !room.broadcast;
			case RoomSettingsEnum.REACT_WHEN_READ_ONLY:
				return !room.broadcast && room.ro;
			case RoomSettingsEnum.SYSTEM_MESSAGES:
			default:
				return true;
		}
	}

	enableMembersListProfile() {
		return true;
	}

	getUiText(context) {
		switch (context) {
			case UiTextContext.HIDE_WARNING:
				return 'Hide_Group_Warning';
			case UiTextContext.LEAVE_WARNING:
				return 'Leave_Group_Warning';
			default:
				return '';
		}
	}
}


text:
package io.aos.rhino.script;

public interface ScriptPackage {

}


text:
package org.locationtech.geomesa.accumulo.index

import org.apache.hadoop.io.Text
import org.locationtech.geomesa.index.conf.ColumnGroups
import org.locationtech.geomesa.utils.index.VisibilityLevel
import org.opengis.feature.simple.SimpleFeatureType

object AccumuloColumnGroups extends ColumnGroups[Text] {

  import scala.collection.JavaConverters._

  override val default: Text = new Text("F")

  val AttributeColumnFamily = new Text("A")
  val IndexColumnFamily     = new Text("I")
  val BinColumnFamily       = new Text("B")

  override protected val reserved: Set[Text] = Set(IndexColumnFamily, BinColumnFamily, AttributeColumnFamily)

  override protected def convert(group: String): Text = new Text(group)

  override protected def convert(group: Text): String = group.toString

  override def validate(sft: SimpleFeatureType): Unit = {
    import org.locationtech.geomesa.utils.geotools.RichSimpleFeatureType.RichSimpleFeatureType
    import org.locationtech.geomesa.utils.geotools.RichAttributeDescriptors.RichAttributeDescriptor

    super.validate(sft)

    if (sft.getVisibilityLevel == VisibilityLevel.Attribute &&
        sft.getAttributeDescriptors.asScala.exists(_.getColumnGroups().nonEmpty)) {
      throw new IllegalArgumentException("Column groups are not supported when using attribute-level visibility")
    }
  }
}


text:
#ifdef __ANDROID__
#pragma once

#include "es/protoground.hpp"
#include "es/asset/IAsset.hpp"
#include "android/asset_manager.h"

namespace es {
namespace internal {

/**
 * メモリマッピングしたアセットを管理する
 */
class AndroidMappedAsset : public IAsset {
    AAsset *pAsset;

    AAssetManager *pAssetManager;

    /**
     * 残りのバッファ
     */
    unsafe_array<uint8_t> buffer;
public:
    AndroidMappedAsset(AAssetManager *pAssetManager, AAsset *pAsset) {
        this->pAssetManager = pAssetManager;
        this->pAsset = pAsset;
        this->buffer.ptr = (uint8_t *) AAsset_getBuffer(pAsset);
        this->buffer.length = AAsset_getLength(pAsset);

        assert(pAssetManager);
        assert(pAsset);
        assert((bool) buffer);
    }

    virtual ~AndroidMappedAsset() {
        AAsset_close(pAsset);
    }

    /**
     * 次のサイズを読み込む
     *
     * リクエストされたsizeの容量を読み込むように努めるが、ファイル終端になった場合はsize以下の値を返却する
     */
    virtual unsafe_array<uint8_t> read(const unsigned size) {
        if (!available()) {
            // 容量が無ければ何もしない
            return unsafe_array<uint8_t>();
        }

        // ポインタをコピーする
        unsafe_array<uint8_t> result = buffer;
        result.length = std::min(result.length, (int) size);

        buffer += result.length;

        return result;
    }

    /**
     * 残容量を取得する
     */
    virtual unsigned available() const {
        return buffer.length;
    }
};

}
}

#endif


text:
require('babel-core');

const mockery = require('mockery');
const React = require('react');
const enzyme = require('enzyme');
const chai = require('chai');

const gbs = {
  c: {}, f: {}, l: {}, s: {}, t: {}, w: {}
};

const shallow = enzyme.shallow;

global.expect = chai.expect;
global.assert = chai.assert;

global.mockComp = (Comp, props = {}) => shallow(<Comp { ...Object.assign(props, { gbs }) } />);

mockery.enable({
  warnOnReplace: false,
  warnOnUnregistered: false
});

mockery.registerMock('react-native-router-flux', { Actions: {} });


text:
package com.lingju.assistant.view;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.lingju.assistant.R;

public class LingjuCheckListBox extends LinearLayout{
	private String title;
	private TextView titleText;
	private ImageView closeBT;
	private int count=1;
	private int checkedPosition=-1;
	private Object[] list;
	private Context mContext;
	private CheckedListener listener;

	public LingjuCheckListBox(Context context, String title, String[] array) {
		super(context);
		this.title=title;
		this.list=array;
		init(context);
	}

	public LingjuCheckListBox(Context context, AttributeSet attrs) {
		super(context, attrs);
		defaultInit(context,attrs);
		init(context);
	}

	public LingjuCheckListBox(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		defaultInit(context,attrs);
		init(context);
	}

	private void defaultInit(Context context,AttributeSet attrs){
		TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.lingju);
		this.title=a.getString(R.styleable.lingju_item_title);
		this.list=a.getTextArray(R.styleable.lingju_array);
		/*int arrayRid=a.getInt(R.styleable.lingju_array, -1);
		Log.e("LingjuCheckListBox", "title="+title+",arrayID="+arrayRid);
		if(arrayRid>-1){
			this.list=context.getResources().getStringArray(arrayRid);
		}*/
		a.recycle();
	}

	private void init(Context context){
		this.mContext=context;
		LayoutInflater inflater=LayoutInflater.from(context);
		inflater.inflate(R.layout.call_select_dialog, this);
		if(list!=null){
			setList(list, title);
		}
		else if(this.title!=null){
			LinearLayout v=(LinearLayout) getChildAt(0);
			LinearLayout v1=(LinearLayout) v.getChildAt(0);
			titleText=(TextView)v1.getChildAt(0);
			closeBT=(ImageView) v1.getChildAt(1);
			closeBT.setOnTouchListener(defaultTounchListener);
			titleText.setText(this.title);
		}
	}

	public void setList(String[] array){
		setList(array, null);
	}

	public void setList(Object[] array,String title){

		if(array==null||array.length==0)return;
		LayoutInflater inflater=LayoutInflater.from(this.mContext);
		LinearLayout v=(LinearLayout) getChildAt(0);

		LinearLayout v1=(LinearLayout) v.getChildAt(0);
		if(titleText==null)
		titleText=(TextView)v1.getChildAt(0);
		if(closeBT==null){
			closeBT=(ImageView) v1.getChildAt(1);
			closeBT.setOnTouchListener(defaultTounchListener);
		}
		if(title!=null){
			titleText.setText(title);
			this.title=title;
		}
		int c=array.length;
		int b=1;
		if(c>this.count){
			int i=0;
			for(;i<this.count;i++){
				TextView t=(TextView) v.getChildAt(b+i);
				t.setText(array[i].toString());
				if(t.getTag()==null||!(t.getTag() instanceof Integer)){
					t.setTag(i);
					t.setOnTouchListener(defaultTounchListener);
				}
				/*t.setTag(i);
				t.setOnTouchListener(defaultTounchListener);*/
			}
			for(;i<c;i++){
				TextView textView=(TextView) inflater.inflate(R.layout.lingju_check_list_box_item, null);
				textView.setText(array[i].toString());
				textView.setTag(i);
				textView.setOnTouchListener(defaultTounchListener);
				v.addView(textView, i+b);
			}
		}
		else if(c==this.count){
			for(int i=0;i<this.count;i++){
				TextView t=(TextView) v.getChildAt(b+i);
				t.setText(array[i].toString());
				/*t.setTag(i);
				t.setOnTouchListener(defaultTounchListener);*/
			}
		}
		else{
			int i=0;
			for(;i<c;i++){
				TextView t=(TextView) v.getChildAt(b+i);
				t.setText(array[i].toString());
				/*t.setTag(i);
				t.setOnTouchListener(defaultTounchListener);*/
			}
			for(;i<this.count;i++){
				v.removeViewAt(i+b);
			}
		}
		this.count=c;
	}

	public int getCount() {
		return count;
	}

	public int getCheckedPosition() {
		return checkedPosition;
	}

	public void setCheckedPosition(int checkedPosition) {
		this.checkedPosition = checkedPosition;
	}

	public String getTitle() {
		return title;
	}

	public void setCheckListener(CheckedListener listener){
		this.listener=listener;
	}

	private OnTouchListener defaultTounchListener=new OnTouchListener() {

		@Override
		public boolean onTouch(View v, MotionEvent event) {
			Log.w("LingjuCheckListBox", "onTouch...."+v.getTag());
			if(event.getAction()==MotionEvent.ACTION_DOWN){
				if(v==closeBT){
					if(listener!=null){
						listener.onClose(true);
					}
					return true;
				}
				if(v.getTag() instanceof Integer){
					checkedPosition=(Integer) v.getTag();
					Log.i("LingjuCheckListBox", "CheckedPosition="+checkedPosition);
					if(listener!=null){
						listener.checked(checkedPosition);
						listener.onClose(false);
					}
					return true;
				}
			}
			return false;
		}
	};

	public interface CheckedListener{
		void checked(int position);
		void onClose(boolean notify);
	}

}


text:
//
//  UIImage+Addition.m
//  FleaMarket
//
//  Created by lovelydd on 15/11/24.
//  Copyright © 2015年 xiaomutou. All rights reserved.
//

#import "UIImage+Addition.h"

@implementation UIImage (Addition)

- (UIImage *)imageWithColor:(UIColor *)color
{

    return [self imageWithColor:color size:CGRectMake(0, 0, 1, 1)];
}

- (UIImage *)imageWithColor:(UIColor *)color size:(CGRect)rect {

    NSParameterAssert(color != nil);

    // Create a 1 by 1 pixel context
    UIGraphicsBeginImageContextWithOptions(rect.size, NO, 0);
    [color setFill];
    UIRectFill(rect);   // Fill it with your color
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    return image;

}

- (UIImage *)antiAliasWithRect:(CGRect)rect
{
    CGFloat border = 1.0f;
    CGRect tempRect = CGRectMake(border, border, rect.size.width-2*border, rect.size.height-2*border);
    UIImage *img = nil;

    UIGraphicsBeginImageContext(CGSizeMake(tempRect.size.width,tempRect.size.height));
    [self drawInRect:CGRectMake(-1, -1, tempRect.size.width, tempRect.size.height)];
    img = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    UIGraphicsBeginImageContext(self.size);
    [img drawInRect:tempRect];
    UIImage* antiImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    return antiImage;
}

-(UIImage*) circleImage:(UIImage*) image withParam:(CGFloat) inset {

    /*
    CGFloat border = 1.0f;
    CGRect tempRect = CGRectMake(border, border, image.size.width-2*border, image.size.height-2*border);
    UIImage *img = nil;

    UIGraphicsBeginImageContext(CGSizeMake(tempRect.size.width,tempRect.size.height));
    [self drawInRect:CGRectMake(-1, -1, tempRect.size.width, tempRect.size.height)];
    img = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    UIGraphicsBeginImageContext(img.size);
    CGContextRef context = UIGraphicsGetCurrentContext();

    //1、image抗锯齿
    CGContextSetAllowsAntialiasing(context, true);
    CGContextSetShouldAntialias(context, true);

    CGContextSetLineWidth(context, 2);
    CGContextSetStrokeColorWithColor(context, [UIColor whiteColor].CGColor);
    CGRect rect = CGRectMake(inset, inset, img.size.width - inset * 2.0f, img.size.height - inset * 2.0f);
    CGContextAddEllipseInRect(context, rect);
    CGContextClip(context);

    [img drawInRect:rect];
    CGContextAddEllipseInRect(context, rect);
    CGContextStrokePath(context);
    UIImage *newimg = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return newimg;
    */

    UIBezierPath *circularPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, image.size.width, image.size.height) cornerRadius:image.size.height / 2.0];
    [circularPath addClip];

    if (image)
    {
        [image drawInRect:CGRectMake(0, 0, image.size.width, image.size.height)];
    }

    return image;
}
@end


text:
function DFE= bbci_fbutil_set(DFE, num, varargin)
%BBCI_FB_UTIL - Utility function for logging trigger and graphical events
%
%Synopsis:
%  DFE= bbci_fbutil_set(DFE, TRIGGER_NO)
%  DFE= bbci_fbutil_set(DFE, HANDLE_IDX, PROPLIST)
%  DFE= bbci_fbutil_set(DATA_FEEDBACK, 'init', HANDLES)
%
%Not implemented yet:
%  DFE= bbci_fbutil_set(DFE, '+')
%  DFE= bbci_fbutil_set(DFE, 'close')
%
%Arguments:
%  DFE - (sub-)STRUCT 'event' of data.feedback variable of bbci_apply.
%             Used internally for storing information.
%  DATA_FEEDBACK - (sub-)STRUCT 'feedback' of data variable of bbci_apply.
%        This function extracts the subfields 'trigger_fcn', 'trigger_param',
%        and 'log' from it.
%  TRIGGER_NO - DOUBLE value of the marker to be set
%  HANDLES - DOUBLE handle of graphical object
%
%Returns:
%  DFE - updated substruct 'state' of DFE

% 08-2012 Benjamin Blankertz

if isnumeric(num) && nargin<3,
% Format:  DF= bbci_fbutil_set(DF, TRIGGER_NO)
  if ~isempty(DFE.trigger_fcn),
    DFE.trigger_fcn(num, DFE.trigger_param{:});
  end
  DFE.log_str= [DFE.log_str, sprintf('# TRIGGER: %d\n', num)];
elseif isnumeric(num),
% Format:  DFE= bbci_fbutil_set(DFE, HANDLE_IDX, PROPLIST)
  set(DFE.handles(num), varargin{:});
  propstr= util_toString(varargin);
  for k= 1:numel(num),
    DFE.log_str= [DFE.log_str sprintf('%d > %s\n', num(k), propstr)];
  end
else
% Format:  DFE= bbci_fbutil_set(DF, 'CMD', ...) with 'CMD'='init', '+', 'close'
  switch(num),
   case 'init',
    DF= DFE;
    DFE= struct_copyFields(DF.opt, {'trigger_fcn', 'trigger_param'});
    DFE= struct_copyFields(DFE, DF, {'log'});
    DFE.handles= varargin{1};
    DFE.log_str= '';
    bbci_log_write(DFE, '# Settings:');
    bbci_prettyPrint(DFE.log.fid, DF.opt, 'prefix','#opt.');
    bbci_log_write(DFE, '# Starting at %s', datestr(now, 'HH:MM:SS.FFF'));
    DFE.start_time= tic;
   case '+',
    time_running= toc(DFE.start_time);
    drawnow;
    bbci_log_write(DFE, [DFE.log_str '# TICK at ' ...
                         sprintf('%08.3fs', time_running)]);
    DFE.log_str= '';
   case 'close',
    bbci_log_write(DFE, '# Ending at %s.', ...
                   datestr(now, 'HH:MM:SS.FFF'));
  end
end


text:
/**
  ******************************************************************************
  * @file    wifly_comm.h
  * @author  WILLIAM TUNG-MAO WU
  * @date    28-March-2014
  * @brief   WiFly Intialisation and Communication
  ******************************************************************************
  */

#ifndef _wifly_comm_H
#define _wifly_comm_H

#define DEFAULT_BAUD_RATE   9600
#define MAX_WIFI_BAUDRATE   115200

typedef struct {
    char* ssid;
    char* passphrase;
} ConnectionDetails;

typedef struct{
    char* node_ip;
    char* gateway_ip;
    char* port;
} SubnetNode;

typedef struct{
    char* host_ip;
    char* port;
} APHost;

void usart_init(uint32_t baud_rate);
char* usart_receive_string(void);
uint8_t factory_reset(void);
uint8_t send_command(int argc, char** argv);
uint8_t init_network_node(ConnectionDetails connection_details, SubnetNode subnet_node);
uint8_t init_host_connection(ConnectionDetails connection_details, APHost host_connection);
uint8_t open_host_connection(APHost host_connection);
uint8_t connection_wait(char* check_string, char cRxedChar);
uint8_t set_comm_baud(char* baud_rate_string);
void Delay(__IO unsigned long nCount);

#endif


text:
@extends("layout.main")

@section("content")

        <form action="/posts" method="POST">
            <input type="hidden" name="_token" value="{{csrf_token()}}">

                标题
                <input name="title" type="text" class="form-control" placeholder="这里是标题">

                内容
                <textarea id="content"  style="height:400px;max-height:500px;" name="content" class="form-control" placeholder="这里是内容"></textarea>

            @include("layout.error")
                        <button type="submit" class="btn btn-default">提交</button>
        </form>

@endsection


text:
package com.rs.game.npc.combat.impl;

import java.util.List;

import com.rs.game.Animation;
import com.rs.game.Entity;
import com.rs.game.Graphics;
import com.rs.game.World;
import com.rs.game.npc.NPC;
import com.rs.game.npc.combat.CombatScript;
import com.rs.game.npc.combat.NPCCombatDefinitions;

public class YtMejKotCombat extends CombatScript {

	@Override
	public Object[] getKeys() {
		return new Object[] {"Yt-MejKot"};
	}

	@Override
	public int attack(NPC npc, Entity target) {
		final NPCCombatDefinitions defs = npc.getCombatDefinitions();
		npc.setNextAnimation(new Animation(defs.getAttackEmote()));
		delayHit(
				npc,
				0,
				target,
				getMeleeHit(
						npc,
						getRandomMaxHit(npc, defs.getMaxHit(), defs.getAttackStyle(),
								target)));
		if(npc.getHitpoints() < npc.getMaxHitpoints()/2) {
			if(npc.getTemporaryAttributtes().remove("Heal") != null) {
				npc.setNextGraphics(new Graphics(2980, 0, 100));
				List<Integer> npcIndexes = World.getRegion(npc.getRegionId()).getNPCsIndexes();
				if(npcIndexes != null) {
					for(int npcIndex : npcIndexes) {
						NPC n = World.getNPCs().get(npcIndex);
						if(n == null || n.isDead() || n.hasFinished())
							continue;
						n.heal(100);
					}
				}
			}else
				npc.getTemporaryAttributtes().put("Heal", Boolean.TRUE);
		}
		return defs.getAttackDelay();
	}
}


text:
package org.uma.jmetal.experimental.componentbasedalgorithm.example.multiobjective.moead;

import org.uma.jmetal.experimental.componentbasedalgorithm.algorithm.multiobjective.moead.MOEADDE;
import org.uma.jmetal.experimental.componentbasedalgorithm.catalogue.evaluation.Evaluation;
import org.uma.jmetal.experimental.componentbasedalgorithm.catalogue.evaluation.impl.SequentialEvaluation;
import org.uma.jmetal.experimental.componentbasedalgorithm.catalogue.solutionscreation.impl.RandomSolutionsCreation;
import org.uma.jmetal.experimental.componentbasedalgorithm.catalogue.replacement.impl.MOEADReplacement;
import org.uma.jmetal.experimental.componentbasedalgorithm.catalogue.selection.impl.PopulationAndNeighborhoodMatingPoolSelection;
import org.uma.jmetal.experimental.componentbasedalgorithm.catalogue.termination.impl.TerminationByEvaluations;
import org.uma.jmetal.experimental.componentbasedalgorithm.catalogue.variation.impl.DifferentialCrossoverVariation;
import org.uma.jmetal.operator.crossover.impl.DifferentialEvolutionCrossover;
import org.uma.jmetal.operator.mutation.MutationOperator;
import org.uma.jmetal.operator.mutation.impl.PolynomialMutation;
import org.uma.jmetal.problem.doubleproblem.DoubleProblem;
import org.uma.jmetal.solution.doublesolution.DoubleSolution;
import org.uma.jmetal.util.AbstractAlgorithmRunner;
import org.uma.jmetal.util.JMetalLogger;
import org.uma.jmetal.util.ProblemUtils;
import org.uma.jmetal.util.aggregativefunction.AggregativeFunction;
import org.uma.jmetal.util.aggregativefunction.impl.Tschebyscheff;
import org.uma.jmetal.util.fileoutput.SolutionListOutput;
import org.uma.jmetal.util.fileoutput.impl.DefaultFileOutputContext;
import org.uma.jmetal.util.neighborhood.impl.WeightVectorNeighborhood;
import org.uma.jmetal.util.pseudorandom.JMetalRandom;
import org.uma.jmetal.util.sequencegenerator.SequenceGenerator;
import org.uma.jmetal.util.sequencegenerator.impl.IntegerPermutationGenerator;

import java.io.FileNotFoundException;
import java.util.List;

/**
 * Class for configuring and running the MOEA/D-DE algorithm using class {@link MOEADDE} and the
 * constructor taking the parameters used in the paper describing the algorithm.
 *
 * @author Antonio J. Nebro <antonio@lcc.uma.es>
 */
public class MOEADDEComponentBasedConfigurationExample extends AbstractAlgorithmRunner {

  public static void main(String[] args) throws FileNotFoundException {
    DoubleProblem problem;
    MOEADDE algorithm;
    MutationOperator<DoubleSolution> mutation;
    DifferentialEvolutionCrossover crossover;

    String problemName = "org.uma.jmetal.problem.multiobjective.lz09.LZ09F2";
    String referenceParetoFront = "resources/referenceFronts/LZ09_F2.csv";

    problem = (DoubleProblem) ProblemUtils.<DoubleSolution>loadProblem(problemName);

    int populationSize = 300;

    SequenceGenerator<Integer> subProblemIdGenerator =
        new IntegerPermutationGenerator(populationSize);

    double cr = 1.0;
    double f = 0.5;
    crossover =
        new DifferentialEvolutionCrossover(
            cr, f, DifferentialEvolutionCrossover.DE_VARIANT.RAND_1_BIN);

    double mutationProbability = 1.0 / problem.getNumberOfVariables();
    double mutationDistributionIndex = 20.0;
    mutation = new PolynomialMutation(mutationProbability, mutationDistributionIndex);

    DifferentialCrossoverVariation variation =
        new DifferentialCrossoverVariation(1, crossover, mutation, subProblemIdGenerator);

    double neighborhoodSelectionProbability = 0.9;
    int neighborhoodSize = 20;
    WeightVectorNeighborhood<DoubleSolution> neighborhood =
        new WeightVectorNeighborhood<>(populationSize, neighborhoodSize);

    PopulationAndNeighborhoodMatingPoolSelection<DoubleSolution> selection =
        new PopulationAndNeighborhoodMatingPoolSelection<>(
            variation.getCrossover().getNumberOfRequiredParents(),
            subProblemIdGenerator,
            neighborhood,
            neighborhoodSelectionProbability,
            true);

    int maximumNumberOfReplacedSolutions = 2;
    AggregativeFunction aggregativeFunction = new Tschebyscheff();
    MOEADReplacement<DoubleSolution> replacement =
        new MOEADReplacement<>(
            selection,
            neighborhood,
            aggregativeFunction,
            subProblemIdGenerator,
            maximumNumberOfReplacedSolutions);

    Evaluation<DoubleSolution> evaluation = new SequentialEvaluation<>(problem);

    algorithm =
        new MOEADDE(
            evaluation,
            new RandomSolutionsCreation<>(problem, populationSize),
            new TerminationByEvaluations(150000),
            selection,
            variation,
            replacement);

    algorithm.run();

    List<DoubleSolution> population = algorithm.getResult();
    JMetalLogger.logger.info("Total execution time : " + algorithm.getTotalComputingTime() + "ms");
    JMetalLogger.logger.info("Number of evaluations: " + algorithm.getEvaluations());

    new SolutionListOutput(population)
        .setVarFileOutputContext(new DefaultFileOutputContext("VAR.csv", ","))
        .setFunFileOutputContext(new DefaultFileOutputContext("FUN.csv", ","))
        .print();

    JMetalLogger.logger.info("Random seed: " + JMetalRandom.getInstance().getSeed());
    JMetalLogger.logger.info("Objectives values have been written to file FUN.csv");
    JMetalLogger.logger.info("Variables values have been written to file VAR.csv");

    if (!referenceParetoFront.equals("")) {
      printQualityIndicators(population, referenceParetoFront);
    }

    System.exit(0);
  }
}


text:
===========
redmine-cmd
===========

A Remote console for Redmine based on REST/API and time-tracking system

Installation
------------

::

  pip install redmine-cmd

Upgrading
---------

::

  pip install --upgrade redmine-cmd

Usage
-----

Usage: redmine-cmd [options]

Options::

  -h, --help            show this help message and exit
  -c CONFFILE, --conffile=CONFFILE
                        Conffile (default: .redmine_cmd.cfg)
  -l LOGFILE, --logfile=LOGFILE
                        Log file (default: /dev/stdout)
  --loglevel=LOGLEVEL   Log level (default: 20)

For example::

  redmine-cmd --loglevel=20 -c ./redmine.cfg

; where `./redmine.cfg` looks like::

  [global]
  threshold=3600
  baseurl=https://redmine.myhost.domain
  sentinel=.
  default_time_entry_activitiy = 8
  # See key in https://redmine.myhost.domain/my/account
  key=5174044140444ffee5dd17922228d882166666b5
  session_file=.redmine_cmd_.session

Usage of the interactive shell
------------------------------

Available commands::

  EOF               createtask  help          settask  updatetask       viewusers
  change            end         prev          status   viewcurrenttask
  changetaskstatus  endtask     previoustask  tasks    viewtasks
  create            exit        set           up       viewtimes

Configuration file
------------------

See https://github.com/psaavedra/redmine-cmd/blob/master/cfg/redmine_cmd.cfg.example

Comments
--------

- redmine-cmd requires the Web Services activation in Redmine


text:
"""Module providing unified logging interface

Provide convenient handlers for logging

Current implementation is based on the logging module (Facade implementation)

"""
__all__ = ['getLogger', 'getDefaultFormatter', 'addStdoutAndStdErr', 'addDailyRotatingHandler', 'addErrorLog', 'addBasicLog']

import logging
import logging.handlers

DEFAULT_LOG_FORMAT = '%(asctime)s : %(levelname)s\t: %(message)s '
DEFAULT_LOG_DATE_FORMAT = '%d/%m/%Y %H:%M:%S'

defaultFormatter = None

def getLogger(name = None):
    """get a logger by its name"""
    return logging.getLogger(name)

def getDefaultFormatter():
    """Returns the default formatter"""
    global defaultFormatter
    if defaultFormatter is None:
        defaultFormatter = logging.Formatter(DEFAULT_LOG_FORMAT, DEFAULT_LOG_DATE_FORMAT)
    return defaultFormatter

def addStdoutAndStdErr(outLevel = logging.INFO, logger = getLogger(), formatter = getDefaultFormatter()):
    """Adds printing to stdouts and stderrs"""
    import sys

    logger.setLevel(outLevel)
    # sets console logging options
    stdouts = logging.StreamHandler(sys.stdout)
    stdouts.setLevel(outLevel)
    stdouts.setFormatter(formatter)
    logger.addHandler(stdouts)

    # always log errors to stderr
    stderrs = logging.StreamHandler(sys.stderr)
    stderrs.setLevel(logging.ERROR)
    logger.addHandler(stderrs)
    stderrs.setFormatter(formatter)

def addDailyRotatingHandler(filename, logsToKeep = 7, logger = getLogger(), formatter = getDefaultFormatter(), logLevel = logging.INFO):
    """Create a new file each day and delete files older that logToKeep days"""
    fileLog = logging.handlers.TimedRotatingFileHandler(filename = filename,
                                                        when = 'D',
                                                        interval = 1,
                                                        backupCount = logsToKeep,
                                                        encoding = None,
                                                        delay = False,
                                                        utc = True)
    fileLog.setFormatter(formatter)
    fileLog.setLevel(logLevel)
    logger.addHandler(fileLog)

def addBasicLog(filename, logLevel = logging.INFO, logger = getLogger(), formatter = getDefaultFormatter()):
    """Basic log file, append all logging to a file"""
    fileLog = logging.FileHandler(
        filename = filename,
        mode = 'a')
    fileLog.setFormatter(formatter)
    fileLog.setLevel(logLevel)
    logger.addHandler(fileLog)

def addErrorLog(filename, logger = getLogger(), formatter = getDefaultFormatter()):
    """Logs all event above error to a file, overwriting old file"""
    fileLogErr = logging.FileHandler(
        filename = filename,
        mode = 'w')
    fileLogErr.setFormatter(formatter)
    fileLogErr.setLevel(logging.ERROR)
    logger.addHandler(fileLogErr)


text:
namespace ArtistSystem.Data
{
    using System;
    using System.Collections.Generic;
    using Models;
    using Repositories;

    public class ArtistSystemData : IArtistSystemData
    {
        private IArtistSystemDbContext context;
        private IDictionary<Type, object> repositories;

        public ArtistSystemData()
            : this(new ArtistSystemDbContext())
        {
        }

        public ArtistSystemData(IArtistSystemDbContext context)
        {
            this.context = context;
            this.repositories = new Dictionary<Type, object>();
        }

        public IRepository<Song> Songs
        {
            get
            {
                return this.GetRepository<Song>();
            }
        }

        public IRepository<Artist> Artists
        {
            get
            {
                return this.GetRepository<Artist>();
            }
        }

        public IRepository<Album> Albums
        {
            get
            {
                return this.GetRepository<Album>();
            }
        }

        public void SaveChanges()
        {
            this.context.SaveChanges();
        }

        private IRepository<T> GetRepository<T>() where T : class
        {
            var typeOfModel = typeof(T);
            if (!this.repositories.ContainsKey(typeOfModel))
            {
                var type = typeof(Repository<T>);

                if (typeOfModel.IsAssignableFrom(typeof(Artist)))
                {
                    type = typeof(Repository<T>);
                }

                this.repositories.Add(typeOfModel, Activator.CreateInstance(type, this.context));
            }

            return (IRepository<T>)this.repositories[typeOfModel];
        }
    }
}


text:
package com.sishuok.es.common.spring.utils;

import org.aopalliance.aop.Advice;
import org.springframework.aop.Advisor;
import org.springframework.aop.TargetSource;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.interceptor.AsyncExecutionInterceptor;
import org.springframework.aop.support.AopUtils;
import org.springframework.transaction.interceptor.TransactionInterceptor;
import org.springframework.util.ReflectionUtils;

import java.lang.reflect.Field;
import java.lang.reflect.Proxy;

/**
 * AOP代理工具类
 *
User: Zhang Kaitao
 *
Date: 13-7-3 下午12:29
 *
Version: 1.0
 */
public class AopProxyUtils {

    /**
     * 是否代理了多次
     * see http://jinnianshilongnian.iteye.com/blog/1894465
     * @param proxy
     * @return
     */
    public static boolean isMultipleProxy(Object proxy) {
        try {
            ProxyFactory proxyFactory = null;
            if(AopUtils.isJdkDynamicProxy(proxy)) {
                proxyFactory = findJdkDynamicProxyFactory(proxy);
            }
            if(AopUtils.isCglibProxy(proxy)) {
                proxyFactory = findCglibProxyFactory(proxy);
            }
            TargetSource targetSource = (TargetSource) ReflectionUtils.getField(ProxyFactory_targetSource_FIELD, proxyFactory);
            return AopUtils.isAopProxy(targetSource.getTarget());
        } catch (Exception e) {
            throw new IllegalArgumentException("proxy args maybe not proxy with cglib or jdk dynamic proxy. this method not support", e);
        }
    }

    /**
     * 查看指定的代理对象是否 添加事务切面
     * see http://jinnianshilongnian.iteye.com/blog/1850432
     * @param proxy
     * @return
     */
    public static boolean isTransactional(Object proxy) {
       return hasAdvice(proxy, TransactionInterceptor.class);
    }

    /**
     * 移除代理对象的事务切面支持
     * @return
     */
    public static void removeTransactional(Object proxy) {
         removeAdvisor(proxy, TransactionInterceptor.class);
    }

    /**
     * 是否是异步的代理
     * @param proxy
     * @return
     */
    public static boolean isAsync(Object proxy) {
        return hasAdvice(proxy, AsyncExecutionInterceptor.class);
    }

    /**
     * 移除代理对象的异步调用支持
     * @return
     */
    public static void removeAsync(Object proxy) {
        removeAdvisor(proxy, AsyncExecutionInterceptor.class);

    }

    private static void removeAdvisor(Object proxy, Class<? extends Advice> adviceClass) {
        if(!AopUtils.isAopProxy(proxy)) {
            return;
        }
        ProxyFactory proxyFactory = null;
        if(AopUtils.isJdkDynamicProxy(proxy)) {
            proxyFactory = findJdkDynamicProxyFactory(proxy);
        }
        if(AopUtils.isCglibProxy(proxy)) {
            proxyFactory = findCglibProxyFactory(proxy);
        }

        Advisor[] advisors = proxyFactory.getAdvisors();

        if(advisors == null || advisors.length == 0) {
            return;
        }

        for(Advisor advisor : advisors) {
            if(adviceClass.isAssignableFrom(advisor.getAdvice().getClass())) {
                proxyFactory.removeAdvisor(advisor);
                break;
            }
        }
    }

    private static boolean hasAdvice(Object proxy, Class<? extends Advice> adviceClass) {
        if(!AopUtils.isAopProxy(proxy)) {
            return false;
        }
        ProxyFactory proxyFactory = null;
        if(AopUtils.isJdkDynamicProxy(proxy)) {
            proxyFactory = findJdkDynamicProxyFactory(proxy);
        }
        if(AopUtils.isCglibProxy(proxy)) {
            proxyFactory = findCglibProxyFactory(proxy);
        }

        Advisor[] advisors = proxyFactory.getAdvisors();

        if(advisors == null || advisors.length == 0) {
            return false;
        }

        for(Advisor advisor : advisors) {
            if(adviceClass.isAssignableFrom(advisor.getAdvice().getClass())) {
                return true;
            }
        }
        return false;
    }

    private static ProxyFactory findJdkDynamicProxyFactory(final Object proxy) {
        Object jdkDynamicAopProxy = ReflectionUtils.getField(JdkDynamicProxy_h_FIELD, proxy);
        return (ProxyFactory) ReflectionUtils.getField(JdkDynamicAopProxy_advised_FIELD, jdkDynamicAopProxy);
    }

    private static ProxyFactory findCglibProxyFactory(final Object proxy) {
        Field field  = ReflectionUtils.findField(proxy.getClass(), "CGLIB$CALLBACK_0");
        ReflectionUtils.makeAccessible(field);
        Object CGLIB$CALLBACK_0 = ReflectionUtils.getField(field, proxy);
        return (ProxyFactory) ReflectionUtils.getField(CglibAopProxy$DynamicAdvisedInterceptor_advised_FIELD, CGLIB$CALLBACK_0);

    }

    ///////////////////////////////////内部使用的反射 静态字段///////////////////////////////////
    //JDK动态代理 字段相关
    private static Field JdkDynamicProxy_h_FIELD;
    private static Class JdkDynamicAopProxy_CLASS;
    private static Field JdkDynamicAopProxy_advised_FIELD;

    //CGLIB代理 相关字段
    private static Class CglibAopProxy_CLASS;
    private static Class CglibAopProxy$DynamicAdvisedInterceptor_CLASS;
    private static Field CglibAopProxy$DynamicAdvisedInterceptor_advised_FIELD;

    //ProxyFactory 相关字段
    private static Class ProxyFactory_CLASS;
    private static Field ProxyFactory_targetSource_FIELD;

    static {
        JdkDynamicProxy_h_FIELD = ReflectionUtils.findField(Proxy.class, "h");
        ReflectionUtils.makeAccessible(JdkDynamicProxy_h_FIELD);

        try {
            JdkDynamicAopProxy_CLASS = Class.forName("org.springframework.aop.framework.JdkDynamicAopProxy");
            JdkDynamicAopProxy_advised_FIELD = ReflectionUtils.findField(JdkDynamicAopProxy_CLASS, "advised");
            ReflectionUtils.makeAccessible(JdkDynamicAopProxy_advised_FIELD);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            /*ignore*/
        }

        try {
            CglibAopProxy_CLASS = Class.forName("org.springframework.aop.framework.CglibAopProxy");
            CglibAopProxy$DynamicAdvisedInterceptor_CLASS = Class.forName("org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor");
            CglibAopProxy$DynamicAdvisedInterceptor_advised_FIELD = ReflectionUtils.findField(CglibAopProxy$DynamicAdvisedInterceptor_CLASS, "advised");
            ReflectionUtils.makeAccessible(CglibAopProxy$DynamicAdvisedInterceptor_advised_FIELD);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            /*ignore*/
        }

        ProxyFactory_CLASS = ProxyFactory.class;
        ProxyFactory_targetSource_FIELD = ReflectionUtils.findField(ProxyFactory_CLASS, "targetSource");
        ReflectionUtils.makeAccessible(ProxyFactory_targetSource_FIELD);

    }
}


text:
function findByProperty(items, propName, propValue) {
    for (let item of items) {
        if (item[propName] === propValue) {
            return item;
        }
    }
    return null;
}

function findById(items, id) {
    return findByProperty(items, 'id', id);
}

function findNestedByProperty(items, propName, propValue, propChildren = 'children') {
    for (let item of items) {
        if (item[propName] === propValue) {
            return item;
        }
        let children = item[propChildren];
        if (children) {
            let find = findNestedByProperty(children, propName, propValue, propChildren);
            if (find) {
                return find;
            }
        }
    }
    return null;
}

function findNestedById(items, id, propChildren = 'children') {
    return findNestedByProperty(items, 'id', id, propChildren);
}

function deleteByProperty(items, propName, propValue) {
    let index = -1;
    for (let i = 0, len = items.length; i < len; i++) {
        let item = items[i];
        if (item[propName] === propValue) {
            index = i;
            break;
        }
    }
    if (index > -1) {
        items.splice(index, 1);
        return true;
    }
    return false;
}

function deleteById(items, id) {
    return deleteByProperty(items, 'id', id);
}

function deleteNestedByProperty(items, propName, propValue, propChildren = 'children') {
    let index = -1;
    for (let i = 0, len = items.length; i < len; i++) {
        let item = items[i];
        if (item[propName] === propValue) {
            index = i;
            break;
        }
        let children = item[propChildren];
        if (children) {
            let deleted = deleteNestedByProperty(children, propName, propValue, propChildren);
            if (deleted > -1) {
                return true;
            }
        }
    }
    if (index > -1) {
        items.splice(index, 1);
        return true;
    }
    return false;
}

function deleteNestedById(items, id, propChildren = 'children') {
    return deleteNestedByProperty(items, 'id', id, propChildren);
}

function createItemsByProperty(items, propKey, propChildren = 'children') {
    const itemsBy = {};
    for (let item of items) {
        if (item) {
            const key = item[propKey];
            itemsBy[key] = item;
            let children = item[propChildren];
            if (children) {
                addItemsByProperty(itemsBy, children, propKey, propChildren);
            }
        }
    }
    return itemsBy;
}

function addItemsByProperty(itemsBy, items, propKey, propChildren = 'children') {
    for (let item of items) {
        if (item) {
            const key = item[propKey];
            itemsBy[key] = item;
            let children = item[propChildren];
            if (children) {
                addItemsByProperty(itemsBy, children, propKey, propChildren);
            }
        }
    }
}

function createItemsById(items, propChildren = 'children') {
    return createItemsByProperty(items, 'id', propChildren);
}

function logDifferences(state, newState, level = 1) {
    if (level === 1) {
        console.log('STATE DIFFERENCE');
    }
    for (let key in newState) {
        const newStateValue = newState[key];
        if (newStateValue instanceof Object) {
            const stateValue = state[key];
            if (stateValue !== newStateValue) {
                console.log(Array(level + 1).join('-') + ' ' +  key);
                if (stateValue && newStateValue) {
                    logDifferences(stateValue, newStateValue, level + 2);
                }
            }
        }
    }
}

export default {
    findByProperty,
    findById,
    findNestedByProperty,
    findNestedById,
    deleteByProperty,
    deleteById,
    deleteNestedByProperty,
    deleteNestedById,
    createItemsByProperty,
    createItemsById,
    logDifferences
};


text:
              <button type="button" class="navbar-toggle"  ng-init="isCollapsed = true" ng-click="isCollapsed = !isCollapsed">
                Toggle navigation

              </button>

Reservation

Fares

                  Services

Airport Service

Package Deliver

Corporate Accounts

Bachelor Party

Service Area

Contact

                              Reservation   (615) 423-7641


text:
require "spec_helper"

RSpec.describe Eman::Formatter do

  describe '#camel_case!' do
    it 'outsputs a camel cased name' do
      generator = Eman::Generator.new('Service')
      generator.resource = 'Cheese Cake'
      generator.verb = 'Grinding'
      formatter = Eman::Formatter.new(generator)
      outcome = formatter.camel_case!

      expect(outcome).to eq 'CheeseCakeGrindingService'
    end

    context 'when type is model' do
      it 'does not append the type at the end' do
        generator = Eman::Generator.new('Model')
        generator.resource = 'Shopping Cart'
        formatter = Eman::Formatter.new(generator)
        outcome = formatter.camel_case!

        expect(outcome).to eq 'ShoppingCart'
      end
    end
  end

  describe '#snake_case!' do
    it 'outputs a snake cased name' do
      generator = Eman::Generator.new('Service')
      generator.resource = 'Cheese Cake'
      generator.verb = 'Grinding'
      formatter = Eman::Formatter.new(generator)
      outcome = formatter.snake_case!

      expect(outcome).to eq 'cheese_cake_grinding_service'
    end

    context 'when type is model' do
      it 'does not append the type at the end' do
        generator = Eman::Generator.new('Model')
        generator.resource = 'Shopping Cart'
        formatter = Eman::Formatter.new(generator)
        outcome = formatter.snake_case!

        expect(outcome).to eq 'shopping_cart'
      end
    end
  end
end


text:
using UnityEngine;
using System;
using System.Collections.Generic;

public enum ProprietaPersonaggio
{

    CharacterM,
    CharacterF,
    Classe,
    Giocabile,
    Vita,
    Livello,
    Mana,
    Xp,
    Attacco,
    Difesa
}

public enum classiPersonaggi
{

    magoAcqua,
    goblin,
    magoTerra
}

[System.Serializable]
public class caratteristichePersonaggioV2 : ScriptableObject
{

    public  GameObject character_M;
    public GameObject character_F;

    public string[] schieraProprietaC = new string[Enum.GetValues(typeof(ProprietaPersonaggio)).Length];
    public List<ClasseValorPersonaggioV2> matriceProprieta;

    public List<String> classePersonaggio = new List<string>();
}

[System.Serializable]
public class ClasseValorPersonaggioV2
{

    public string nomeM="nessun nome";
    public string nomeF = "nessun nome";
    public classiPersonaggi classe = classiPersonaggi.magoAcqua;
    public bool giocabile = false;
    public float Vita = 10f;
    public int Livello = 0;
    public float Mana = 10f;
    public float Xp = 0f;
    public float Attacco = 10f;
    public float difesa = 20f;

}


text:
START_ATF_NAMESPACE
    struct Task
    {
        bool _bFill;
        int _nRetCode;
        int _nTaskCode;
        MyTimer::TIME _tmReg;
        char *_pBuf;
        unsigned __int64 _nBufSize;
        unsigned __int64 _nMaxBufSize;
    public:
        int GetRetCode();
        char* GetTaskBuf();
        int GetTaskCode();
        bool Initialize(uint64_t nMaxBufSize);
        void SetRetCode(int nCode);
        void SetTask(int nTaskCode, char* p, uint64_t size);
        Task();
        void ctor_Task();
        ~Task();
        void dtor_Task();
    };
END_ATF_NAMESPACE


text:
// coding: utf-8
// ----------------------------------------------------------------------------

// ----------------------------------------------------------------------------

#ifndef XPCC_AT91__PIO_HPP
#define XPCC_AT91__PIO_HPP

#include <stdint.h>

#include "aic.hpp"

namespace xpcc
{
	namespace at91
	{
		enum PioController
		{
			PIOA,		///< Parallel I/O Controller A
			PIOB		///< Parallel I/O Controller B
		};

		/**
		 * \brief	Parallel Input/Output Controller (PIO)
		 *
		 * All the I/O lines PA0 to PA31 on AT91SAM7S512/256/128/64/321
		 * (PA0 to PA20 on AT91SAM7S32) are 5V-tolerant and all integrate a
		 * programmable pull-up resistor.
		 *
		 * The PIO lines PA0 to PA3 are high-drive current capable. Each of
		 * these I/O lines can drive up to 16 mA permanently.
		 *
		 * The remaining I/O lines can draw only 8 mA. However, the total
		 * current drawn by all the I/O lines cannot exceed 150 mA (100 mA for
		 * AT91SAM7S32/16).
		 *
		 * @see		Datasheet AT91SAM7S: 10.4 PIO Controller A Multiplexing
		 *
		 * \ingroup	at91
		 * \author	Fabian Greif
		 */
		class Pio
		{
		public:
			/**
			 * @brief	Enable clock for the Input/Output Controller
			 */
			static void
			enable();

			static void
			disable();

			/**
			 * @brief	Set a interrupt handler function
			 *
			 * Common handler for all pin change interrupts.
			 *
			 * When the software reads PIO_ISR, all the interrupts are
			 * automatically cleared. This signifies that all the interrupts
			 * that are pending when PIO_ISR is read must be handled.
			 *
			 * @param	controller	Selects the PIO controller (only PIOA for AT91SAM7S,
			 * 						PIOA and PIOB for AT91SAM7X)
			 * @param	handler		Interrupt handler
			 */
			static void
			registerInterruptHandler(PioController controller, Aic::Handler handler);

			/**
			 * @brief	Remove interrupt handler and disable the interrupt
			 */
			static void
			removeInterruptHandler(PioController controller);
		};
	}
}

#endif // XPCC_AT91__PIT_HPP


text:
define({
  "businessAnalyst": "Business Analyst",
  "defineWhichInfographics": "Määritä, mikä infografiikka on käytettävissä pienoisohjelmassa:",
  "defineWhichReports": "Määritä, mitkä raportit ovat käytettävissä pienoisohjelmassa:",
  "defaultValues": "Oletusarvot:",
  "disable": "Poista käytöstä",
  "driveTime": "Ajoaika",
  "infographics": "Infografiikka",
  "invalidValueRing": "Arvojen on oltava välillä 0–1 000.",
  "invalidValueDTWT": "Arvojen on oltava välillä 0–300.",
  "km": "km",
  "miles": "mailia",
  "minutes": "minuuttia",
  "radius": "Säde",
  "reports": "Raportit",
  "rings": "Renkaat",
  "selectCountryOrRegion": "Valitse maa tai alue:",
  "thisEntryIsNotValid": "Tämä merkintä ei kelpaa.",
  "time": "Kellonaika",
  "walkTime": "Kävelyaika"
});


text:
LOG_SETUP(".queryeval.parallel_weak_and_search");

using vespalib::make_string;

namespace search::queryeval {

typedef ParallelWeakAndSearch::MatchParams MatchParams;
typedef ParallelWeakAndSearch::RankParams RankParams;

namespace wand {

namespace { bool should_monitor_wand() { return LOG_WOULD_LOG(spam); } }

template <typename VectorizedTerms, typename FutureHeap, typename PastHeap, bool IS_STRICT>
class ParallelWeakAndSearchImpl : public ParallelWeakAndSearch
{
private:
    fef::TermFieldMatchData       &_tfmd;
    VectorizedTerms                _terms;
    DualHeap<FutureHeap, PastHeap> _heaps;
    Algorithm                      _algo;
    score_t                        _threshold;
    score_t                        _boostedThreshold;
    const MatchParams              _matchParams;
    std::vector<score_t>           _localScores;

    void updateThreshold(score_t newThreshold) {
        if (newThreshold > _threshold) {
            _threshold = newThreshold;
            _boostedThreshold = (newThreshold * _matchParams.thresholdBoostFactor);
        }
    }

    void seek_strict(uint32_t docid) {
        _algo.set_candidate(_terms, _heaps, docid);
        while (_algo.solve_wand_constraint(_terms, _heaps, GreaterThan(_boostedThreshold))) {
            if (_algo.check_score(_terms, _heaps, DotProductScorer(), GreaterThan(_threshold))) {
                setDocId(_algo.get_candidate());
                return;
            } else {
                _algo.set_candidate(_terms, _heaps, _algo.get_candidate() + 1);
            }
        }
        setAtEnd();
    }

    void seek_unstrict(uint32_t docid) {
        if (docid > _algo.get_candidate()) {
            _algo.set_candidate(_terms, _heaps, docid);
            if (_algo.check_wand_constraint(_terms, _heaps, GreaterThan(_boostedThreshold))) {
                if (_algo.check_score(_terms, _heaps, DotProductScorer(), GreaterThan(_threshold))) {
                    setDocId(_algo.get_candidate());
                }
            }
        }
    }

public:
    ParallelWeakAndSearchImpl(fef::TermFieldMatchData &tfmd,
                              VectorizedTerms &&terms,
                              const MatchParams &matchParams)
        : _tfmd(tfmd),
          _terms(std::move(terms)),
          _heaps(DocIdOrder(_terms.docId()), _terms.size()),
          _algo(),
          _threshold(matchParams.scoreThreshold),
          _boostedThreshold(_threshold * matchParams.thresholdBoostFactor),
          _matchParams(matchParams),
          _localScores()
    {
    }
    virtual size_t get_num_terms() const override { return _terms.size(); }
    virtual int32_t get_term_weight(size_t idx) const override { return _terms.weight(idx); }
    virtual score_t get_max_score(size_t idx) const override { return _terms.maxScore(idx); }
    virtual const MatchParams &getMatchParams() const override { return _matchParams; }

    virtual void doSeek(uint32_t docid) override {
        updateThreshold(_matchParams.scores.getMinScore());
        if (IS_STRICT) {
            seek_strict(docid);
        } else {
            seek_unstrict(docid);
        }
    }
    virtual void doUnpack(uint32_t docid) override {
        score_t score = _algo.get_full_score(_terms, _heaps, DotProductScorer());
        _localScores.push_back(score);
        if (_localScores.size() == _matchParams.scoresAdjustFrequency) {
            _matchParams.scores.adjust(&_localScores[0], &_localScores[0] + _localScores.size());
            _localScores.clear();
        }
        _tfmd.setRawScore(docid, score);
    }
    virtual void visitMembers(vespalib::ObjectVisitor &visitor) const override {
        _terms.visit_members(visitor);
    }
    void initRange(uint32_t begin, uint32_t end) override {
        ParallelWeakAndSearch::initRange(begin, end);
        _algo.init_range(_terms, _heaps, begin, end);
    }
    Trinary is_strict() const override { return IS_STRICT ? Trinary::True : Trinary::False; }
};

namespace {

wand::Terms
insertMonitoringSearchIterator(const wand::Terms &terms)
{
    wand::Terms retval = terms;
    for (size_t i = 0; i < terms.size(); ++i) {
        wand::Term &t = retval[i];
        t.search = new MonitoringSearchIterator
            (make_string("w%d:e%u:m%" PRId64 "",
                         t.weight, t.estHits, DotProductScorer::calculateMaxScore(t)),
             SearchIterator::UP(t.search), true);
    }
    return retval;
}

template <typename FutureHeap, typename PastHeap, bool IS_STRICT>
SearchIterator::UP
createWand(const wand::Terms &terms,
           const ParallelWeakAndSearch::MatchParams &matchParams,
           ParallelWeakAndSearch::RankParams &&rankParams)
{
    typedef ParallelWeakAndSearchImpl<VectorizedIteratorTerms, FutureHeap, PastHeap, IS_STRICT> WandType;
    if (should_monitor_wand()) {
        wand::Terms termsWithMonitoring = insertMonitoringSearchIterator(terms);
        MonitoringSearchIterator::UP monitoringIterator =
            MonitoringSearchIterator::UP(new MonitoringSearchIterator
            (make_string("PWAND(%u,%" PRId64 "),strict=%u",
                         matchParams.scores.getScoresToTrack(),
                         matchParams.scoreThreshold,
                         IS_STRICT),
             SearchIterator::UP(new WandType(rankParams.rootMatchData,
                                             VectorizedIteratorTerms(termsWithMonitoring,
                                                     DotProductScorer(),
                                                     matchParams.docIdLimit,
                                                     std::move(rankParams.childrenMatchData)),
                                             matchParams)),
             false));
        return std::make_unique<MonitoringDumpIterator>(std::move(monitoringIterator));
    }
    return std::make_unique<WandType>(rankParams.rootMatchData,
                        VectorizedIteratorTerms(terms,
                                DotProductScorer(),
                                matchParams.docIdLimit,
                                std::move(rankParams.childrenMatchData)),
                        matchParams);
}

} // namespace search::queryeval::wand::<unnamed>

} // namespace search::queryeval::wand

SearchIterator::UP
ParallelWeakAndSearch::createArrayWand(const Terms &terms,
                                       const MatchParams &matchParams,
                                       RankParams &&rankParams,
                                       bool strict)
{
    if (strict) {
        return wand::createWand<vespalib::LeftArrayHeap, vespalib::RightArrayHeap, true>(terms, matchParams, std::move(rankParams));
    } else {
        return wand::createWand<vespalib::LeftArrayHeap, vespalib::RightArrayHeap, false>(terms, matchParams, std::move(rankParams));
    }
}

SearchIterator::UP
ParallelWeakAndSearch::createHeapWand(const Terms &terms,
                                      const MatchParams &matchParams,
                                      RankParams &&rankParams,
                                      bool strict)
{
    if (strict) {
        return wand::createWand<vespalib::LeftHeap, vespalib::RightHeap, true>(terms, matchParams, std::move(rankParams));
    } else {
        return wand::createWand<vespalib::LeftHeap, vespalib::RightHeap, false>(terms, matchParams, std::move(rankParams));
    }
}

SearchIterator::UP
ParallelWeakAndSearch::create(const Terms &terms,
                              const MatchParams &matchParams,
                              RankParams &&rankParams,
                              bool strict)
{
    if (terms.size() < 128) {
        return createArrayWand(terms, matchParams, std::move(rankParams), strict);
    } else {
        return createHeapWand(terms, matchParams, std::move(rankParams), strict);
    }
}

//-----------------------------------------------------------------------------

namespace {

template <typename VectorizedTerms, typename FutureHeap, typename PastHeap>
SearchIterator::UP create_helper(search::fef::TermFieldMatchData &tfmd, VectorizedTerms &&terms, const MatchParams &params, bool strict) {
    return (strict)
        ? SearchIterator::UP(new wand::ParallelWeakAndSearchImpl<VectorizedTerms, FutureHeap, PastHeap, true>(tfmd, std::move(terms), params))
        : SearchIterator::UP( new wand::ParallelWeakAndSearchImpl<VectorizedTerms, FutureHeap, PastHeap, false>(tfmd, std::move(terms), params));
}

template <typename VectorizedTerms>
SearchIterator::UP create_helper(search::fef::TermFieldMatchData &tfmd, VectorizedTerms &&terms, const MatchParams &params, bool strict, bool use_array) {
    return (use_array)
        ? create_helper<VectorizedTerms, vespalib::LeftArrayHeap, vespalib::RightArrayHeap>(tfmd, std::move(terms), params, strict)
        : create_helper<VectorizedTerms, vespalib::LeftHeap, vespalib::RightHeap>(tfmd, std::move(terms), params, strict);
}

} // namespace search::queryeval::<unnamed>

SearchIterator::UP
ParallelWeakAndSearch::create(search::fef::TermFieldMatchData &tfmd,
                              const MatchParams &matchParams,
                              const std::vector<int32_t> &weights,
                              const std::vector<IDocumentWeightAttribute::LookupResult> &dict_entries,
                              const IDocumentWeightAttribute &attr,
                              bool strict)
{
    assert(weights.size() == dict_entries.size());
    if (!wand::should_monitor_wand()) {
        wand::VectorizedAttributeTerms terms(weights, dict_entries, attr, wand::DotProductScorer(), matchParams.docIdLimit);
        return create_helper(tfmd, std::move(terms), matchParams, strict, (weights.size() < 128));
    } else {
        // reverse-wrap direct iterators into old API to be compatible with monitoring
        fef::MatchDataLayout layout;
        std::vector<fef::TermFieldHandle> handles;
        for (size_t i = 0; i < weights.size(); ++i) {
            handles.push_back(layout.allocTermField(tfmd.getFieldId()));
        }
        fef::MatchData::UP childrenMatchData = layout.createMatchData();
        assert(childrenMatchData->getNumTermFields() == dict_entries.size());
        wand::Terms terms;
        for (size_t i = 0; i < dict_entries.size(); ++i) {
            terms.push_back(wand::Term(new DocumentWeightSearchIterator(*(childrenMatchData->resolveTermField(handles[i])), attr, dict_entries[i]),
                                       weights[i],
                                       dict_entries[i].posting_size,
                                       childrenMatchData->resolveTermField(handles[i])));
        }
        assert(terms.size() == dict_entries.size());
        return create(terms, matchParams, RankParams(tfmd, std::move(childrenMatchData)), strict);
    }
}

}


text:
use crate::{
    character::CharacterCache,
    color,
    math::Matrix2d,
    math::Vec2d,
    types::{Color, FontSize},
    DrawState, Graphics, Image, Transformed,
};

/// Renders text
#[derive(Copy, Clone)]
pub struct Text {
    /// The color
    pub color: Color,
    /// The font size
    pub font_size: FontSize,
    /// Whether or not the text's position should be rounded (to a signed distance field).
    pub round: bool,
}

impl Text {
    /// Creates a new text with black color
    pub fn new(font_size: FontSize) -> Text {
        Text {
            color: color::BLACK,
            font_size,
            round: false,
        }
    }

    /// Creates a new colored text
    pub fn new_color(color: Color, font_size: FontSize) -> Text {
        Text {
            color,
            font_size,
            round: false,
        }
    }

    /// A builder method indicating that the Text's position should be rounded upon drawing.
    pub fn round(mut self) -> Text {
        self.round = true;
        self
    }

    /// Draws text at position with a character cache
    pub fn draw_pos<C, G>(
        &self,
        text: &str,
        pos: Vec2d,
        cache: &mut C,
        draw_state: &DrawState,
        transform: Matrix2d,
        g: &mut G,
    ) -> Result<(), C::Error>
    where
        C: CharacterCache,
        G: Graphics<Texture = <C as CharacterCache>::Texture>,
    {
        self.draw(text, cache, draw_state, transform.trans_pos(pos), g)
    }

    /// Draws text with a character cache
    pub fn draw<C, G>(
        &self,
        text: &str,
        cache: &mut C,
        draw_state: &DrawState,
        transform: Matrix2d,
        g: &mut G,
    ) -> Result<(), C::Error>
    where
        C: CharacterCache,
        G: Graphics<Texture = <C as CharacterCache>::Texture>,
    {
        let mut image = Image::new_color(self.color);

        let mut x = 0.0;
        let mut y = 0.0;
        for ch in text.chars() {
            let character = cache.character(self.font_size, ch)?;
            let mut ch_x = x + character.left();
            let mut ch_y = y - character.top();
            if self.round {
                ch_x = ch_x.round();
                ch_y = ch_y.round();
            }
            image = image.src_rect([
                character.atlas_offset[0],
                character.atlas_offset[1],
                character.atlas_size[0],
                character.atlas_size[1],
            ]);
            image.draw(
                character.texture,
                draw_state,
                transform.trans(ch_x, ch_y),
                g,
            );
            x += character.advance_width();
            y += character.advance_height();
        }

        Ok(())
    }
}


text:
from fortios import FortiOS
from forticonfig import FortiConfig