package io.mycat.route.function;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;

import org.slf4j.Logger; import org.slf4j.LoggerFactory;

import io.mycat.config.model.rule.RuleAlgorithm;

/**
 * 例子 按日期列分区  格式 between操作解析的范例
 *
 * @author lxy
 * @author Sean xiaoyouyy
 */
public class PartitionByDate extends AbstractPartitionAlgorithm implements RuleAlgorithm {
	private static final Logger LOGGER = LoggerFactory.getLogger(PartitionByDate.class);

	private String sBeginDate;
	private String sEndDate;
	private String sPartionDay;
	private String dateFormat;

	private long beginDate;
	private long partionTime;
	private long endDate;
	private int nCount;

	private ThreadLocal<SimpleDateFormat> formatter;

	private static final long oneDay = 86400000;
	//支持自然日分区属性
	private String sNaturalDay;
	//是否自然日分区
	private boolean bNaturalDay;
	//自然日差额最少是28天
	private static final int naturalLimitDay =28;
	//开启自然日模式
	private static final String  naturalDayOpen ="1";

	private String oldsPartionDay;
	@Override
	public void init() {
		try {
			//Support  Natural Day
			if(naturalDayOpen.equals(sNaturalDay)){
				bNaturalDay =true;
				oldsPartionDay=sPartionDay;
				sPartionDay="1";
			}
			if(sBeginDate!=null&&!sBeginDate.equals("")) {
				partionTime = Integer.parseInt(sPartionDay) * oneDay;
				beginDate = new SimpleDateFormat(dateFormat).parse(sBeginDate).getTime();
			}
			if(sEndDate!=null&&!sEndDate.equals("")&&beginDate>0){
				endDate = new SimpleDateFormat(dateFormat).parse(sEndDate).getTime();
				nCount = (int) ((endDate - beginDate) / partionTime) + 1;
				if(bNaturalDay&&nCount<naturalLimitDay){
					bNaturalDay =false;
					partionTime = Integer.parseInt(oldsPartionDay) * oneDay;
					nCount = (int) ((endDate - beginDate) / partionTime) + 1;
				}
			}
			formatter = new ThreadLocal<SimpleDateFormat>() {
				@Override
				protected SimpleDateFormat initialValue() {
					return new SimpleDateFormat(dateFormat);
				}
			};
		} catch (ParseException e) {
			throw new java.lang.IllegalArgumentException(e);
		}
	}

	@Override
	public Integer calculate(String columnValue)  {
		try {
			int targetPartition ;
			if(bNaturalDay){
				Calendar curTime = Calendar.getInstance();
				curTime.setTime(formatter.get().parse(columnValue));
				targetPartition = curTime.get(Calendar.DAY_OF_MONTH);
				return  targetPartition-1;
			}
			long targetTime = formatter.get().parse(columnValue).getTime();
			targetPartition = (int) ((targetTime - beginDate) / partionTime);
			if(targetTime>endDate && nCount!=0) {
				targetPartition = targetPartition % nCount;
			}
			return targetPartition;

		} catch (ParseException e) {
			throw new IllegalArgumentException(new StringBuilder().append("columnValue:").append(columnValue).append(" Please check if the format satisfied.").toString(),e);
		}
	}

	@Override
	public Integer[] calculateRange(String beginValue, String endValue)  {
		SimpleDateFormat format = new SimpleDateFormat(this.dateFormat);
		try {
			Date beginDate = format.parse(beginValue);
			Date endDate = format.parse(endValue);
			Calendar cal = Calendar.getInstance();
			List<Integer> list = new ArrayList<Integer>();
			while(beginDate.getTime() <= endDate.getTime()){
				Integer nodeValue = this.calculate(format.format(beginDate));
				if(Collections.frequency(list, nodeValue) < 1) list.add(nodeValue);
				cal.setTime(beginDate);
				cal.add(Calendar.DATE, 1);
				beginDate = cal.getTime();
			}

			Integer[] nodeArray = new Integer[list.size()];
			for (int i=0;i<list.size();i++) {
				nodeArray[i] = list.get(i);
			}

			return nodeArray;
		} catch (ParseException e) {
			LOGGER.error("error",e);
			return new Integer[0];
		}
	}

	@Override
	public int getPartitionNum() {
		int count = this.nCount;
		return count > 0 ? count : -1;
	}

	public void setsBeginDate(String sBeginDate) {
		this.sBeginDate = sBeginDate;
	}

	public void setsPartionDay(String sPartionDay) {
		this.sPartionDay = sPartionDay;
	}

	public void setDateFormat(String dateFormat) {
		this.dateFormat = dateFormat;
	}
	public String getsEndDate() {
		return this.sEndDate;
	}
	public void setsEndDate(String sEndDate) {
		this.sEndDate = sEndDate;
	}

	public String getsNaturalDay() {
		return sNaturalDay;
	}

	public void setsNaturalDay(String sNaturalDay) {
		this.sNaturalDay = sNaturalDay;
	}
}

{'repo_name': 'MyCATApache/Mycat-Server', 'stars': '8177', 'repo_language': 'Java', 'file_name': 'dnindex.properties', 'mime_type': 'text/plain', 'hash': -6410484258082483037, 'source_dataset': 'data'}


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

package org.matrix.android.sdk.internal.session.sync.job

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Observer
import com.squareup.moshi.JsonEncodingException
import org.matrix.android.sdk.api.failure.Failure
import org.matrix.android.sdk.api.failure.isTokenError
import org.matrix.android.sdk.api.session.sync.SyncState
import org.matrix.android.sdk.internal.network.NetworkConnectivityChecker
import org.matrix.android.sdk.internal.session.sync.SyncTask
import org.matrix.android.sdk.internal.session.typing.DefaultTypingUsersTracker
import org.matrix.android.sdk.internal.util.BackgroundDetectionObserver
import org.matrix.android.sdk.internal.util.Debouncer
import org.matrix.android.sdk.internal.util.createUIHandler
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.cancelChildren
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.matrix.android.sdk.api.session.call.MxCall
import org.matrix.android.sdk.internal.session.call.ActiveCallHandler
import timber.log.Timber
import java.net.SocketTimeoutException
import java.util.Timer
import java.util.TimerTask
import javax.inject.Inject
import kotlin.concurrent.schedule

private const val RETRY_WAIT_TIME_MS = 10_000L
private const val DEFAULT_LONG_POOL_TIMEOUT = 30_000L

internal class SyncThread @Inject constructor(private val syncTask: SyncTask,
                                              private val typingUsersTracker: DefaultTypingUsersTracker,
                                              private val networkConnectivityChecker: NetworkConnectivityChecker,
                                              private val backgroundDetectionObserver: BackgroundDetectionObserver,
                                              private val activeCallHandler: ActiveCallHandler
) : Thread(), NetworkConnectivityChecker.Listener, BackgroundDetectionObserver.Listener {

    private var state: SyncState = SyncState.Idle
    private var liveState = MutableLiveData<SyncState>(state)
    private val lock = Object()
    private val syncScope = CoroutineScope(SupervisorJob())
    private val debouncer = Debouncer(createUIHandler())

    private var canReachServer = true
    private var isStarted = false
    private var isTokenValid = true
    private var retryNoNetworkTask: TimerTask? = null

    private val activeCallListObserver = Observer<MutableList<MxCall>> { activeCalls ->
        if (activeCalls.isEmpty() && backgroundDetectionObserver.isInBackground) {
            pause()
        }
    }

    init {
        updateStateTo(SyncState.Idle)
    }

    fun setInitialForeground(initialForeground: Boolean) {
        val newState = if (initialForeground) SyncState.Idle else SyncState.Paused
        updateStateTo(newState)
    }

    fun restart() = synchronized(lock) {
        if (!isStarted) {
            Timber.v("Resume sync...")
            isStarted = true
            // Check again server availability and the token validity
            canReachServer = true
            isTokenValid = true
            lock.notify()
        }
    }

    fun pause() = synchronized(lock) {
        if (isStarted) {
            Timber.v("Pause sync...")
            isStarted = false
            retryNoNetworkTask?.cancel()
            syncScope.coroutineContext.cancelChildren()
        }
    }

    fun kill() = synchronized(lock) {
        Timber.v("Kill sync...")
        updateStateTo(SyncState.Killing)
        retryNoNetworkTask?.cancel()
        syncScope.coroutineContext.cancelChildren()
        lock.notify()
    }

    fun currentState() = state

    fun liveState(): LiveData<SyncState> {
        return liveState
    }

    override fun onConnectivityChanged() {
        retryNoNetworkTask?.cancel()
        synchronized(lock) {
            canReachServer = true
            lock.notify()
        }
    }

    override fun run() {
        Timber.v("Start syncing...")

        isStarted = true
        networkConnectivityChecker.register(this)
        backgroundDetectionObserver.register(this)
        registerActiveCallsObserver()
        while (state != SyncState.Killing) {
            Timber.v("Entering loop, state: $state")
            if (!isStarted) {
                Timber.v("Sync is Paused. Waiting...")
                updateStateTo(SyncState.Paused)
                synchronized(lock) { lock.wait() }
                Timber.v("...unlocked")
            } else if (!canReachServer) {
                Timber.v("No network. Waiting...")
                updateStateTo(SyncState.NoNetwork)
                // We force retrying in RETRY_WAIT_TIME_MS maximum. Otherwise it will be unlocked by onConnectivityChanged() or restart()
                retryNoNetworkTask = Timer(SyncState.NoNetwork.toString(), false).schedule(RETRY_WAIT_TIME_MS) {
                    synchronized(lock) {
                        canReachServer = true
                        lock.notify()
                    }
                }
                synchronized(lock) { lock.wait() }
                Timber.v("...retry")
            } else if (!isTokenValid) {
                Timber.v("Token is invalid. Waiting...")
                updateStateTo(SyncState.InvalidToken)
                synchronized(lock) { lock.wait() }
                Timber.v("...unlocked")
            } else {
                if (state !is SyncState.Running) {
                    updateStateTo(SyncState.Running(afterPause = true))
                }
                // No timeout after a pause
                val timeout = state.let { if (it is SyncState.Running && it.afterPause) 0 else DEFAULT_LONG_POOL_TIMEOUT }
                Timber.v("Execute sync request with timeout $timeout")
                val params = SyncTask.Params(timeout)
                val sync = syncScope.launch {
                    doSync(params)
                }
                runBlocking {
                    sync.join()
                }
                Timber.v("...Continue")
            }
        }
        Timber.v("Sync killed")
        updateStateTo(SyncState.Killed)
        backgroundDetectionObserver.unregister(this)
        networkConnectivityChecker.unregister(this)
        unregisterActiveCallsObserver()
    }

    private fun registerActiveCallsObserver() {
        syncScope.launch(Dispatchers.Main) {
            activeCallHandler.getActiveCallsLiveData().observeForever(activeCallListObserver)
        }
    }

    private fun unregisterActiveCallsObserver() {
        syncScope.launch(Dispatchers.Main) {
            activeCallHandler.getActiveCallsLiveData().removeObserver(activeCallListObserver)
        }
    }

    private suspend fun doSync(params: SyncTask.Params) {
        try {
            syncTask.execute(params)
        } catch (failure: Throwable) {
            if (failure is Failure.NetworkConnection) {
                canReachServer = false
            }
            if (failure is Failure.NetworkConnection && failure.cause is SocketTimeoutException) {
                // Timeout are not critical
                Timber.v("Timeout")
            } else if (failure is Failure.Cancelled) {
                Timber.v("Cancelled")
            } else if (failure.isTokenError()) {
                // No token or invalid token, stop the thread
                Timber.w(failure, "Token error")
                isStarted = false
                isTokenValid = false
            } else {
                Timber.e(failure)
                if (failure !is Failure.NetworkConnection || failure.cause is JsonEncodingException) {
                    // Wait 10s before retrying
                    Timber.v("Wait 10s")
                    delay(RETRY_WAIT_TIME_MS)
                }
            }
        } finally {
            state.let {
                if (it is SyncState.Running && it.afterPause) {
                    updateStateTo(SyncState.Running(afterPause = false))
                }
            }
        }
    }

    private fun updateStateTo(newState: SyncState) {
        Timber.v("Update state from $state to $newState")
        if (newState == state) {
            return
        }
        state = newState
        debouncer.debounce("post_state", Runnable {
            liveState.value = newState
        }, 150)
    }

    override fun onMoveToForeground() {
        restart()
    }

    override fun onMoveToBackground() {
        if (activeCallHandler.getActiveCallsLiveData().value.isNullOrEmpty()) {
            pause()
        }
    }
}

{'repo_name': 'vector-im/riotX-android', 'stars': '518', 'repo_language': 'Kotlin', 'file_name': 'diff_match_patch.java', 'mime_type': 'text/x-c', 'hash': 2455572942006709052, 'source_dataset': 'data'}


// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: v2ray.com/core/app/policy/config.proto

package com.v2ray.core.app.policy;

public final class ConfigOuterClass {
    private ConfigOuterClass() {
    }

    public static void registerAllExtensions(
            com.google.protobuf.ExtensionRegistryLite registry) {
    }

    public static void registerAllExtensions(
            com.google.protobuf.ExtensionRegistry registry) {
        registerAllExtensions(
                (com.google.protobuf.ExtensionRegistryLite) registry);
    }

    static final com.google.protobuf.Descriptors.Descriptor
            internal_static_v2ray_core_app_policy_Second_descriptor;
    static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internal_static_v2ray_core_app_policy_Second_fieldAccessorTable;
    static final com.google.protobuf.Descriptors.Descriptor
            internal_static_v2ray_core_app_policy_Policy_descriptor;
    static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internal_static_v2ray_core_app_policy_Policy_fieldAccessorTable;
    static final com.google.protobuf.Descriptors.Descriptor
            internal_static_v2ray_core_app_policy_Policy_Timeout_descriptor;
    static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internal_static_v2ray_core_app_policy_Policy_Timeout_fieldAccessorTable;
    static final com.google.protobuf.Descriptors.Descriptor
            internal_static_v2ray_core_app_policy_Policy_Stats_descriptor;
    static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internal_static_v2ray_core_app_policy_Policy_Stats_fieldAccessorTable;
    static final com.google.protobuf.Descriptors.Descriptor
            internal_static_v2ray_core_app_policy_Policy_Buffer_descriptor;
    static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internal_static_v2ray_core_app_policy_Policy_Buffer_fieldAccessorTable;
    static final com.google.protobuf.Descriptors.Descriptor
            internal_static_v2ray_core_app_policy_SystemPolicy_descriptor;
    static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internal_static_v2ray_core_app_policy_SystemPolicy_fieldAccessorTable;
    static final com.google.protobuf.Descriptors.Descriptor
            internal_static_v2ray_core_app_policy_SystemPolicy_Stats_descriptor;
    static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internal_static_v2ray_core_app_policy_SystemPolicy_Stats_fieldAccessorTable;
    static final com.google.protobuf.Descriptors.Descriptor
            internal_static_v2ray_core_app_policy_Config_descriptor;
    static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internal_static_v2ray_core_app_policy_Config_fieldAccessorTable;
    static final com.google.protobuf.Descriptors.Descriptor
            internal_static_v2ray_core_app_policy_Config_LevelEntry_descriptor;
    static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internal_static_v2ray_core_app_policy_Config_LevelEntry_fieldAccessorTable;

    public static com.google.protobuf.Descriptors.FileDescriptor
    getDescriptor() {
        return descriptor;
    }

    private static com.google.protobuf.Descriptors.FileDescriptor
            descriptor;

    static {
        String[] descriptorData = {
                "\n&v2ray.com/core/app/policy/config.proto" +
                        "\022\025v2ray.core.app.policy\"\027\n\006Second\022\r\n\005val" +
                        "ue\030\001 \001(\r\"\335\003\n\006Policy\0226\n\007timeout\030\001 \001(\0132%.v" +
                        "2ray.core.app.policy.Policy.Timeout\0222\n\005s" +
                        "tats\030\002 \001(\0132#.v2ray.core.app.policy.Polic" +
                        "y.Stats\0224\n\006buffer\030\003 \001(\0132$.v2ray.core.app" +
                        ".policy.Policy.Buffer\032\335\001\n\007Timeout\0220\n\than" +
                        "dshake\030\001 \001(\0132\035.v2ray.core.app.policy.Sec" +
                        "ond\0226\n\017connection_idle\030\002 \001(\0132\035.v2ray.cor" +
                        "e.app.policy.Second\0222\n\013uplink_only\030\003 \001(\013" +
                        "2\035.v2ray.core.app.policy.Second\0224\n\rdownl" +
                        "ink_only\030\004 \001(\0132\035.v2ray.core.app.policy.S" +
                        "econd\0323\n\005Stats\022\023\n\013user_uplink\030\001 \001(\010\022\025\n\ru" +
                        "ser_downlink\030\002 \001(\010\032\034\n\006Buffer\022\022\n\nconnecti" +
                        "on\030\001 \001(\005\"\203\001\n\014SystemPolicy\0228\n\005stats\030\001 \001(\013" +
                        "2).v2ray.core.app.policy.SystemPolicy.St" +
                        "ats\0329\n\005Stats\022\026\n\016inbound_uplink\030\001 \001(\010\022\030\n\020" +
                        "inbound_downlink\030\002 \001(\010\"\303\001\n\006Config\0227\n\005lev" +
                        "el\030\001 \003(\0132(.v2ray.core.app.policy.Config." +
                        "LevelEntry\0223\n\006system\030\002 \001(\0132#.v2ray.core." +
                        "app.policy.SystemPolicy\032K\n\nLevelEntry\022\013\n" +
                        "\003key\030\001 \001(\r\022,\n\005value\030\002 \001(\0132\035.v2ray.core.a" +
                        "pp.policy.Policy:\0028\001B=\n\031com.v2ray.core.a" +
                        "pp.policyP\001Z\006policy\252\002\025V2Ray.Core.App.Pol" +
                        "icyb\006proto3"
        };
        com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
                new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
                    public com.google.protobuf.ExtensionRegistry assignDescriptors(
                            com.google.protobuf.Descriptors.FileDescriptor root) {
                        descriptor = root;
                        return null;
                    }
                };
        com.google.protobuf.Descriptors.FileDescriptor
                .internalBuildGeneratedFileFrom(descriptorData,
                        new com.google.protobuf.Descriptors.FileDescriptor[]{
                        }, assigner);
        internal_static_v2ray_core_app_policy_Second_descriptor =
                getDescriptor().getMessageTypes().get(0);
        internal_static_v2ray_core_app_policy_Second_fieldAccessorTable = new
                com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
                internal_static_v2ray_core_app_policy_Second_descriptor,
                new String[]{"Value",});
        internal_static_v2ray_core_app_policy_Policy_descriptor =
                getDescriptor().getMessageTypes().get(1);
        internal_static_v2ray_core_app_policy_Policy_fieldAccessorTable = new
                com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
                internal_static_v2ray_core_app_policy_Policy_descriptor,
                new String[]{"Timeout", "Stats", "Buffer",});
        internal_static_v2ray_core_app_policy_Policy_Timeout_descriptor =
                internal_static_v2ray_core_app_policy_Policy_descriptor.getNestedTypes().get(0);
        internal_static_v2ray_core_app_policy_Policy_Timeout_fieldAccessorTable = new
                com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
                internal_static_v2ray_core_app_policy_Policy_Timeout_descriptor,
                new String[]{"Handshake", "ConnectionIdle", "UplinkOnly", "DownlinkOnly",});
        internal_static_v2ray_core_app_policy_Policy_Stats_descriptor =
                internal_static_v2ray_core_app_policy_Policy_descriptor.getNestedTypes().get(1);
        internal_static_v2ray_core_app_policy_Policy_Stats_fieldAccessorTable = new
                com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
                internal_static_v2ray_core_app_policy_Policy_Stats_descriptor,
                new String[]{"UserUplink", "UserDownlink",});
        internal_static_v2ray_core_app_policy_Policy_Buffer_descriptor =
                internal_static_v2ray_core_app_policy_Policy_descriptor.getNestedTypes().get(2);
        internal_static_v2ray_core_app_policy_Policy_Buffer_fieldAccessorTable = new
                com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
                internal_static_v2ray_core_app_policy_Policy_Buffer_descriptor,
                new String[]{"Connection",});
        internal_static_v2ray_core_app_policy_SystemPolicy_descriptor =
                getDescriptor().getMessageTypes().get(2);
        internal_static_v2ray_core_app_policy_SystemPolicy_fieldAccessorTable = new
                com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
                internal_static_v2ray_core_app_policy_SystemPolicy_descriptor,
                new String[]{"Stats",});
        internal_static_v2ray_core_app_policy_SystemPolicy_Stats_descriptor =
                internal_static_v2ray_core_app_policy_SystemPolicy_descriptor.getNestedTypes().get(0);
        internal_static_v2ray_core_app_policy_SystemPolicy_Stats_fieldAccessorTable = new
                com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
                internal_static_v2ray_core_app_policy_SystemPolicy_Stats_descriptor,
                new String[]{"InboundUplink", "InboundDownlink",});
        internal_static_v2ray_core_app_policy_Config_descriptor =
                getDescriptor().getMessageTypes().get(3);
        internal_static_v2ray_core_app_policy_Config_fieldAccessorTable = new
                com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
                internal_static_v2ray_core_app_policy_Config_descriptor,
                new String[]{"Level", "System",});
        internal_static_v2ray_core_app_policy_Config_LevelEntry_descriptor =
                internal_static_v2ray_core_app_policy_Config_descriptor.getNestedTypes().get(0);
        internal_static_v2ray_core_app_policy_Config_LevelEntry_fieldAccessorTable = new
                com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
                internal_static_v2ray_core_app_policy_Config_LevelEntry_descriptor,
                new String[]{"Key", "Value",});
    }

    // @@protoc_insertion_point(outer_class_scope)
}

{'repo_name': 'master-coder-ll/v2ray-web-manager', 'stars': '413', 'repo_language': 'Go', 'file_name': 'proxy.yaml', 'mime_type': 'text/plain', 'hash': 4646843907803994883, 'source_dataset': 'data'}


<Application
    x:Class="UWPCalculatorHost.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:UWPCalculatorHost"
    RequestedTheme="Light">

</Application>

{'repo_name': 'ProfessionalCSharp/ProfessionalCSharp6', 'stars': '141', 'repo_language': 'C#', 'file_name': 'launchSettings.json', 'mime_type': 'text/plain', 'hash': -3366054463108185495, 'source_dataset': 'data'}


#using <System.Windows.Forms.dll>
#using <System.Drawing.dll>
#using <System.dll>
#using <System.Data.dll>

using namespace System;
using namespace System::Data;
using namespace System::ComponentModel;
using namespace System::Windows::Forms;

public ref class Form1: public Form
{
protected:
   RichTextBox^ richTextBox1;

   // <Snippet1>
public:
   bool FindMyText( String^ text )
   {
      // Initialize the return value to false by default.
      bool returnValue = false;

      // Ensure a search string has been specified.
      if ( text->Length > 0 )
      {
         // Obtain the location of the search string in richTextBox1.
         int indexToText = richTextBox1->Find( text, RichTextBoxFinds::MatchCase );
         // Determine if the text was found in richTextBox1.
         if ( indexToText >= 0 )
         {
            returnValue = true;
         }
      }

      return returnValue;
   }
   // </Snippet1>
};

{'repo_name': 'MicrosoftDocs/visualstudio-docs', 'stars': '606', 'repo_language': 'Python', 'file_name': 'how-to-create-a-basic-3-d-model.md', 'mime_type': 'text/plain', 'hash': 2721426918363268994, 'source_dataset': 'data'}


// Copyright (c) 2019 Spotify AB.
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

import Foundation

/// Parses the .xcactivitylog into a tree of `BuildStep`
// swiftlint:disable type_body_length
public final class ParserBuildSteps {

    let machineName: String
    var buildIdentifier = ""
    var buildStatus = ""
    var currentIndex = 0
    var totalErrors = 0
    var totalWarnings = 0
    var targetErrors = 0
    var targetWarnings = 0
    let swiftCompilerParser = SwiftCompilerParser()
    let clangCompilerParser = ClangCompilerParser()

    public lazy var dateFormatter: DateFormatter = {
        let formatter = DateFormatter()
        formatter.timeZone = TimeZone(abbreviation: "UTC")
        formatter.locale = Locale(identifier: "en_US_POSIX")
        formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZZZZ"
        return formatter
    }()

    lazy var warningCountRegexp: NSRegularExpression? = {
        let pattern = "([0-9]) warning[s]? generated"
        return NSRegularExpression.fromPattern(pattern)
    }()

    lazy var schemeRegexp: NSRegularExpression? = {
        let pattern = "scheme (.*)"
        return NSRegularExpression.fromPattern(pattern)
    }()

    lazy var targetRegexp: NSRegularExpression? = {
        let pattern = "BUILD( AGGREGATE)? TARGET (.*?) OF PROJECT"
        return NSRegularExpression.fromPattern(pattern)
    }()

    lazy var clangArchRegexp: NSRegularExpression? = {
        let pattern = "normal (\\w+) objective-c"
        return NSRegularExpression.fromPattern(pattern)
    }()

    lazy var swiftcArchRegexp: NSRegularExpression? = {
        let pattern = "^CompileSwift normal (\\w*) "
        return NSRegularExpression.fromPattern(pattern)
    }()

    /// - parameter machineName: The name of the machine. It will be used to create a unique identifier
    /// for the log. If `nil`, the host name will be used instead.
    public init(machineName: String? = nil) {
        if let machineName = machineName {
            self.machineName = machineName
        } else {
            self.machineName = MacOSMachineNameReader().machineName ?? "unknown"
        }
    }

    /// Parses the content from an Xcode log into a `BuildStep`
    /// - parameter activityLog: An `IDEActivityLog`
    /// - returns: A `BuildStep` with the parsed content from the log.
    public func parse(activityLog: IDEActivityLog) throws -> BuildStep {
        self.buildIdentifier = "\(machineName)_\(activityLog.mainSection.uniqueIdentifier)"
        buildStatus = activityLog.mainSection.localizedResultString.replacingOccurrences(of: "Build ", with: "")
        let mainSectionWithTargets = activityLog.mainSection.groupedByTarget()
        var mainBuildStep = try parseLogSection(logSection: mainSectionWithTargets, type: .main, parentSection: nil)
        mainBuildStep.errorCount = totalErrors
        mainBuildStep.warningCount = totalWarnings
        mainBuildStep = decorateWithSwiftcTimes(mainBuildStep)
        return mainBuildStep
    }

    // swiftlint:disable function_body_length cyclomatic_complexity
    public func parseLogSection(logSection: IDEActivityLogSection,
                                type: BuildStepType,
                                parentSection: BuildStep?,
                                parentLogSection: IDEActivityLogSection? = nil)
        throws -> BuildStep {
            currentIndex += 1
            let detailType = type == .detail ? DetailStepType.getDetailType(signature: logSection.signature) : .none
            var schema = "", parentIdentifier = ""
            if type == .main {
                schema = getSchema(title: logSection.title)
            } else if let parentSection = parentSection {
                schema = parentSection.schema
                parentIdentifier = parentSection.identifier
            }
            if type == .target {
                targetErrors = 0
                targetWarnings = 0
            }
            let notices = parseWarningsAndErrorsFromLogSection(logSection, forType: detailType)
            let warnings: [Notice]? = notices?["warnings"]
            let errors: [Notice]? = notices?["errors"]
            let notes: [Notice]? = notices?["notes"]
            var errorCount: Int = 0, warningCount: Int = 0
            if let errors = errors {
                errorCount = errors.count
                totalErrors += errors.count
                targetErrors += errors.count
            }
            if let warnings = warnings {
                warningCount = warnings.count
                totalWarnings += warnings.count
                targetWarnings += warnings.count
            }
            var step = BuildStep(type: type,
                                 machineName: machineName,
                                 buildIdentifier: self.buildIdentifier,
                                 identifier: "\(self.buildIdentifier)_\(currentIndex)",
                                 parentIdentifier: parentIdentifier,
                                 domain: logSection.domainType,
                                 title: type == .target ? getTargetName(logSection.title) : logSection.title,
                                 signature: logSection.signature,
                                 startDate: toDate(timeInterval: logSection.timeStartedRecording),
                                 endDate: toDate(timeInterval: logSection.timeStoppedRecording),
                                 startTimestamp: toTimestampSince1970(timeInterval: logSection.timeStartedRecording),
                                 endTimestamp: toTimestampSince1970(timeInterval: logSection.timeStoppedRecording),
                                 duration: getDuration(startTimeInterval: logSection.timeStartedRecording,
                                                       endTimeInterval: logSection.timeStoppedRecording),
                                 detailStepType: detailType,
                                 buildStatus: buildStatus,
                                 schema: schema,
                                 subSteps: [BuildStep](),
                                 warningCount: warningCount,
                                 errorCount: errorCount,
                                 architecture: parseArchitectureFromLogSection(logSection, andType: detailType),
                                 documentURL: logSection.location.documentURLString,
                                 warnings: warnings,
                                 errors: errors,
                                 notes: notes,
                                 swiftFunctionTimes: nil,
                                 fetchedFromCache: wasFetchedFromCache(parent:
                                    parentSection, section: logSection),
                                 compilationEndTimestamp: 0,
                                 compilationDuration: 0,
                                 clangTimeTraceFile: nil,
                                 linkerStatistics: nil
                                 )

            step.subSteps = try logSection.subSections.map { subSection -> BuildStep in
                let subType: BuildStepType = type == .main ? .target : .detail
                return try parseLogSection(logSection: subSection,
                                           type: subType,
                                           parentSection: step,
                                           parentLogSection: logSection)
            }
            if type == .target {
                step.warningCount = targetWarnings
                step.errorCount = targetErrors
            } else if type == .detail {
                step = step.moveSwiftStepsToRoot()
            }
            if step.detailStepType == .swiftCompilation {
                if step.fetchedFromCache == false {
                    swiftCompilerParser.addLogSection(logSection)
                }
                if let swiftSteps = logSection.getSwiftIndividualSteps(buildStep: step,
                                                                       parentCommandDetailDesc:
                                                                       parentLogSection?.commandDetailDesc ?? "",
                                                                       currentIndex: &currentIndex) {
                    step.subSteps.append(contentsOf: swiftSteps)
                    step = step.withFilteredNotices()
                }
            }

            if step.fetchedFromCache == false && step.detailStepType == .cCompilation {
                step.clangTimeTraceFile = "file://\(clangCompilerParser.parseTimeTraceFile(logSection) ?? "")"
            }

            if step.fetchedFromCache == false && step.detailStepType == .linker {
                step.linkerStatistics = clangCompilerParser.parseLinkerStatistics(logSection)
            }

            step = addCompilationTimes(step: step)
            return step
    }

    private func toDate(timeInterval: Double) -> String {
        return dateFormatter.string(from: Date(timeIntervalSinceReferenceDate: timeInterval))
    }

    private func toTimestampSince1970(timeInterval: Double) -> Double {
        return Date(timeIntervalSinceReferenceDate: timeInterval).timeIntervalSince1970
    }

    private func getDuration(startTimeInterval: Double, endTimeInterval: Double) -> Double {
        var duration = endTimeInterval - startTimeInterval
        //If the endtime is almost the same as the endtime, we got a constant
        //in the tokens and a date in the future (year 4001). Here we normalize it to 0.0 secs
        if endTimeInterval >= 63113904000.0 {
            duration = 0.0
        }
        duration = duration >= 0 ? duration : 0.0
        return duration
    }

    private func getSchema(title: String) -> String {
        let schema = title.replacingOccurrences(of: "Build ", with: "")
        guard let schemaRegexp = schemeRegexp else {
            return schema
        }
        let range = NSRange(location: 0, length: title.count)
        let matches = schemaRegexp.matches(in: title, options: .reportCompletion, range: range)
        guard let match = matches.first else {
            return schema
        }
        return title.substring(match.range(at: 1))
    }

    private func toBuildStep(domainType: Int8) -> BuildStepType {
        switch domainType {
        case 0:
            return .main
        case 1:
            return .target
        case 2:
            return .detail
        default:
            return .detail
        }
    }

    /// In CLI logs, the target name is enclosed in a string like
    /// === BUILD TARGET TargetName OF PROJECT ProjectName WITH CONFIGURATION config ===
    /// This function extracts the target name of it.
    private func getTargetName(_ text: String) -> String {
        guard let targetRegexp = targetRegexp else {
            return text
        }
        let range = NSRange(location: 0, length: text.count)
        let matches = targetRegexp.matches(in: text, options: .reportCompletion, range: range)
        guard let match = matches.first, match.numberOfRanges == 3 else {
            return text
        }
        return "Target \(text.substring(match.range(at: 2)))"
    }

    private func parseArchitectureFromLogSection(_ logSection: IDEActivityLogSection,
                                                 andType type: DetailStepType) -> String {
        guard let clangArchRegexp = clangArchRegexp, let swiftcArchRegexp = swiftcArchRegexp else {
            return ""
        }
        switch type {
        case .cCompilation:
            return parseArchitectureFromCommand(command: logSection.signature, regexp: clangArchRegexp)
        case .swiftCompilation:
            return parseArchitectureFromCommand(command: logSection.signature, regexp: swiftcArchRegexp)
        default:
            return ""
        }
    }

    private func parseArchitectureFromCommand(command: String, regexp: NSRegularExpression) -> String {
        let range = NSRange(location: 0, length: command.count)
        let matches = regexp.matches(in: command, options: .reportCompletion, range: range)
        guard let match = matches.first else {
            return ""
        }
        return command.substring(match.range(at: 1))
    }

    private func parseWarningsAndErrorsFromLogSection(_ logSection: IDEActivityLogSection, forType type: DetailStepType)
        -> [String: [Notice]]? {
        let notices = Notice.parseFromLogSection(logSection, forType: type)
        return ["warnings": notices.getWarnings(),
                "errors": notices.getErrors(),
                "notes": notices.getNotes()]
    }

    private func decorateWithSwiftcTimes(_ mainStep: BuildStep) -> BuildStep {
        swiftCompilerParser.parse()
        guard swiftCompilerParser.hasFunctionTimes() || swiftCompilerParser.hasTypeChecks() else {
            return mainStep
        }
        var mutableMainStep = mainStep
        mutableMainStep.subSteps = mainStep.subSteps.map { subStep -> BuildStep in
            var mutableTargetStep = subStep
            mutableTargetStep.subSteps = addSwiftcTimesSteps(mutableTargetStep.subSteps)
            return mutableTargetStep
        }
        return mutableMainStep
    }

    private func addSwiftcTimesSteps(_ subSteps: [BuildStep]) -> [BuildStep] {
        return subSteps.map { subStep -> BuildStep in
            switch subStep.detailStepType {
            case .swiftCompilation:
                var mutableSubStep = subStep
                if swiftCompilerParser.hasFunctionTimes() {
                    mutableSubStep.swiftFunctionTimes = swiftCompilerParser.findFunctionTimesForFilePath(
                    subStep.documentURL)
                }
                if swiftCompilerParser.hasTypeChecks() {
                    mutableSubStep.swiftTypeCheckTimes =
                        swiftCompilerParser.findTypeChecksForFilePath(subStep.documentURL)
                }
                if mutableSubStep.subSteps.count > 0 {
                     mutableSubStep.subSteps = addSwiftcTimesSteps(subStep.subSteps)
                }
                return mutableSubStep
            case .swiftAggregatedCompilation:
                var mutableSubStep = subStep
                mutableSubStep.subSteps = addSwiftcTimesSteps(subStep.subSteps)
                return mutableSubStep
            default:
                return subStep
            }
        }
    }

    private func wasFetchedFromCache(parent: BuildStep?, section: IDEActivityLogSection) -> Bool {
        if section.wasFetchedFromCache {
            return section.wasFetchedFromCache
        }
        return parent?.fetchedFromCache ?? false
    }

    func addCompilationTimes(step: BuildStep) -> BuildStep {
        switch step.type {
        case .detail:
            return step.with(newCompilationEndTimestamp: step.endTimestamp,
                             andCompilationDuration: step.duration)
        case .target:
            return addCompilationTimesToTarget(step)
        case .main:
            return addCompilationTimesToApp(step)
        }
    }

    private func addCompilationTimesToTarget(_ target: BuildStep) -> BuildStep {

        let lastCompilationStep = target.subSteps
            .filter { $0.isCompilationStep() && $0.fetchedFromCache == false }
            .max { $0.compilationEndTimestamp < $1.compilationEndTimestamp }
        guard let lastStep = lastCompilationStep else {
            return target.with(newCompilationEndTimestamp: target.startTimestamp, andCompilationDuration: 0.0)
        }
        return target.with(newCompilationEndTimestamp: lastStep.compilationEndTimestamp,
                         andCompilationDuration: lastStep.compilationEndTimestamp - target.startTimestamp)
    }

    private func addCompilationTimesToApp(_ app: BuildStep) -> BuildStep {
        let lastCompilationStep = app.subSteps
            .filter { $0.compilationDuration > 0 && $0.fetchedFromCache == false }
            .max { $0.compilationEndTimestamp < $1.compilationEndTimestamp }
        guard let lastStep = lastCompilationStep else {
            return app.with(newCompilationEndTimestamp: app.startTimestamp,
                            andCompilationDuration: 0.0)
        }
        return app.with(newCompilationEndTimestamp: lastStep.compilationEndTimestamp,
                         andCompilationDuration: lastStep.compilationEndTimestamp - app.startTimestamp)
    }

}

{'repo_name': 'spotify/XCLogParser', 'stars': '702', 'repo_language': 'Swift', 'file_name': 'ActivityParserTests.swift', 'mime_type': 'text/plain', 'hash': 2927478860754215748, 'source_dataset': 'data'}


/* global console, LAMBDA */
(function() {
  "use strict";
    var L = LAMBDA;
    var A = L.absyn;
    var BetaRedex2 = {

	init: function () {
	    var e;
	    var redex, result;
	    var done = false;

	    if (L.getRnd(0,1) === 0 ) {
		// most likely not to need an alpha conversion (very rare)
		e = L.getRndExp(1,4,6,"xyzuvw","");
		while (L.countBetaRedexes(e) !== 1) {
		    e = L.getRndExp(1,4,6,"xyzuvw","");
		}
		redex = L.findLeftmostOutermostBetaRedex(e);
		LAMBDA.alpha = false;
		result = LAMBDA.substitute(
		    A.getAppExpArg(redex),
		    A.getLambdaAbsParam(A.getAppExpFn(redex)),
		    A.getLambdaAbsBody(A.getAppExpFn(redex))
		);

	    } else {
		// guarantee an alpha conversion
		while ( ! done ) {
		    e = L.getRndExp(1,4,6,"xyzuvw","");
		    while (L.countBetaRedexes(e) !== 1) {
			e = L.getRndExp(1,4,6,"xyzuvw","");
		    }
		    redex = L.findLeftmostOutermostBetaRedex(e);
		    LAMBDA.alpha = false;
		    result = LAMBDA.substitute(
		    A.getAppExpArg(redex),
			A.getLambdaAbsParam(A.getAppExpFn(redex)),
			A.getLambdaAbsBody(A.getAppExpFn(redex))
		    );
		    if (LAMBDA.alpha) {
			done = true;
		    }
		}// loop on finding an alpha-conversion
	    }// guaranteed alpha conversion

	    this.answer = LAMBDA.alpha ? "True" : "False";
	    this.expression = L.printExp(e).replace(/\s/g,"  "); // increase spacing

	    // print reduced redex only
	    //console.log(LAMBDA.alpha + " " + L.printExp(result));
	} // init function

    };// RP16part1

    window.BetaRedex2 = window.BetaRedex2 || BetaRedex2;

}());

{'repo_name': 'OpenDSA/OpenDSA', 'stars': '154', 'repo_language': 'JavaScript', 'file_name': 'Gradebook.rst', 'mime_type': 'text/plain', 'hash': 7205968333665120167, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>whatsmars-spring-boot-samples</artifactId>
        <groupId>org.hongxi</groupId>
        <version>Rocket.S9</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>whatsmars-boot-sample-redis</artifactId>
    <name>${project.artifactId}</name>
    <packaging>jar</packaging>
    <description>Spring Boot Redis Sample</description>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
        </dependency>
    </dependencies>

</project>

{'repo_name': 'javahongxi/whatsmars', 'stars': '1113', 'repo_language': 'Java', 'file_name': 'OrderItem.java', 'mime_type': 'text/plain', 'hash': -5034995333512621949, 'source_dataset': 'data'}


---
features:
  - When using Glance and NFS the NFS mount point will now be managed using a
    systemd mount unit file. This change ensures the deployment of glance is not
    making potentially system impacting changes to the ``/etc/fstab`` and
    modernizes how we deploy glance when using shared storage.
  - New variables have been added to the glance role allowing a deployer to set
    the UID and GID of the glance user. The new options are,
    ``glance_system_user_uid`` and ``glance_system_group_uid``. These options
    are useful when deploying glance with shared storage as the back-end for
    images and will only set the UID and GID of the glance user when defined.

{'repo_name': 'openstack/openstack-ansible', 'stars': '1172', 'repo_language': 'Python', 'file_name': 'minor-upgrades.rst', 'mime_type': 'text/plain', 'hash': 2944845265197103605, 'source_dataset': 'data'}


/*
 * Copyright Red Hat Inc. and/or its affiliates and other contributors
 * as indicated by the authors tag. All rights reserved.
 *
 * This copyrighted material is made available to anyone wishing to use,
 * modify, copy, or redistribute it subject to the terms and conditions
 * of the GNU General Public License version 2.
 *
 * This particular file is subject to the "Classpath" exception as provided in the
 * LICENSE file that accompanied this code.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT A
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE.  See the GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License,
 * along with this distribution; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA  02110-1301, USA.
 */
@noanno
interface InterfaceAliasedFormalMemberClass {
    shared formal class Member() {
    }
    shared void m1(InterfaceAliasedFormalMemberClass qual) {
        Member{};
        Member();
        this.Member{};
        this.Member();
        qual.Member{};
        qual.Member();
    }
}
@noanno
class InterfaceAliasedFormalMemberClass_sub() satisfies InterfaceAliasedFormalMemberClass {
    shared class Alias() => super.Member();
    shared actual class Member() extends Alias() {
    }
    shared void m2(InterfaceAliasedFormalMemberClass_sub qual) {
        Member{};
        Member();
        this.Member{};
        this.Member();
        qual.Member{};
        qual.Member();
        Alias{};
        Alias();
        this.Alias{};
        this.Alias();
        qual.Alias{};
        qual.Alias();
    }
}

{'repo_name': 'ceylon/ceylon-compiler', 'stars': '142', 'repo_language': 'Java', 'file_name': 'optimizations.md', 'mime_type': 'text/plain', 'hash': -8224837664068211970, 'source_dataset': 'data'}


/**
 * Copyright (c) 2001-2020 Mathew A. Nelson and Robocode contributors
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * https://robocode.sourceforge.io/license/epl-v10.html
 */
package robocode;

import robocode.robotinterfaces.peer.IAdvancedRobotPeer;

/**
 * This class is used by the system as a placeholder for all *Radians calls in
 * {@link AdvancedRobot}. You may refer to this class for documentation only.
 *

 * You should create a {@link AdvancedRobot} instead.
 *

 * (The Radians methods themselves will continue work, however).
 *
 * @see Robot
 * @see JuniorRobot
 * @see AdvancedRobot
 * @see TeamRobot
 * @see RateControlRobot
 *
 * @author Mathew A. Nelson (original)
 * @author Flemming N. Larsen (contributor)
 * @author Pavel Savara (contributor)
 */
public class _AdvancedRadiansRobot extends _AdvancedRobot {

	_AdvancedRadiansRobot() {}

	public double getHeadingRadians() {
		if (peer != null) {
			return peer.getBodyHeading();
		}
		uninitializedException();
		return 0; // never called
	}

	public void setTurnLeftRadians(double radians) {
		if (peer != null) {
			((IAdvancedRobotPeer) peer).setTurnBody(-radians);
		} else {
			uninitializedException();
		}
	}

	public void setTurnRightRadians(double radians) {
		if (peer != null) {
			((IAdvancedRobotPeer) peer).setTurnBody(radians);
		} else {
			uninitializedException();
		}
	}

	public void turnLeftRadians(double radians) {
		if (peer != null) {
			peer.turnBody(-radians);
		} else {
			uninitializedException();
		}
	}

	public void turnRightRadians(double radians) {
		if (peer != null) {
			peer.turnBody(radians);
		} else {
			uninitializedException();
		}
	}

	public double getGunHeadingRadians() {
		if (peer != null) {
			return peer.getGunHeading();
		}
		uninitializedException();
		return 0; // never called
	}

	public double getRadarHeadingRadians() {
		if (peer != null) {
			return peer.getRadarHeading();
		}
		uninitializedException();
		return 0; // never called
	}

	public void setTurnGunLeftRadians(double radians) {
		if (peer != null) {
			((IAdvancedRobotPeer) peer).setTurnGun(-radians);
		} else {
			uninitializedException();
		}
	}

	public void setTurnGunRightRadians(double radians) {
		if (peer != null) {
			((IAdvancedRobotPeer) peer).setTurnGun(radians);
		} else {
			uninitializedException();
		}
	}

	public void setTurnRadarLeftRadians(double radians) {
		if (peer != null) {
			((IAdvancedRobotPeer) peer).setTurnRadar(-radians);
		} else {
			uninitializedException();
		}
	}

	public void setTurnRadarRightRadians(double radians) {
		if (peer != null) {
			((IAdvancedRobotPeer) peer).setTurnRadar(radians);
		} else {
			uninitializedException();
		}
	}

	public void turnGunLeftRadians(double radians) {
		if (peer != null) {
			peer.turnGun(-radians);
		} else {
			uninitializedException();
		}
	}

	public void turnGunRightRadians(double radians) {
		if (peer != null) {
			peer.turnGun(radians);
		} else {
			uninitializedException();
		}
	}

	public void turnRadarLeftRadians(double radians) {
		if (peer != null) {
			((IAdvancedRobotPeer) peer).turnRadar(-radians);
		} else {
			uninitializedException();
		}
	}

	public void turnRadarRightRadians(double radians) {
		if (peer != null) {
			((IAdvancedRobotPeer) peer).turnRadar(radians);
		} else {
			uninitializedException();
		}
	}

	public double getGunTurnRemainingRadians() {
		if (peer != null) {
			return peer.getGunTurnRemaining();
		}
		uninitializedException();
		return 0; // never called
	}

	public double getRadarTurnRemainingRadians() {
		if (peer != null) {
			return peer.getRadarTurnRemaining();
		}
		uninitializedException();
		return 0; // never called
	}

	public double getTurnRemainingRadians() {
		if (peer != null) {
			return peer.getBodyTurnRemaining();
		}
		uninitializedException();
		return 0; // never called
	}
}

{'repo_name': 'robo-code/robocode', 'stars': '458', 'repo_language': 'Java', 'file_name': 'org.eclipse.jdt.core.prefs', 'mime_type': 'text/plain', 'hash': -1959482843571440750, 'source_dataset': 'data'}


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

package com.uber.rib.root.logged_in;

import android.view.ViewGroup;
import com.uber.rib.core.Router;
import com.uber.rib.core.ViewRouter;
import com.uber.rib.root.logged_in.off_game.OffGameBuilder;
import com.uber.rib.root.logged_in.off_game.OffGameRouter;
import com.uber.rib.root.logged_in.tic_tac_toe.TicTacToeBuilder;

/**
 * Adds and removes children of {@link LoggedInBuilder.LoggedInScope}.
 */
public class LoggedInRouter
    extends Router<LoggedInInteractor, LoggedInBuilder.Component> {

  private final ViewGroup parentView;
  private final OffGameBuilder offGameBuilder;
  private final TicTacToeBuilder ticTacToeBuilder;
  private OffGameRouter offGameRouter;
  private ViewRouter gameRouter;

  LoggedInRouter(
      LoggedInInteractor interactor,
      LoggedInBuilder.Component component,
      ViewGroup parentView,
      OffGameBuilder offGameBuilder,
      TicTacToeBuilder ticTacToeBuilder) {
    super(interactor, component);
    this.parentView = parentView;
    this.offGameBuilder = offGameBuilder;
    this.ticTacToeBuilder = ticTacToeBuilder;
  }

  @Override
  protected void willDetach() {
    super.willDetach();
    detachOffGame();
    detachGame();
  }

  void attachOffGame() {
    offGameRouter = offGameBuilder.build(parentView);
    attachChild(offGameRouter);
    parentView.addView(offGameRouter.getView());
  }

  void detachOffGame() {
    if (offGameRouter != null) {
      detachChild(offGameRouter);
      parentView.removeView(offGameRouter.getView());
      offGameRouter = null;
    }
  }

  void attachGame(GameProvider gameProvider) {
    gameRouter = gameProvider.viewRouter(parentView);
    parentView.addView(gameRouter.getView());
    attachChild(gameRouter);
  }

  void detachGame() {
    if (gameRouter != null) {
      detachChild(gameRouter);
      parentView.removeView(gameRouter.getView());
      gameRouter = null;
    }
  }
}

{'repo_name': 'uber/RIBs', 'stars': '5658', 'repo_language': 'Java', 'file_name': 'TicTacToeInteractor.swift', 'mime_type': 'text/x-c', 'hash': -843770602365070508, 'source_dataset': 'data'}


//
//     Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun  9 2015 22:53:21).
//
//     class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard.
//

#import <AppKit/NSBox.h>

@interface SFCSRDragDropBox : NSBox
{
    BOOL _caHighlighted;
}

- (BOOL)performDragOperation:(id)arg1;
- (void)_doSheet:(id)arg1;
- (void)drawRect:(struct CGRect)arg1;
- (void)draggingExited:(id)arg1;
- (void)concludeDragOperation:(id)arg1;
- (void)setHighlighted:(BOOL)arg1;
- (BOOL)prepareForDragOperation:(id)arg1;
- (unsigned long long)draggingUpdated:(id)arg1;
- (unsigned long long)draggingEntered:(id)arg1;

@end

{'repo_name': 'w0lfschild/macOS_headers', 'stars': '304', 'repo_language': 'None', 'file_name': 'NSTextFinderBarContainer-Protocol.h', 'mime_type': 'text/x-objective-c', 'hash': -3042702237000860685, 'source_dataset': 'data'}


/*
 *  This file is part of the Jikes RVM project (http://jikesrvm.org).
 *
 *  This file is licensed to You under the Eclipse Public License (EPL);
 *  You may not use this file except in compliance with the License. You
 *  may obtain a copy of the License at
 *
 *      http://www.opensource.org/licenses/eclipse-1.0.php
 *
 *  See the COPYRIGHT.txt file distributed with this work for information
 *  regarding copyright ownership.
 */
package org.mmtk.harness.lang.ast;

import org.mmtk.harness.lang.Visitor;
import org.mmtk.harness.lang.parser.Token;
import org.mmtk.harness.lang.runtime.Value;

public class Constant extends AbstractAST implements Expression {

  public final Value value;

  /** A constant with no program location (e.g. for default values) */
  public Constant(Value value) {
    super(0,0);
    this.value = value;
    assert value != null;
  }

  public Constant(Token t, Value value) {
    super(t);
    this.value = value;
    assert value != null;
  }

  @Override
  public Object accept(Visitor v) {
    return v.visit(this);
  }

}

{'repo_name': 'JikesRVM/JikesRVM', 'stars': '246', 'repo_language': 'Java', 'file_name': 'PPC_Mem32.rules', 'mime_type': 'text/plain', 'hash': 7247734783200589745, 'source_dataset': 'data'}


[package]
name = "query_params"
version = "0.0.0"
workspace = "../../"
edition = "2018"
publish = false

[dependencies]
rocket = { path = "../../core/lib" }

{'repo_name': 'SergioBenitez/Rocket', 'stars': '10538', 'repo_language': 'Rust', 'file_name': 'responder-types.stderr', 'mime_type': 'text/plain', 'hash': 5816458629542586307, 'source_dataset': 'data'}


/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef __nsSiteSecurityService_h__
#define __nsSiteSecurityService_h__

#include "mozilla/DataStorage.h"
#include "nsCOMPtr.h"
#include "nsIObserver.h"
#include "nsISiteSecurityService.h"
#include "nsString.h"
#include "nsTArray.h"
#include "pkix/pkixtypes.h"
#include "prtime.h"

class nsIURI;

// {16955eee-6c48-4152-9309-c42a465138a1}
#define NS_SITE_SECURITY_SERVICE_CID \
  {0x16955eee, 0x6c48, 0x4152, \
    {0x93, 0x09, 0xc4, 0x2a, 0x46, 0x51, 0x38, 0xa1} }

/**
 * SecurityPropertyState: A utility enum for representing the different states
 * a security property can be in.
 * SecurityPropertySet and SecurityPropertyUnset correspond to indicating
 * a site has or does not have the security property in question, respectively.
 * SecurityPropertyKnockout indicates a value on a preloaded list is being
 * overridden, and the associated site does not have the security property
 * in question.
 */
enum SecurityPropertyState {
  SecurityPropertyUnset = 0,
  SecurityPropertySet = 1,
  SecurityPropertyKnockout = 2
};

/**
 * SiteHPKPState: A utility class that encodes/decodes a string describing
 * the public key pins of a site.
 * HPKP state consists of:
 *  - Expiry time (PRTime (aka int64_t) in milliseconds)
 *  - A state flag (SecurityPropertyState, default SecurityPropertyUnset)
 *  - An include subdomains flag (bool, default false)
 *  - An array of sha-256 hashed base 64 encoded fingerprints of required keys
 */
class SiteHPKPState
{
public:
  SiteHPKPState();
  SiteHPKPState(nsCString& aStateString);
  SiteHPKPState(PRTime aExpireTime, SecurityPropertyState aState,
                bool aIncludeSubdomains, nsTArray<nsCString>& SHA256keys);

  PRTime mExpireTime;
  SecurityPropertyState mState;
  bool mIncludeSubdomains;
  nsTArray<nsCString> mSHA256keys;

  bool IsExpired(mozilla::pkix::Time aTime)
  {
    if (aTime > mozilla::pkix::TimeFromEpochInSeconds(mExpireTime /
                                                      PR_MSEC_PER_SEC)) {
      return true;
    }
    return false;
  }

  void ToString(nsCString& aString);
};

/**
 * SiteHSTSState: A utility class that encodes/decodes a string describing
 * the security state of a site. Currently only handles HSTS.
 * HSTS state consists of:
 *  - Expiry time (PRTime (aka int64_t) in milliseconds)
 *  - A state flag (SecurityPropertyState, default SecurityPropertyUnset)
 *  - An include subdomains flag (bool, default false)
 */
class SiteHSTSState
{
public:
  SiteHSTSState(nsCString& aStateString);
  SiteHSTSState(PRTime aHSTSExpireTime, SecurityPropertyState aHSTSState,
                bool aHSTSIncludeSubdomains);

  PRTime mHSTSExpireTime;
  SecurityPropertyState mHSTSState;
  bool mHSTSIncludeSubdomains;

  bool IsExpired(uint32_t aType)
  {
    // If mHSTSExpireTime is 0, this entry never expires (this is the case for
    // knockout entries).
    if (mHSTSExpireTime == 0) {
      return false;
    }

    PRTime now = PR_Now() / PR_USEC_PER_MSEC;
    if (now > mHSTSExpireTime) {
      return true;
    }

    return false;
  }

  void ToString(nsCString &aString);
};

class nsSTSPreload;

class nsSiteSecurityService : public nsISiteSecurityService
                            , public nsIObserver
{
public:
  NS_DECL_THREADSAFE_ISUPPORTS
  NS_DECL_NSIOBSERVER
  NS_DECL_NSISITESECURITYSERVICE

  nsSiteSecurityService();
  nsresult Init();

protected:
  virtual ~nsSiteSecurityService();

private:
  nsresult GetHost(nsIURI *aURI, nsACString &aResult);
  nsresult SetHSTSState(uint32_t aType, nsIURI* aSourceURI, int64_t maxage,
                        bool includeSubdomains, uint32_t flags);
  nsresult ProcessHeaderMutating(uint32_t aType, nsIURI* aSourceURI,
                                 char* aHeader, uint32_t flags,
                                 uint64_t *aMaxAge, bool *aIncludeSubdomains);
  const nsSTSPreload *GetPreloadListEntry(const char *aHost);

  bool mUsePreloadList;
  int64_t mPreloadListTimeOffset;
  nsRefPtr<mozilla::DataStorage> mSiteStateStorage;
};

#endif // __nsSiteSecurityService_h__

{'repo_name': 'ricardoquesada/Spidermonkey', 'stars': '201', 'repo_language': 'C++', 'file_name': 'panelUI.css', 'mime_type': 'text/plain', 'hash': 1618132650547170073, 'source_dataset': 'data'}


/*
Copyright (C) 2013-2015, Silent Circle, LLC. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Any redistribution, use, or modification is done solely for personal
      benefit and not for any commercial purpose or for monetary gain
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name Silent Circle nor the
      names of its contributors may be used to endorse or promote products
      derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL SILENT CIRCLE, LLC BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
//
//  NSDictionary+vCard.h
//  ST2
//
//  Created by Vinnie Moscaritolo on 11/18/13.
//

#import <Foundation/Foundation.h>

@interface NSDictionary (vCard)

/**
 * Todo:
 * What does this method return ?
 * What does the array contain ?
 * Is it an array of dictionaries ?
 * Where are the constants for the dictionary keys ?
**/
+ (NSArray *)peopleFromvCardData:(NSData *)vCardData;

@end

{'repo_name': 'SilentCircle/silent-text', 'stars': '142', 'repo_language': 'Objective-C', 'file_name': 'contents.xcworkspacedata', 'mime_type': 'text/xml', 'hash': -6543350490785197818, 'source_dataset': 'data'}


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

package android.net;

import static android.net.ConnectivityManager.TYPE_ETHERNET;
import static android.net.ConnectivityManager.TYPE_WIFI;
import static android.net.ConnectivityManager.TYPE_WIMAX;
import static android.net.NetworkIdentity.scrubSubscriberId;
import static android.telephony.TelephonyManager.NETWORK_CLASS_2_G;
import static android.telephony.TelephonyManager.NETWORK_CLASS_3_G;
import static android.telephony.TelephonyManager.NETWORK_CLASS_4_G;
import static android.telephony.TelephonyManager.NETWORK_CLASS_UNKNOWN;
import static android.telephony.TelephonyManager.getNetworkClass;
import static com.android.internal.util.ArrayUtils.contains;

import android.content.res.Resources;
import android.os.Parcel;
import android.os.Parcelable;

import com.android.internal.util.Objects;

/**
 * Template definition used to generically match {@link NetworkIdentity},
 * usually when collecting statistics.
 *
 * @hide
 */
public class NetworkTemplate implements Parcelable {

    /** {@hide} */
    public static final int MATCH_MOBILE_ALL = 1;
    /** {@hide} */
    public static final int MATCH_MOBILE_3G_LOWER = 2;
    /** {@hide} */
    public static final int MATCH_MOBILE_4G = 3;
    /** {@hide} */
    public static final int MATCH_WIFI = 4;
    /** {@hide} */
    public static final int MATCH_ETHERNET = 5;

    /**
     * Set of {@link NetworkInfo#getType()} that reflect data usage.
     */
    private static final int[] DATA_USAGE_NETWORK_TYPES;

    static {
        DATA_USAGE_NETWORK_TYPES = Resources.getSystem().getIntArray(
                com.android.internal.R.array.config_data_usage_network_types);
    }

    /**
     * Template to combine all {@link ConnectivityManager#TYPE_MOBILE} style
     * networks together. Only uses statistics for requested IMSI.
     */
    public static NetworkTemplate buildTemplateMobileAll(String subscriberId) {
        return new NetworkTemplate(MATCH_MOBILE_ALL, subscriberId);
    }

    /**
     * Template to combine all {@link ConnectivityManager#TYPE_MOBILE} style
     * networks together that roughly meet a "3G" definition, or lower. Only
     * uses statistics for requested IMSI.
     */
    public static NetworkTemplate buildTemplateMobile3gLower(String subscriberId) {
        return new NetworkTemplate(MATCH_MOBILE_3G_LOWER, subscriberId);
    }

    /**
     * Template to combine all {@link ConnectivityManager#TYPE_MOBILE} style
     * networks together that meet a "4G" definition. Only uses statistics for
     * requested IMSI.
     */
    public static NetworkTemplate buildTemplateMobile4g(String subscriberId) {
        return new NetworkTemplate(MATCH_MOBILE_4G, subscriberId);
    }

    /**
     * Template to combine all {@link ConnectivityManager#TYPE_WIFI} style
     * networks together.
     */
    public static NetworkTemplate buildTemplateWifi() {
        return new NetworkTemplate(MATCH_WIFI, null);
    }

    /**
     * Template to combine all {@link ConnectivityManager#TYPE_ETHERNET} style
     * networks together.
     */
    public static NetworkTemplate buildTemplateEthernet() {
        return new NetworkTemplate(MATCH_ETHERNET, null);
    }

    private final int mMatchRule;
    private final String mSubscriberId;

    /** {@hide} */
    public NetworkTemplate(int matchRule, String subscriberId) {
        this.mMatchRule = matchRule;
        this.mSubscriberId = subscriberId;
    }

    private NetworkTemplate(Parcel in) {
        mMatchRule = in.readInt();
        mSubscriberId = in.readString();
    }

    /** {@inheritDoc} */
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(mMatchRule);
        dest.writeString(mSubscriberId);
    }

    /** {@inheritDoc} */
    public int describeContents() {
        return 0;
    }

    @Override
    public String toString() {
        final String scrubSubscriberId = scrubSubscriberId(mSubscriberId);
        return "NetworkTemplate: matchRule=" + getMatchRuleName(mMatchRule) + ", subscriberId="
                + scrubSubscriberId;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(mMatchRule, mSubscriberId);
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof NetworkTemplate) {
            final NetworkTemplate other = (NetworkTemplate) obj;
            return mMatchRule == other.mMatchRule
                    && Objects.equal(mSubscriberId, other.mSubscriberId);
        }
        return false;
    }

    /** {@hide} */
    public int getMatchRule() {
        return mMatchRule;
    }

    /** {@hide} */
    public String getSubscriberId() {
        return mSubscriberId;
    }

    /**
     * Test if given {@link NetworkIdentity} matches this template.
     */
    public boolean matches(NetworkIdentity ident) {
        switch (mMatchRule) {
            case MATCH_MOBILE_ALL:
                return matchesMobile(ident);
            case MATCH_MOBILE_3G_LOWER:
                return matchesMobile3gLower(ident);
            case MATCH_MOBILE_4G:
                return matchesMobile4g(ident);
            case MATCH_WIFI:
                return matchesWifi(ident);
            case MATCH_ETHERNET:
                return matchesEthernet(ident);
            default:
                throw new IllegalArgumentException("unknown network template");
        }
    }

    /**
     * Check if mobile network with matching IMSI.
     */
    private boolean matchesMobile(NetworkIdentity ident) {
        if (ident.mType == TYPE_WIMAX) {
            // TODO: consider matching against WiMAX subscriber identity
            return true;
        } else {
            return (contains(DATA_USAGE_NETWORK_TYPES, ident.mType)
                    && Objects.equal(mSubscriberId, ident.mSubscriberId));
        }
    }

    /**
     * Check if mobile network classified 3G or lower with matching IMSI.
     */
    private boolean matchesMobile3gLower(NetworkIdentity ident) {
        if (ident.mType == TYPE_WIMAX) {
            return false;
        } else if (matchesMobile(ident)) {
            switch (getNetworkClass(ident.mSubType)) {
                case NETWORK_CLASS_UNKNOWN:
                case NETWORK_CLASS_2_G:
                case NETWORK_CLASS_3_G:
                    return true;
            }
        }
        return false;
    }

    /**
     * Check if mobile network classified 4G with matching IMSI.
     */
    private boolean matchesMobile4g(NetworkIdentity ident) {
        if (ident.mType == TYPE_WIMAX) {
            // TODO: consider matching against WiMAX subscriber identity
            return true;
        } else if (matchesMobile(ident)) {
            switch (getNetworkClass(ident.mSubType)) {
                case NETWORK_CLASS_4_G:
                    return true;
            }
        }
        return false;
    }

    /**
     * Check if matches Wi-Fi network template.
     */
    private boolean matchesWifi(NetworkIdentity ident) {
        if (ident.mType == TYPE_WIFI) {
            return true;
        }
        return false;
    }

    /**
     * Check if matches Ethernet network template.
     */
    private boolean matchesEthernet(NetworkIdentity ident) {
        if (ident.mType == TYPE_ETHERNET) {
            return true;
        }
        return false;
    }

    private static String getMatchRuleName(int matchRule) {
        switch (matchRule) {
            case MATCH_MOBILE_3G_LOWER:
                return "MOBILE_3G_LOWER";
            case MATCH_MOBILE_4G:
                return "MOBILE_4G";
            case MATCH_MOBILE_ALL:
                return "MOBILE_ALL";
            case MATCH_WIFI:
                return "WIFI";
            case MATCH_ETHERNET:
                return "ETHERNET";
            default:
                return "UNKNOWN";
        }
    }

    public static final Creator<NetworkTemplate> CREATOR = new Creator<NetworkTemplate>() {
        public NetworkTemplate createFromParcel(Parcel in) {
            return new NetworkTemplate(in);
        }

        public NetworkTemplate[] newArray(int size) {
            return new NetworkTemplate[size];
        }
    };
}

{'repo_name': 'xamarin/XobotOS', 'stars': '1264', 'repo_language': 'Java', 'file_name': 'YesNoPreference.cs', 'mime_type': 'text/plain', 'hash': -213912587453717204, 'source_dataset': 'data'}


/* These values are copied from Chrome's .xtb files, this is so the same values are used in the |Accept-Language| header. Key name matches Chrome's. */
"IDS_ACCEPT_LANGUAGES" = "el-GR,el";

{'repo_name': 'crosswalk-project/chromium-crosswalk', 'stars': '146', 'repo_language': 'None', 'file_name': 'keyboard_utils.js', 'mime_type': 'text/plain', 'hash': 7219282771486835971, 'source_dataset': 'data'}


--- ioctl.h.orig	2009-02-15 13:46:49.000000000 +0100
+++ ioctl.h	2009-02-15 13:48:54.000000000 +0100
@@ -18,15 +18,23 @@

 #ifndef __IOCTL_
 #define __IOCTL_
+#ifndef __APPLE__
 #include <asm/types.h>
 #include <linux/ioctl.h>
+#endif
+
+#include <stdint.h>

 #define BTRFS_IOCTL_MAGIC 0x94
 #define BTRFS_VOL_NAME_MAX 255
 #define BTRFS_PATH_NAME_MAX 4087

 struct btrfs_ioctl_vol_args {
+#ifdef __APPLE__
+	int64_t fd;
+#else
 	__s64 fd;
+#endif
 	char name[BTRFS_PATH_NAME_MAX + 1];
 };

{'repo_name': 'macports/macports-ports', 'stars': '752', 'repo_language': 'Tcl', 'file_name': 'exo-mmintrin.diff', 'mime_type': 'text/x-diff', 'hash': -7233138641440865124, 'source_dataset': 'data'}


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleExecutable</key>
	<string>$(EXECUTABLE_NAME)</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>$(PRODUCT_NAME)</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIMainStoryboardFile</key>
	<string>Main</string>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>armv7</string>
	</array>
	<key>UIStatusBarHidden</key>
	<true/>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>
		<string>UIInterfaceOrientationPortraitUpsideDown</string>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
</dict>
</plist>

{'repo_name': 'ScottLogic/iOS9-day-by-day', 'stars': '1433', 'repo_language': 'Swift', 'file_name': 'contents.xcworkspacedata', 'mime_type': 'text/xml', 'hash': 7079233795880983669, 'source_dataset': 'data'}


// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build go1.8

package http2

import (
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"reflect"
	"strconv"
	"sync"
	"testing"
	"time"
)

func TestServer_Push_Success(t *testing.T) {
	const (
		mainBody   = "index page"
		pushedBody = "pushed page"
		userAgent  = "testagent"
		cookie     = "testcookie"
	)

	var stURL string
	checkPromisedReq := func(r *http.Request, wantMethod string, wantH http.Header) error {
		if got, want := r.Method, wantMethod; got != want {
			return fmt.Errorf("promised Req.Method=%q, want %q", got, want)
		}
		if got, want := r.Header, wantH; !reflect.DeepEqual(got, want) {
			return fmt.Errorf("promised Req.Header=%q, want %q", got, want)
		}
		if got, want := "https://"+r.Host, stURL; got != want {
			return fmt.Errorf("promised Req.Host=%q, want %q", got, want)
		}
		if r.Body == nil {
			return fmt.Errorf("nil Body")
		}
		if buf, err := ioutil.ReadAll(r.Body); err != nil || len(buf) != 0 {
			return fmt.Errorf("ReadAll(Body)=%q,%v, want '',nil", buf, err)
		}
		return nil
	}

	errc := make(chan error, 3)
	st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
		switch r.URL.RequestURI() {
		case "/":
			// Push "/pushed?get" as a GET request, using an absolute URL.
			opt := &http.PushOptions{
				Header: http.Header{
					"User-Agent": {userAgent},
				},
			}
			if err := w.(http.Pusher).Push(stURL+"/pushed?get", opt); err != nil {
				errc <- fmt.Errorf("error pushing /pushed?get: %v", err)
				return
			}
			// Push "/pushed?head" as a HEAD request, using a path.
			opt = &http.PushOptions{
				Method: "HEAD",
				Header: http.Header{
					"User-Agent": {userAgent},
					"Cookie":     {cookie},
				},
			}
			if err := w.(http.Pusher).Push("/pushed?head", opt); err != nil {
				errc <- fmt.Errorf("error pushing /pushed?head: %v", err)
				return
			}
			w.Header().Set("Content-Type", "text/html")
			w.Header().Set("Content-Length", strconv.Itoa(len(mainBody)))
			w.WriteHeader(200)
			io.WriteString(w, mainBody)
			errc <- nil

		case "/pushed?get":
			wantH := http.Header{}
			wantH.Set("User-Agent", userAgent)
			if err := checkPromisedReq(r, "GET", wantH); err != nil {
				errc <- fmt.Errorf("/pushed?get: %v", err)
				return
			}
			w.Header().Set("Content-Type", "text/html")
			w.Header().Set("Content-Length", strconv.Itoa(len(pushedBody)))
			w.WriteHeader(200)
			io.WriteString(w, pushedBody)
			errc <- nil

		case "/pushed?head":
			wantH := http.Header{}
			wantH.Set("User-Agent", userAgent)
			wantH.Set("Cookie", cookie)
			if err := checkPromisedReq(r, "HEAD", wantH); err != nil {
				errc <- fmt.Errorf("/pushed?head: %v", err)
				return
			}
			w.WriteHeader(204)
			errc <- nil

		default:
			errc <- fmt.Errorf("unknown RequestURL %q", r.URL.RequestURI())
		}
	})
	stURL = st.ts.URL

	// Send one request, which should push two responses.
	st.greet()
	getSlash(st)
	for k := 0; k < 3; k++ {
		select {
		case <-time.After(2 * time.Second):
			t.Errorf("timeout waiting for handler %d to finish", k)
		case err := <-errc:
			if err != nil {
				t.Fatal(err)
			}
		}
	}

	checkPushPromise := func(f Frame, promiseID uint32, wantH [][2]string) error {
		pp, ok := f.(*PushPromiseFrame)
		if !ok {
			return fmt.Errorf("got a %T; want *PushPromiseFrame", f)
		}
		if !pp.HeadersEnded() {
			return fmt.Errorf("want END_HEADERS flag in PushPromiseFrame")
		}
		if got, want := pp.PromiseID, promiseID; got != want {
			return fmt.Errorf("got PromiseID %v; want %v", got, want)
		}
		gotH := st.decodeHeader(pp.HeaderBlockFragment())
		if !reflect.DeepEqual(gotH, wantH) {
			return fmt.Errorf("got promised headers %v; want %v", gotH, wantH)
		}
		return nil
	}
	checkHeaders := func(f Frame, wantH [][2]string) error {
		hf, ok := f.(*HeadersFrame)
		if !ok {
			return fmt.Errorf("got a %T; want *HeadersFrame", f)
		}
		gotH := st.decodeHeader(hf.HeaderBlockFragment())
		if !reflect.DeepEqual(gotH, wantH) {
			return fmt.Errorf("got response headers %v; want %v", gotH, wantH)
		}
		return nil
	}
	checkData := func(f Frame, wantData string) error {
		df, ok := f.(*DataFrame)
		if !ok {
			return fmt.Errorf("got a %T; want *DataFrame", f)
		}
		if gotData := string(df.Data()); gotData != wantData {
			return fmt.Errorf("got response data %q; want %q", gotData, wantData)
		}
		return nil
	}

	// Stream 1 has 2 PUSH_PROMISE + HEADERS + DATA
	// Stream 2 has HEADERS + DATA
	// Stream 4 has HEADERS
	expected := map[uint32][]func(Frame) error{
		1: {
			func(f Frame) error {
				return checkPushPromise(f, 2, [][2]string{
					{":method", "GET"},
					{":scheme", "https"},
					{":authority", st.ts.Listener.Addr().String()},
					{":path", "/pushed?get"},
					{"user-agent", userAgent},
				})
			},
			func(f Frame) error {
				return checkPushPromise(f, 4, [][2]string{
					{":method", "HEAD"},
					{":scheme", "https"},
					{":authority", st.ts.Listener.Addr().String()},
					{":path", "/pushed?head"},
					{"cookie", cookie},
					{"user-agent", userAgent},
				})
			},
			func(f Frame) error {
				return checkHeaders(f, [][2]string{
					{":status", "200"},
					{"content-type", "text/html"},
					{"content-length", strconv.Itoa(len(mainBody))},
				})
			},
			func(f Frame) error {
				return checkData(f, mainBody)
			},
		},
		2: {
			func(f Frame) error {
				return checkHeaders(f, [][2]string{
					{":status", "200"},
					{"content-type", "text/html"},
					{"content-length", strconv.Itoa(len(pushedBody))},
				})
			},
			func(f Frame) error {
				return checkData(f, pushedBody)
			},
		},
		4: {
			func(f Frame) error {
				return checkHeaders(f, [][2]string{
					{":status", "204"},
				})
			},
		},
	}

	consumed := map[uint32]int{}
	for k := 0; len(expected) > 0; k++ {
		f, err := st.readFrame()
		if err != nil {
			for id, left := range expected {
				t.Errorf("stream %d: missing %d frames", id, len(left))
			}
			t.Fatalf("readFrame %d: %v", k, err)
		}
		id := f.Header().StreamID
		label := fmt.Sprintf("stream %d, frame %d", id, consumed[id])
		if len(expected[id]) == 0 {
			t.Fatalf("%s: unexpected frame %#+v", label, f)
		}
		check := expected[id][0]
		expected[id] = expected[id][1:]
		if len(expected[id]) == 0 {
			delete(expected, id)
		}
		if err := check(f); err != nil {
			t.Fatalf("%s: %v", label, err)
		}
		consumed[id]++
	}
}

func TestServer_Push_SuccessNoRace(t *testing.T) {
	// Regression test for issue #18326. Ensure the request handler can mutate
	// pushed request headers without racing with the PUSH_PROMISE write.
	errc := make(chan error, 2)
	st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
		switch r.URL.RequestURI() {
		case "/":
			opt := &http.PushOptions{
				Header: http.Header{"User-Agent": {"testagent"}},
			}
			if err := w.(http.Pusher).Push("/pushed", opt); err != nil {
				errc <- fmt.Errorf("error pushing: %v", err)
				return
			}
			w.WriteHeader(200)
			errc <- nil

		case "/pushed":
			// Update request header, ensure there is no race.
			r.Header.Set("User-Agent", "newagent")
			r.Header.Set("Cookie", "cookie")
			w.WriteHeader(200)
			errc <- nil

		default:
			errc <- fmt.Errorf("unknown RequestURL %q", r.URL.RequestURI())
		}
	})

	// Send one request, which should push one response.
	st.greet()
	getSlash(st)
	for k := 0; k < 2; k++ {
		select {
		case <-time.After(2 * time.Second):
			t.Errorf("timeout waiting for handler %d to finish", k)
		case err := <-errc:
			if err != nil {
				t.Fatal(err)
			}
		}
	}
}

func TestServer_Push_RejectRecursivePush(t *testing.T) {
	// Expect two requests, but might get three if there's a bug and the second push succeeds.
	errc := make(chan error, 3)
	handler := func(w http.ResponseWriter, r *http.Request) error {
		baseURL := "https://" + r.Host
		switch r.URL.Path {
		case "/":
			if err := w.(http.Pusher).Push(baseURL+"/push1", nil); err != nil {
				return fmt.Errorf("first Push()=%v, want nil", err)
			}
			return nil

		case "/push1":
			if got, want := w.(http.Pusher).Push(baseURL+"/push2", nil), ErrRecursivePush; got != want {
				return fmt.Errorf("Push()=%v, want %v", got, want)
			}
			return nil

		default:
			return fmt.Errorf("unexpected path: %q", r.URL.Path)
		}
	}
	st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
		errc <- handler(w, r)
	})
	defer st.Close()
	st.greet()
	getSlash(st)
	if err := <-errc; err != nil {
		t.Errorf("First request failed: %v", err)
	}
	if err := <-errc; err != nil {
		t.Errorf("Second request failed: %v", err)
	}
}

func testServer_Push_RejectSingleRequest(t *testing.T, doPush func(http.Pusher, *http.Request) error, settings ...Setting) {
	// Expect one request, but might get two if there's a bug and the push succeeds.
	errc := make(chan error, 2)
	st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
		errc <- doPush(w.(http.Pusher), r)
	})
	defer st.Close()
	st.greet()
	if err := st.fr.WriteSettings(settings...); err != nil {
		st.t.Fatalf("WriteSettings: %v", err)
	}
	st.wantSettingsAck()
	getSlash(st)
	if err := <-errc; err != nil {
		t.Error(err)
	}
	// Should not get a PUSH_PROMISE frame.
	hf := st.wantHeaders()
	if !hf.StreamEnded() {
		t.Error("stream should end after headers")
	}
}

func TestServer_Push_RejectIfDisabled(t *testing.T) {
	testServer_Push_RejectSingleRequest(t,
		func(p http.Pusher, r *http.Request) error {
			if got, want := p.Push("https://"+r.Host+"/pushed", nil), http.ErrNotSupported; got != want {
				return fmt.Errorf("Push()=%v, want %v", got, want)
			}
			return nil
		},
		Setting{SettingEnablePush, 0})
}

func TestServer_Push_RejectWhenNoConcurrentStreams(t *testing.T) {
	testServer_Push_RejectSingleRequest(t,
		func(p http.Pusher, r *http.Request) error {
			if got, want := p.Push("https://"+r.Host+"/pushed", nil), ErrPushLimitReached; got != want {
				return fmt.Errorf("Push()=%v, want %v", got, want)
			}
			return nil
		},
		Setting{SettingMaxConcurrentStreams, 0})
}

func TestServer_Push_RejectWrongScheme(t *testing.T) {
	testServer_Push_RejectSingleRequest(t,
		func(p http.Pusher, r *http.Request) error {
			if err := p.Push("http://"+r.Host+"/pushed", nil); err == nil {
				return errors.New("Push() should have failed (push target URL is http)")
			}
			return nil
		})
}

func TestServer_Push_RejectMissingHost(t *testing.T) {
	testServer_Push_RejectSingleRequest(t,
		func(p http.Pusher, r *http.Request) error {
			if err := p.Push("https:pushed", nil); err == nil {
				return errors.New("Push() should have failed (push target URL missing host)")
			}
			return nil
		})
}

func TestServer_Push_RejectRelativePath(t *testing.T) {
	testServer_Push_RejectSingleRequest(t,
		func(p http.Pusher, r *http.Request) error {
			if err := p.Push("../test", nil); err == nil {
				return errors.New("Push() should have failed (push target is a relative path)")
			}
			return nil
		})
}

func TestServer_Push_RejectForbiddenMethod(t *testing.T) {
	testServer_Push_RejectSingleRequest(t,
		func(p http.Pusher, r *http.Request) error {
			if err := p.Push("https://"+r.Host+"/pushed", &http.PushOptions{Method: "POST"}); err == nil {
				return errors.New("Push() should have failed (cannot promise a POST)")
			}
			return nil
		})
}

func TestServer_Push_RejectForbiddenHeader(t *testing.T) {
	testServer_Push_RejectSingleRequest(t,
		func(p http.Pusher, r *http.Request) error {
			header := http.Header{
				"Content-Length":   {"10"},
				"Content-Encoding": {"gzip"},
				"Trailer":          {"Foo"},
				"Te":               {"trailers"},
				"Host":             {"test.com"},
				":authority":       {"test.com"},
			}
			if err := p.Push("https://"+r.Host+"/pushed", &http.PushOptions{Header: header}); err == nil {
				return errors.New("Push() should have failed (forbidden headers)")
			}
			return nil
		})
}

func TestServer_Push_StateTransitions(t *testing.T) {
	const body = "foo"

	gotPromise := make(chan bool)
	finishedPush := make(chan bool)

	st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
		switch r.URL.RequestURI() {
		case "/":
			if err := w.(http.Pusher).Push("/pushed", nil); err != nil {
				t.Errorf("Push error: %v", err)
			}
			// Don't finish this request until the push finishes so we don't
			// nondeterministically interleave output frames with the push.
			<-finishedPush
		case "/pushed":
			<-gotPromise
		}
		w.Header().Set("Content-Type", "text/html")
		w.Header().Set("Content-Length", strconv.Itoa(len(body)))
		w.WriteHeader(200)
		io.WriteString(w, body)
	})
	defer st.Close()

	st.greet()
	if st.stream(2) != nil {
		t.Fatal("stream 2 should be empty")
	}
	if got, want := st.streamState(2), stateIdle; got != want {
		t.Fatalf("streamState(2)=%v, want %v", got, want)
	}
	getSlash(st)
	// After the PUSH_PROMISE is sent, the stream should be stateHalfClosedRemote.
	st.wantPushPromise()
	if got, want := st.streamState(2), stateHalfClosedRemote; got != want {
		t.Fatalf("streamState(2)=%v, want %v", got, want)
	}
	// We stall the HTTP handler for "/pushed" until the above check. If we don't
	// stall the handler, then the handler might write HEADERS and DATA and finish
	// the stream before we check st.streamState(2) -- should that happen, we'll
	// see stateClosed and fail the above check.
	close(gotPromise)
	st.wantHeaders()
	if df := st.wantData(); !df.StreamEnded() {
		t.Fatal("expected END_STREAM flag on DATA")
	}
	if got, want := st.streamState(2), stateClosed; got != want {
		t.Fatalf("streamState(2)=%v, want %v", got, want)
	}
	close(finishedPush)
}

func TestServer_Push_RejectAfterGoAway(t *testing.T) {
	var readyOnce sync.Once
	ready := make(chan struct{})
	errc := make(chan error, 2)
	st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
		select {
		case <-ready:
		case <-time.After(5 * time.Second):
			errc <- fmt.Errorf("timeout waiting for GOAWAY to be processed")
		}
		if got, want := w.(http.Pusher).Push("https://"+r.Host+"/pushed", nil), http.ErrNotSupported; got != want {
			errc <- fmt.Errorf("Push()=%v, want %v", got, want)
		}
		errc <- nil
	})
	defer st.Close()
	st.greet()
	getSlash(st)

	// Send GOAWAY and wait for it to be processed.
	st.fr.WriteGoAway(1, ErrCodeNo, nil)
	go func() {
		for {
			select {
			case <-ready:
				return
			default:
			}
			st.sc.testHookCh <- func(loopNum int) {
				if !st.sc.pushEnabled {
					readyOnce.Do(func() { close(ready) })
				}
			}
		}
	}()
	if err := <-errc; err != nil {
		t.Error(err)
	}
}

{'repo_name': 'olebedev/go-starter-kit', 'stars': '2794', 'repo_language': 'Go', 'file_name': 'react.html', 'mime_type': 'text/html', 'hash': -1766570006737288773, 'source_dataset': 'data'}


/**
 *    Copyright (C) 2016 Weibo Inc.
 *
 *    This file is part of Opendcp.
 *
 *    Opendcp is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; version 2 of the License.
 *
 *    Opendcp is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with Opendcp; if not, write to the Free Software
 *    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 */

package service

import (
	"fmt"
	"strings"

	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"

	"weibo.com/opendcp/orion/models"
)

type LogsService struct {
	BaseService
}

var (
	isPrintBeego = true
)

func (store *LogsService) Debug(Fid int, BatchId int, correlationId string, v ...interface{}) {
	if isPrintBeego {
		beego.Debug(v...)
	}

	go store.saveToDb(Fid, BatchId, correlationId, v...)
}

func (store *LogsService) Info(Fid int, BatchId int, correlationId string, v ...interface{}) {
	if isPrintBeego {
		beego.Info(v...)
	}

	go store.saveToDb(Fid, BatchId, correlationId, v...)
}

func (store *LogsService) Warn(Fid int, BatchId int, correlationId string, v ...interface{}) {
	if isPrintBeego {
		beego.Warn(v...)
	}

	go store.saveToDb(Fid, BatchId, correlationId, v...)
}

func (store *LogsService) Error(Fid int, BatchId int, correlationId string, v ...interface{}) {
	if isPrintBeego {
		beego.Error(v...)
	}

	go store.saveToDb(Fid, BatchId, correlationId, v...)
}

func (store *LogsService) saveToDb(Fid int, BatchId int, correlationId string, v ...interface{}) {
	defer func() {
		if r := recover(); r != nil {
			beego.Info("saveToDb is error !", r)
		}
	}()

	msg := strings.Repeat(" %v", len(v))
	if len(v) > 0 {
		msg = fmt.Sprintf(msg, v...)
	}

	logs := models.NewLogsInit(Fid, BatchId, correlationId, msg)
	orm := orm.NewOrm()
	id, err := orm.Insert(logs)

	if err != nil {
		beego.Error("[Store] LogMessage fail!", err)
	} else {
		fmt.Println(id)
	}
}

{'repo_name': 'weibocom/opendcp', 'stars': '386', 'repo_language': 'Go', 'file_name': 'octans_api.md', 'mime_type': 'text/plain', 'hash': 3217291973157073300, 'source_dataset': 'data'}


<?php
/**
 * Open Source Social Network
 *
 * @package   (softlab24.com).ossn
 * @author    OSSN Core Team <info@softlab24.com>
 * @copyright (C) SOFTLAB24 LIMITED
 * @license   Open Source Social Network License (OSSN LICENSE)  http://www.opensource-socialnetwork.org/licence
 * @link      https://www.opensource-socialnetwork.org/
 */
 ossn_load_external_js('chart.js', 'admin');
 ossn_load_external_js('chart.legend.js', 'admin');

 $users = new OssnUser;
 $genders = $users->getGenders();

 $total = array();
 $online = array();
 foreach($genders as $gender) {
		$total[]	= $users->countByGender($gender);
		$online[]	= $users->onlineByGender($gender, true);
 }
 foreach($total as $k => $t){
		if($t === false){
			$total[$k] = 0;
		}
 }
 foreach($online as $k => $o){
		if($o === false){
			$online[$k] = 0;
		}
 }
 $unvalidated = $users->getUnvalidatedUSERS('', true);
 if(!$unvalidated){
		$unvalidated = 0;
 }
 $flush_cache = ossn_site_url("action/admin/cache/flush", true);
?>

<?php echo ossn_print("users");?>

            			<canvas id="users-count-graph"></canvas>

<?php echo ossn_print("users");?> (<?php echo array_sum($total); ?>)

               			<canvas id="users-classified-graph"></canvas>

<?php echo ossn_print("admin:users:unvalidated");?>

                        	<?php echo $unvalidated;?>

<?php echo ossn_print("online:users");?> (<?php echo array_sum($online);?>)

                        	<canvas id="onlineusers-classified-graph"></canvas>

<?php echo ossn_print('components'); ?>

                        	<?php echo ossn_total_components(); ?>

<?php echo ossn_print('themes'); ?>

                            <?php echo ossn_site_total_themes(); ?>

<?php echo ossn_print('my:files:version'); ?>

                            <?php echo ossn_package_information()->version; ?>

<?php echo ossn_print('available:updates'); ?>

<?php echo ossn_print('my:version'); ?>

                            <?php echo ossn_site_settings('site_version'); ?>

<?php echo ossn_print('admin:cache'); ?>

                           	<a href="<?php echo $flush_cache;?>" class="btn btn-primary"><?php echo ossn_print('admin:flush:cache'); ?>

<?php echo ossn_plugin_view('javascripts/dynamic/admin/dashboard/users/users'); ?>
<?php echo ossn_plugin_view('javascripts/dynamic/admin/dashboard/users/classfied', array('genders' => $genders, 'total' => $total)); ?>
<?php echo ossn_plugin_view('javascripts/dynamic/admin/dashboard/users/online/classfied', array('genders' => $genders, 'total' => $online)); ?>

{'repo_name': 'opensource-socialnetwork/opensource-socialnetwork', 'stars': '620', 'repo_language': 'PHP', 'file_name': 'validate.php', 'mime_type': 'text/x-php', 'hash': -1911414363796315192, 'source_dataset': 'data'}