text
stringlengths
101
197k
meta
stringlengths
167
272
# # SplitPluginAssembly.ps1 # param( [string]$regexType, [string]$regex, [string]$projectFilePath, [string]$solutionFilePath ) $ErrorActionPreference = "Stop" Write-Verbose 'Entering SplitPluginAssembly.ps1' -Verbose #Parameters Write-Verbose "regexType = $regexType" Write-Verbose "regex = $regex" Write-Verbose "projectFilePath = $projectFilePath" Write-Verbose "solutionFilePath = $solutionFilePath" #Script Location $scriptPath = split-path -parent $MyInvocation.MyCommand.Definition Write-Verbose "Script Path: $scriptPath" #Load XrmCIFramework $xrmCIToolkit = $scriptPath + "\Xrm.Framework.CI.PowerShell.Cmdlets.dll" Write-Verbose "Importing CIToolkit: $xrmCIToolkit" Import-Module $xrmCIToolkit Write-Verbose "Imported CIToolkit" Write-Host "Split Plugin Assembly Started" Split-XrmPluginAssembly -regexType $regexType -regex $regex -projectFilePath $projectFilePath -solutionFilePath $solutionFilePath Write-Host "Split Plugin Assembly Completed" Write-Verbose 'Leaving SplitPluginAssembly.ps1' -Verbose
{'repo_name': 'WaelHamze/xrm-ci-framework', 'stars': '162', 'repo_language': 'C#', 'file_name': 'DeployPackage.ps1', 'mime_type': 'text/plain', 'hash': 2483452193094067906, 'source_dataset': 'data'}
import React from 'react'; import MuiSelect from '../base-controls/MuiSelect'; import { registerComponent } from 'meteor/vulcan:core'; const SelectMultiple = ({ refFunction, ...properties }) => { return <MuiSelect {...properties} multiple={true} ref={refFunction}/>; }; registerComponent('FormComponentSelectMultiple', SelectMultiple);
{'repo_name': 'VulcanJS/Vulcan', 'stars': '7896', 'repo_language': 'JavaScript', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -1917136972668230748, 'source_dataset': 'data'}
package com.mmnaseri.cs.clrs.ch15.s4; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import java.util.Arrays; import java.util.List; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; /** * @author Mohammad Milad Naseri (mmnaseri@programmer.net) * @since 1.0 (7/21/15) */ public abstract class BaseLongestCommonSubSequenceFinderTest { protected abstract LongestCommonSubSequenceFinder<Integer> getFinder(); @DataProvider public Object[][] testSuiteDataProvider() { return new Object[][]{ new Object[]{"Nothing in common", new Integer[]{1, 2, 3, 4, 5, 6}, new Integer[]{7, 8, 9, 10, 11, 12}, new Integer[0]}, new Object[]{"First is a prefix of second", new Integer[]{1, 2, 3}, new Integer[]{1, 2, 3, 4, 5}, new Integer[]{1, 2, 3}}, new Object[]{"First is a suffix of second", new Integer[]{3, 4, 5}, new Integer[]{1, 2, 3, 4, 5}, new Integer[]{3, 4, 5}}, new Object[]{"First is a child of second", new Integer[]{3, 4, 5}, new Integer[]{1, 2, 3, 4, 5, 6, 7, 8}, new Integer[]{3, 4, 5}}, new Object[]{"Second is a prefix of second", new Integer[]{1, 2, 3, 4, 5, 6}, new Integer[]{1, 2, 3}, new Integer[]{1, 2, 3}}, new Object[]{"Second is a suffix of second", new Integer[]{1, 2, 3, 4, 5, 6}, new Integer[]{4, 5, 6}, new Integer[]{4, 5, 6}}, new Object[]{"Second is a child of second", new Integer[]{1, 2, 3, 4, 5, 6}, new Integer[]{2, 3, 4, 5}, new Integer[]{2, 3, 4, 5}}, new Object[]{"Have two LCS", new Integer[]{1, 2, 3, 4, 5, 6, 7, 8}, new Integer[]{5, 6, 7, 8, 1, 2, 3, 4}, new Integer[]{1, 2, 3, 4}}, new Object[]{"First is null", null, new Integer[]{1, 2, 3, 4}, null}, new Object[]{"Second is null", new Integer[]{1, 2, 3, 4}, null, null}, new Object[]{"Both are null", null, null, null}, }; } @Test(dataProvider = "testSuiteDataProvider") public void testFunctionality(@SuppressWarnings("UnusedParameters") String name, Integer[] first, Integer[] second, Integer[] expected) throws Exception { final LongestCommonSubSequenceFinder<Integer> finder = getFinder(); final List<Integer> firstList = first == null ? null : Arrays.asList(first); final List<Integer> secondList = second == null ? null : Arrays.asList(second); final List<Integer> largestCommonSubSequence = finder.find(firstList, secondList); if (expected == null) { assertThat(largestCommonSubSequence, is(nullValue())); } else { assertThat(largestCommonSubSequence, is(notNullValue())); assertThat(largestCommonSubSequence, hasSize(expected.length)); for (int i = 0; i < expected.length; i++) { assertThat(largestCommonSubSequence.get(i), is(expected[i])); } } } }
{'repo_name': 'mmnaseri/cs-review', 'stars': '158', 'repo_language': 'Java', 'file_name': 'pom.xml', 'mime_type': 'text/xml', 'hash': 6463625113281118447, 'source_dataset': 'data'}
#include "d3dUtil.h" HRESULT CreateShaderFromFile( const WCHAR* csoFileNameInOut, const WCHAR* hlslFileName, LPCSTR entryPoint, LPCSTR shaderModel, ID3DBlob** ppBlobOut) { HRESULT hr = S_OK; // 寻找是否有已经编译好的顶点着色器 if (csoFileNameInOut && D3DReadFileToBlob(csoFileNameInOut, ppBlobOut) == S_OK) { return hr; } else { DWORD dwShaderFlags = D3DCOMPILE_ENABLE_STRICTNESS; #ifdef _DEBUG // 设置 D3DCOMPILE_DEBUG 标志用于获取着色器调试信息。该标志可以提升调试体验, // 但仍然允许着色器进行优化操作 dwShaderFlags |= D3DCOMPILE_DEBUG; // 在Debug环境下禁用优化以避免出现一些不合理的情况 dwShaderFlags |= D3DCOMPILE_SKIP_OPTIMIZATION; #endif ID3DBlob* errorBlob = nullptr; hr = D3DCompileFromFile(hlslFileName, nullptr, D3D_COMPILE_STANDARD_FILE_INCLUDE, entryPoint, shaderModel, dwShaderFlags, 0, ppBlobOut, &errorBlob); if (FAILED(hr)) { if (errorBlob != nullptr) { OutputDebugStringA(reinterpret_cast<const char*>(errorBlob->GetBufferPointer())); } SAFE_RELEASE(errorBlob); return hr; } // 若指定了输出文件名,则将着色器二进制信息输出 if (csoFileNameInOut) { return D3DWriteBlobToFile(*ppBlobOut, csoFileNameInOut, FALSE); } } return hr; }
{'repo_name': 'MKXJun/DirectX11-With-Windows-SDK', 'stars': '481', 'repo_language': 'C++', 'file_name': 'Basic.hlsli', 'mime_type': 'text/x-c', 'hash': 2948258883272845157, 'source_dataset': 'data'}
!BaseONNXImageEncoder parameters: model_dir: ${MOBILENET_MODEL} model_name: mobilenetv2.onnx gnes_config: is_trained: true
{'repo_name': 'gnes-ai/gnes', 'stars': '1123', 'repo_language': 'Python', 'file_name': 'encoder.vgg.yml', 'mime_type': 'text/plain', 'hash': -4083845316885465043, 'source_dataset': 'data'}
function net = setLrWd(net, varargin) import dagnn.* opts.filtersLRWD = [1 1]; opts.biasesLRWD = [2 0]; opts.convFiltersLRWD = [1 1]; opts.convBiasesLRWD = [2 0]; opts.fusionFiltersLRWD = [1 1]; opts.fusionBiasesLRWD = [2 0]; opts = vl_argparse(opts, varargin); for l = 1:numel(net.layers) paramsIdx = net.getParamIndex(net.layers(l).params); for p = 1:numel(paramsIdx) sz = size(net.params(paramsIdx(p)).value); switch class(net.layers(l).block) case 'dagnn.BatchNorm' net.params(paramsIdx(p)).value = squeeze(net.params(paramsIdx(p)).value); if p == 1 net.params(paramsIdx(p)).learningRate = 2; net.params(paramsIdx(p)).weightDecay = 0; elseif p==2 net.params(paramsIdx(p)).learningRate = 1; net.params(paramsIdx(p)).weightDecay = 0; elseif p==3 net.params(paramsIdx(p)).learningRate = 0.05; net.params(paramsIdx(p)).weightDecay = 0; end otherwise if p == 1 net.params(paramsIdx(p)).learningRate = 1; net.params(paramsIdx(p)).weightDecay = 1; elseif p==2 net.params(paramsIdx(p)).learningRate = 2; net.params(paramsIdx(p)).weightDecay = 0; end end end end
{'repo_name': 'feichtenhofer/twostreamfusion', 'stars': '554', 'repo_language': 'Cuda', 'file_name': 'classInd.txt', 'mime_type': 'text/plain', 'hash': 5380265047859927003, 'source_dataset': 'data'}
import { test } from 'qunit'; import moduleForAcceptance from 'vault/tests/helpers/module-for-acceptance'; import { supportedAuthBackends } from 'vault/helpers/supported-auth-backends'; import authForm from '../pages/components/auth-form'; import { create } from 'ember-cli-page-object'; import apiStub from 'vault/tests/helpers/noop-all-api-requests'; const component = create(authForm); moduleForAcceptance('Acceptance | auth', { beforeEach() { this.server = apiStub({ usePassthrough: true }); return authLogout(); }, afterEach() { this.server.shutdown(); }, }); test('auth query params', function(assert) { const backends = supportedAuthBackends(); visit('/vault/auth'); andThen(() => { assert.equal(currentURL(), '/vault/auth'); }); backends.reverse().forEach(backend => { click(`[data-test-auth-method-link="${backend.type}"]`); andThen(() => { assert.equal( currentURL(), `/vault/auth?with=${backend.type}`, `has the correct URL for ${backend.type}` ); }); }); }); test('it clears token when changing selected auth method', function(assert) { visit('/vault/auth'); andThen(() => { assert.equal(currentURL(), '/vault/auth'); }); component.token('token').tabs.filterBy('name', 'GitHub')[0].link(); component.tabs.filterBy('name', 'Token')[0].link(); andThen(() => { assert.equal(component.tokenValue, '', 'it clears the token value when toggling methods'); }); }); test('it sends the right attributes when authenticating', function(assert) { let backends = supportedAuthBackends(); visit('/vault/auth'); backends.reverse().forEach(backend => { click(`[data-test-auth-method-link="${backend.type}"]`); if (backend.type === 'GitHub') { component.token('token'); } component.login(); andThen(() => { let lastRequest = this.server.passthroughRequests[this.server.passthroughRequests.length - 1]; let body = JSON.parse(lastRequest.requestBody); if (backend.type === 'token') { assert.ok( Object.keys(lastRequest.requestHeaders).includes('X-Vault-Token'), 'token uses vault token header' ); } else if (backend.type === 'GitHub') { assert.ok(Object.keys(body).includes('token'), 'GitHub includes token'); } else { assert.ok(Object.keys(body).includes('password'), `${backend.type} includes password`); } }); }); });
{'repo_name': 'dollarshaveclub/furan', 'stars': '333', 'repo_language': 'Go', 'file_name': 'main.go', 'mime_type': 'text/x-c', 'hash': -7437007645951115517, 'source_dataset': 'data'}
/*****************************************************************************\ * * * File name: fwrite.c * * * * Description: Write into a file * * * * Notes: * * * * History: * * 1998/05/24 JFL Created this file * * * * (c) Copyright 1998-2017 Hewlett Packard Enterprise Development LP * * Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 * \*****************************************************************************/ #include "lodos.h" /*---------------------------------------------------------------------------*\ * * | Function: fwrite | | | | Description: Write into a file | | | | Parameters: void *pBuf Buffer where to store the data read | | int nBytes Number of bytes per block | | int nBlocks Number of blocks | | FILE *hf File handle | | | | Returns: The number of blocks written. | | | | Notes: Standard C library routine. | | | | Uses lodoslib's FILE * alias for the MS-DOS file handle. | | This simplifies a lot the implementation of the functions | | we support. | | | | History: | | | | 1998/05/24 JFL Created this routine | * * \*---------------------------------------------------------------------------*/ size_t fwrite(void *pBuf, size_t nBytes, size_t nCount, FILE *hf) { WORD wDone; WORD wSize; int iErr; wSize = (WORD)(nBytes * nCount); // Incorrect result if >64K iErr = _dos_write(fileno(hf), pBuf, wSize, &wDone); if (iErr) return 0; return wDone / nBytes; }
{'repo_name': 'JFLarvoire/SysToolsLib', 'stars': '163', 'repo_language': 'C', 'file_name': 'fixmht.tcl', 'mime_type': 'text/plain', 'hash': -4308343801253018579, 'source_dataset': 'data'}
using System; using System.Collections.Generic; using System.Linq; using Foundation; using UIKit; namespace DynamicVsStaticCode.iOS { // The UIApplicationDelegate for the application. This class is responsible for launching the // User Interface of the application, as well as listening (and optionally responding) to // application events from iOS. [Register("AppDelegate")] public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate { // // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); LoadApplication(new App()); return base.FinishedLaunching(app, options); } } }
{'repo_name': 'xamarin/xamarin-forms-book-samples', 'stars': '677', 'repo_language': 'C#', 'file_name': 'App.cs', 'mime_type': 'text/x-c++', 'hash': 8350723806130756582, 'source_dataset': 'data'}
// http://hdlsnippets.com/parameterized_priority_encoder module priority_encoder #(parameter INPUT_WIDTH=8,OUTPUT_WIDTH=3) ( input logic [INPUT_WIDTH-1:0] input_data, output logic [OUTPUT_WIDTH-1:0] output_data ); int ii; always_comb begin output_data = 'b0; for(ii=0;ii<INPUT_WIDTH;ii++) if (input_data[ii]) output_data = ii[OUTPUT_WIDTH-1:0]; end endmodule
{'repo_name': 'github/linguist', 'stars': '7868', 'repo_language': 'Ruby', 'file_name': 'install_deps', 'mime_type': 'text/x-shellscript', 'hash': -8408275683364195836, 'source_dataset': 'data'}
/* Package lmdbpool provides a TxnPool type that allows lmdb.Readonly transactions to safely be reused by other goroutines when the goroutine that created the transaction no longer has a use for it. The TxnPool type has benefits that would be absent in a naive use of sync.Pool with lmdb.Txn types. Naively reusing lmdb.Readonly transactions can cause updates to continually allocate more pages for the database instead of reusing stale pages. The TxnPool type tracks transaction ids to make sure that lmdb.Readonly transactions are not reused when they are known to be holding stale pages which could be reclaimed by LMDB. A general downside of pooling lmdb.Readonly transactions using a sync.Pool in applications with a very high rate of transacions is that the number of readers in an environment can be significantly higher than the number of goroutines actively trying to read from that environment. Because of this it is possible that applications may need to increase the maximum number of readers allowed in the environment at initialization time. err := env.SetMaxReaders(maxReaders) In a naive pooling implementation an application compiled with the -race flag may require an extremely large number of open readers. The TxnPool type attempts to keep the value required for Env.SetMaxReaders as low as possible in the presence of -race but there is a limited amount that can be done for a concurrent workload with a rapid enough rate of transactions. */ package lmdbpool
{'repo_name': 'bmatsuo/lmdb-go', 'stars': '120', 'repo_language': 'C', 'file_name': 'main.go', 'mime_type': 'text/x-c', 'hash': -7589608873041700834, 'source_dataset': 'data'}
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import <iWorkImport/TSPPasteboardWriteAssistant.h> @class TSPPasteboard; __attribute__((visibility("hidden"))) @interface TSPCopyAssistant : TSPPasteboardWriteAssistant { TSPPasteboard *_pasteboard; BOOL _didAttemptToCopy; } - (void).cxx_destruct; - (void)copyToPasteboardIsSmartCopy:(BOOL)arg1; - (void)copyToPasteboard; - (void)loadData; - (id)initWithPasteboard:(id)arg1 sourceContext:(id)arg2; - (id)initWithContext:(id)arg1; @end
{'repo_name': 'MP0w/iOS-Headers', 'stars': '405', 'repo_language': 'Objective-C', 'file_name': 'IMAVChat-IMAVChatAudioAdditions.h', 'mime_type': 'text/x-objective-c', 'hash': -4918467604391065357, 'source_dataset': 'data'}
<?php /** * * This file is part of the phpBB Forum Software package. * * @copyright (c) phpBB Limited <https://www.phpbb.com> * @license GNU General Public License, version 2 (GPL-2.0) * * For full copyright and license information, please see * the docs/CREDITS.txt file. * */ /** * DO NOT CHANGE */ if (!defined('IN_PHPBB')) { exit; } if (empty($lang) || !is_array($lang)) { $lang = array(); } // DEVELOPERS PLEASE NOTE // // All language files should use UTF-8 as their encoding and the files must not contain a BOM. // // Placeholders can now contain order information, e.g. instead of // 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows // translators to re-order the output of data while ensuring it remains correct // // You do not need this where single placeholders are used, e.g. 'Message %d' is fine // equally where a string contains only two placeholders which are used to wrap text // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine $lang = array_merge($lang, array( 'ACTION' => 'Action', 'ACTION_NOTE' => 'Action/Note', 'ADD_FEEDBACK' => 'Add feedback', 'ADD_FEEDBACK_EXPLAIN' => 'If you would like to add a report on this please fill out the following form. Only use plain text; HTML, BBCode, etc. are not permitted.', 'ADD_WARNING' => 'Add warning', 'ADD_WARNING_EXPLAIN' => 'To send a warning to this user please fill out the following form. Only use plain text; HTML, BBCode, etc. are not permitted.', 'ALL_ENTRIES' => 'All entries', 'ALL_NOTES_DELETED' => 'Successfully removed all user notes.', 'ALL_REPORTS' => 'All reports', 'ALREADY_REPORTED' => 'This post has already been reported.', 'ALREADY_REPORTED_PM' => 'This private message has already been reported.', 'ALREADY_WARNED' => 'A warning has already been issued for this post.', 'APPROVE' => 'Approve', 'APPROVE_POST' => 'Approve post', 'APPROVE_POST_CONFIRM' => 'Are you sure you want to approve this post?', 'APPROVE_POSTS' => 'Approve posts', 'APPROVE_POSTS_CONFIRM' => 'Are you sure you want to approve the selected posts?', 'APPROVE_TOPIC' => 'Approve topic', 'APPROVE_TOPIC_CONFIRM' => 'Are you sure you want to approve this topic?', 'APPROVE_TOPICS' => 'Approve topics', 'APPROVE_TOPICS_CONFIRM'=> 'Are you sure you want to approve the selected topics?', 'CANNOT_MOVE_SAME_FORUM'=> 'You cannot move a topic to the forum it’s already in.', 'CANNOT_WARN_ANONYMOUS' => 'You cannot warn unregistered guest users.', 'CANNOT_WARN_SELF' => 'You cannot warn yourself.', 'CAN_LEAVE_BLANK' => 'This can be left blank.', 'CHANGE_POSTER' => 'Change poster', 'CLOSE_PM_REPORT' => 'Close PM report', 'CLOSE_PM_REPORT_CONFIRM' => 'Are you sure you want to close the selected PM report?', 'CLOSE_PM_REPORTS' => 'Close PM reports', 'CLOSE_PM_REPORTS_CONFIRM' => 'Are you sure you want to close the selected PM reports?', 'CLOSE_REPORT' => 'Close report', 'CLOSE_REPORT_CONFIRM' => 'Are you sure you want to close the selected report?', 'CLOSE_REPORTS' => 'Close reports', 'CLOSE_REPORTS_CONFIRM' => 'Are you sure you want to close the selected reports?', 'DELETE_PM_REPORT' => 'Delete PM report', 'DELETE_PM_REPORT_CONFIRM' => 'Are you sure you want to delete the selected PM report?', 'DELETE_PM_REPORTS' => 'Delete PM reports', 'DELETE_PM_REPORTS_CONFIRM' => 'Are you sure you want to delete the selected PM reports?', 'DELETE_POSTS' => 'Delete posts', 'DELETE_REPORT' => 'Delete report', 'DELETE_REPORT_CONFIRM' => 'Are you sure you want to delete the selected report?', 'DELETE_REPORTS' => 'Delete reports', 'DELETE_REPORTS_CONFIRM' => 'Are you sure you want to delete the selected reports?', 'DELETE_SHADOW_TOPIC' => 'Delete shadow topic', 'DELETE_TOPICS' => 'Delete selected topics', 'DISAPPROVE' => 'Disapprove', 'DISAPPROVE_REASON' => 'Reason for disapproval', 'DISAPPROVE_POST' => 'Disapprove post', 'DISAPPROVE_POST_CONFIRM' => 'Are you sure you want to disapprove this post?', 'DISAPPROVE_POSTS' => 'Disapprove posts', 'DISAPPROVE_POSTS_CONFIRM' => 'Are you sure you want to disapprove the selected posts?', 'DISPLAY_LOG' => 'Display entries from previous', 'DISPLAY_OPTIONS' => 'Display options', 'EMPTY_REPORT' => 'You must enter a description when selecting this reason.', 'EMPTY_TOPICS_REMOVED_WARNING' => 'Please note that one or several topics have been removed from the database because they were or become empty.', 'FEEDBACK' => 'Feedback', 'FORK' => 'Copy', 'FORK_TOPIC' => 'Copy topic', 'FORK_TOPIC_CONFIRM' => 'Are you sure you want to copy this topic?', 'FORK_TOPICS' => 'Copy selected topics', 'FORK_TOPICS_CONFIRM' => 'Are you sure you want to copy the selected topics?', 'FORUM_DESC' => 'Description', 'FORUM_NAME' => 'Forum name', 'FORUM_NOT_EXIST' => 'The forum you selected does not exist.', 'FORUM_NOT_POSTABLE' => 'The forum you selected cannot be posted to.', 'FORUM_STATUS' => 'Forum status', 'FORUM_STYLE' => 'Forum style', 'GLOBAL_ANNOUNCEMENT' => 'Global announcement', 'IP_INFO' => 'IP address information', 'IPS_POSTED_FROM' => 'IP addresses this user has posted from', 'LATEST_LOGS' => 'Latest 5 logged actions', 'LATEST_REPORTED' => 'Latest 5 reports', 'LATEST_REPORTED_PMS' => 'Latest 5 PM reports', 'LATEST_UNAPPROVED' => 'Latest 5 posts awaiting approval', 'LATEST_WARNING_TIME' => 'Latest warning issued', 'LATEST_WARNINGS' => 'Latest 5 warnings', 'LEAVE_SHADOW' => 'Leave shadow topic in place', 'LIST_REPORTS' => array( 1 => '%d report', 2 => '%d reports', ), 'LOCK' => 'Lock', 'LOCK_POST_POST' => 'Lock post', 'LOCK_POST_POST_CONFIRM' => 'Are you sure you want to prevent editing this post?', 'LOCK_POST_POSTS' => 'Lock selected posts', 'LOCK_POST_POSTS_CONFIRM' => 'Are you sure you want to prevent editing the selected posts?', 'LOCK_TOPIC_CONFIRM' => 'Are you sure you want to lock this topic?', 'LOCK_TOPICS' => 'Lock selected topics', 'LOCK_TOPICS_CONFIRM' => 'Are you sure you want to lock all selected topics?', 'LOGS_CURRENT_TOPIC' => 'Currently viewing logs of:', 'LOGIN_EXPLAIN_MCP' => 'To moderate this forum you must login.', 'LOGVIEW_VIEWPOST' => 'View post', 'LOGVIEW_VIEWTOPIC' => 'View topic', 'LOGVIEW_VIEWLOGS' => 'View topic log', 'LOGVIEW_VIEWFORUM' => 'View forum', 'LOOKUP_ALL' => 'Look up all IPs', 'LOOKUP_IP' => 'Look up IP', 'MARKED_NOTES_DELETED' => 'Successfully removed all marked user notes.', 'MCP_ADD' => 'Add a warning', 'MCP_BAN' => 'Banning', 'MCP_BAN_EMAILS' => 'Ban emails', 'MCP_BAN_IPS' => 'Ban IPs', 'MCP_BAN_USERNAMES' => 'Ban Usernames', 'MCP_LOGS' => 'Moderator logs', 'MCP_LOGS_FRONT' => 'Front page', 'MCP_LOGS_FORUM_VIEW' => 'Forum logs', 'MCP_LOGS_TOPIC_VIEW' => 'Topic logs', 'MCP_MAIN' => 'Main', 'MCP_MAIN_FORUM_VIEW' => 'View forum', 'MCP_MAIN_FRONT' => 'Front page', 'MCP_MAIN_POST_DETAILS' => 'Post details', 'MCP_MAIN_TOPIC_VIEW' => 'View topic', 'MCP_MAKE_ANNOUNCEMENT' => 'Modify to “Announcement”', 'MCP_MAKE_ANNOUNCEMENT_CONFIRM' => 'Are you sure you want to change this topic to an “Announcement”?', 'MCP_MAKE_ANNOUNCEMENTS' => 'Modify to “Announcements”', 'MCP_MAKE_ANNOUNCEMENTS_CONFIRM'=> 'Are you sure you want to change the selected topics to “Announcements”?', 'MCP_MAKE_GLOBAL' => 'Modify to “Global announcement”', 'MCP_MAKE_GLOBAL_CONFIRM' => 'Are you sure you want to change this topic to a “Global announcement”?', 'MCP_MAKE_GLOBALS' => 'Modify to “Global announcements”', 'MCP_MAKE_GLOBALS_CONFIRM' => 'Are you sure you want to change the selected topics to “Global announcements”?', 'MCP_MAKE_STICKY' => 'Modify to “Sticky”', 'MCP_MAKE_STICKY_CONFIRM' => 'Are you sure you want to change this topic to a “Sticky”?', 'MCP_MAKE_STICKIES' => 'Modify to “Stickies”', 'MCP_MAKE_STICKIES_CONFIRM' => 'Are you sure you want to change the selected topics to “Stickies”?', 'MCP_MAKE_NORMAL' => 'Modify to “Standard Topic”', 'MCP_MAKE_NORMAL_CONFIRM' => 'Are you sure you want to change this topic to a “Standard Topic”?', 'MCP_MAKE_NORMALS' => 'Modify to “Standard Topics”', 'MCP_MAKE_NORMALS_CONFIRM' => 'Are you sure you want to change the selected topics to “Standard Topics”?', 'MCP_NOTES' => 'User notes', 'MCP_NOTES_FRONT' => 'Front page', 'MCP_NOTES_USER' => 'User details', 'MCP_POST_REPORTS' => 'Reports issued on this post', 'MCP_PM_REPORTS' => 'Reported PMs', 'MCP_PM_REPORT_DETAILS' => 'PM Report details', 'MCP_PM_REPORTS_CLOSED' => 'Closed PM reports', 'MCP_PM_REPORTS_CLOSED_EXPLAIN' => 'This is a list of all reports about private messages which have previously been resolved.', 'MCP_PM_REPORTS_OPEN' => 'Open PM reports', 'MCP_PM_REPORTS_OPEN_EXPLAIN' => 'This is a list of all reported private messages which are still to be handled.', 'MCP_REPORTS' => 'Reported messages', 'MCP_REPORT_DETAILS' => 'Report details', 'MCP_REPORTS_CLOSED' => 'Closed reports', 'MCP_REPORTS_CLOSED_EXPLAIN' => 'This is a list of all reports about posts which have previously been resolved.', 'MCP_REPORTS_OPEN' => 'Open reports', 'MCP_REPORTS_OPEN_EXPLAIN' => 'This is a list of all reported posts which are still to be handled.', 'MCP_QUEUE' => 'Moderation queue', 'MCP_QUEUE_APPROVE_DETAILS' => 'Approve details', 'MCP_QUEUE_UNAPPROVED_POSTS' => 'Posts awaiting approval', 'MCP_QUEUE_UNAPPROVED_POSTS_EXPLAIN' => 'This is a list of all posts which require approving before they will be visible to users.', 'MCP_QUEUE_UNAPPROVED_TOPICS' => 'Topics awaiting approval', 'MCP_QUEUE_UNAPPROVED_TOPICS_EXPLAIN' => 'This is a list of all topics which require approving before they will be visible to users.', 'MCP_QUEUE_DELETED_POSTS' => 'Deleted posts', 'MCP_QUEUE_DELETED_POSTS_EXPLAIN' => 'This is a list of all soft deleted posts. You can restore or permanently delete the posts from this screen.', 'MCP_QUEUE_DELETED_TOPICS' => 'Deleted topics', 'MCP_QUEUE_DELETED_TOPICS_EXPLAIN' => 'This is a list of all soft deleted topics. You can restore or permanently delete the topics from this screen.', 'MCP_VIEW_USER' => 'View warnings for a specific user', 'MCP_WARN' => 'Warnings', 'MCP_WARN_FRONT' => 'Front page', 'MCP_WARN_LIST' => 'List warnings', 'MCP_WARN_POST' => 'Warn for specific post', 'MCP_WARN_USER' => 'Warn user', 'MERGE_POSTS_CONFIRM' => 'Are you sure you want to move the selected posts?', 'MERGE_TOPIC_EXPLAIN' => 'Using the form below you can move selected posts into another topic. The posts will be split from this topic and merged into the other topic. These posts will not be reordered and will appear as if the users posted them to the new topic.<br />Please enter the destination topic id or click on “Select topic” to search for one.', 'MERGE_TOPIC_ID' => 'Destination topic identification number', 'MERGE_TOPICS' => 'Merge topics', 'MERGE_TOPICS_CONFIRM' => 'Are you sure you want to merge the selected topics?', 'MODERATE_FORUM' => 'Moderate forum', 'MODERATE_TOPIC' => 'Moderate topic', 'MODERATE_POST' => 'Moderate post', 'MOD_OPTIONS' => 'Moderator options', 'MORE_INFO' => 'Further information', 'MOST_WARNINGS' => 'Users with most warnings', 'MOVE_TOPIC_CONFIRM' => 'Are you sure you want to move the topic into a new forum?', 'MOVE_TOPICS' => 'Move selected topics', 'MOVE_TOPICS_CONFIRM' => 'Are you sure you want to move the selected topics into a new forum?', 'NOTIFY_POSTER_APPROVAL' => 'Notify poster about approval?', 'NOTIFY_POSTER_DISAPPROVAL' => 'Notify poster about disapproval?', 'NOTIFY_USER_WARN' => 'Notify user about warning?', 'NOT_MODERATOR' => 'You are not a moderator of this forum.', 'NO_DESTINATION_FORUM' => 'Please select a forum for destination.', 'NO_DESTINATION_FORUM_FOUND' => 'There is no destination forum available.', 'NO_ENTRIES' => 'No log entries.', 'NO_FEEDBACK' => 'No feedback exists for this user.', 'NO_FINAL_TOPIC_SELECTED' => 'You have to select a destination topic for merging posts.', 'NO_MATCHES_FOUND' => 'No matches found.', 'NO_POST' => 'You have to select a post in order to warn the user for a post.', 'NO_POST_REPORT' => 'This post was not reported.', 'NO_POST_SELECTED' => 'You must select at least one post to perform this action.', 'NO_POSTS_DELETED' => 'There are no deleted posts.', 'NO_POSTS_QUEUE' => 'There are no posts waiting for approval.', 'NO_REASON_DISAPPROVAL' => 'Please give an appropriate reason for disapproval.', 'NO_REPORT' => 'No report found', 'NO_REPORTS' => 'No reports found', 'NO_REPORT_SELECTED' => 'You must select at least one report to perform this action.', 'NO_TOPIC_ICON' => 'None', 'NO_TOPIC_SELECTED' => 'You must select at least one topic to perform this action.', 'NO_TOPICS_DELETED' => 'There are no deleted topics.', 'NO_TOPICS_QUEUE' => 'There are no topics waiting for approval.', 'ONLY_TOPIC' => 'Only topic “%s”', 'OTHER_USERS' => 'Other users posting from this IP', 'QUICKMOD_ACTION_NOT_ALLOWED' => "%s not allowed as quickmod", 'PM_REPORT_CLOSED_SUCCESS' => 'The selected PM report has been closed successfully.', 'PM_REPORT_DELETED_SUCCESS' => 'The selected PM report has been deleted successfully.', 'PM_REPORTED_SUCCESS' => 'This private message has been successfully reported.', 'PM_REPORTS_CLOSED_SUCCESS' => 'The selected PM reports have been closed successfully.', 'PM_REPORTS_DELETED_SUCCESS'=> 'The selected PM reports have been deleted successfully.', 'PM_REPORTS_TOTAL' => array( 0 => 'There are no PM reports to review.', 1 => 'In total there is <strong>1</strong> PM report to review.', 2 => 'In total there are <strong>%d</strong> PM reports to review.', ), 'PM_REPORT_DETAILS' => 'Private message report details', 'POSTER' => 'Poster', 'POSTS_APPROVED_SUCCESS' => 'The selected posts have been approved.', 'POSTS_DELETED_SUCCESS' => 'The selected posts have been successfully removed from the database.', 'POSTS_DISAPPROVED_SUCCESS' => 'The selected posts have been disapproved.', 'POSTS_LOCKED_SUCCESS' => 'The selected posts have been locked successfully.', 'POSTS_MERGED_SUCCESS' => 'The selected posts have been merged.', 'POSTS_PER_PAGE' => 'Posts per page', 'POSTS_PER_PAGE_EXPLAIN' => '(Set to 0 to view all posts.)', 'POSTS_RESTORED_SUCCESS' => 'The selected posts have been restored successfully.', 'POSTS_UNLOCKED_SUCCESS' => 'The selected posts have been unlocked successfully.', 'POST_APPROVED_SUCCESS' => 'The selected post has been approved.', 'POST_DELETED_SUCCESS' => 'The selected post has been successfully removed from the database.', 'POST_DISAPPROVED_SUCCESS' => 'The selected post has been disapproved.', 'POST_LOCKED_SUCCESS' => 'Post locked successfully.', 'POST_NOT_EXIST' => 'The post you requested does not exist.', 'POST_REPORTED_SUCCESS' => 'This post has been successfully reported.', 'POST_RESTORED_SUCCESS' => 'This post has been restored successfully.', 'POST_UNLOCKED_SUCCESS' => 'Post unlocked successfully.', 'READ_USERNOTES' => 'User notes', 'READ_WARNINGS' => 'User warnings', 'REPORTER' => 'Reporter', 'REPORTED' => 'Reported', 'REPORTED_BY' => 'Reported by', 'REPORTED_ON_DATE' => 'on', 'REPORTS_CLOSED_SUCCESS' => 'The selected reports have been closed successfully.', 'REPORTS_DELETED_SUCCESS' => 'The selected reports have been deleted successfully.', 'REPORTS_TOTAL' => array( 0 => 'There are no reports to review.', 1 => 'In total there is <strong>1</strong> report to review.', 2 => 'In total there are <strong>%d</strong> reports to review.', ), 'REPORT_CLOSED' => 'This report has already been closed.', 'REPORT_CLOSED_SUCCESS' => 'The selected report has been closed successfully.', 'REPORT_DELETED_SUCCESS' => 'The selected report has been deleted successfully.', 'REPORT_DETAILS' => 'Report details', 'REPORT_MESSAGE' => 'Report this message', 'REPORT_MESSAGE_EXPLAIN' => 'Use this form to report the selected private message. Reporting should generally be used only if the message breaks forum rules. <strong>Reporting a private message will make its contents visible to all moderators.</strong>', 'REPORT_NOTIFY' => 'Notify me', 'REPORT_NOTIFY_EXPLAIN' => 'Informs you when your report is dealt with.', 'REPORT_POST_EXPLAIN' => 'Use this form to report the selected post to the forum moderators and board administrators. Reporting should generally be used only if the post breaks forum rules.', 'REPORT_REASON' => 'Report reason', 'REPORT_TIME' => 'Report time', 'RESTORE' => 'Restore', 'RESTORE_POST' => 'Restore post', 'RESTORE_POST_CONFIRM' => 'Are you sure you want to restore this post?', 'RESTORE_POSTS' => 'Restore posts', 'RESTORE_POSTS_CONFIRM' => 'Are you sure you want to restore the selected posts?', 'RESTORE_TOPIC' => 'Restore topic', 'RESTORE_TOPIC_CONFIRM' => 'Are you sure you want to restore this topic?', 'RESTORE_TOPICS' => 'Restore topics', 'RESTORE_TOPICS_CONFIRM' => 'Are you sure you want to restore the selected topics?', 'RESYNC' => 'Resync', 'RETURN_MESSAGE' => '%sReturn to the message%s', 'RETURN_NEW_FORUM' => '%sGo to the new forum%s', 'RETURN_NEW_TOPIC' => '%sGo to the new topic%s', 'RETURN_PM' => '%sReturn to the private message%s', 'RETURN_POST' => '%sReturn to the post%s', 'RETURN_QUEUE' => '%sReturn to the queue%s', 'RETURN_REPORTS' => '%sReturn to the reports%s', 'RETURN_TOPIC_SIMPLE' => '%sReturn to the topic%s', 'SEARCH_POSTS_BY_USER' => 'Search posts by', 'SELECT_ACTION' => 'Select desired action', 'SELECT_FORUM_GLOBAL_ANNOUNCEMENT' => 'Please select the forum you wish this global announcement to be displayed.', 'SELECT_FORUM_GLOBAL_ANNOUNCEMENTS' => 'One or more of the selected topics are global announcements. Please select the forum you wish these to be displayed.', 'SELECT_MERGE' => 'Select for merge', 'SELECT_TOPICS_FROM' => 'Select topics from', 'SELECT_TOPIC' => 'Select topic', 'SELECT_USER' => 'Select user', 'SORT_ACTION' => 'Log action', 'SORT_DATE' => 'Date', 'SORT_IP' => 'IP address', 'SORT_WARNINGS' => 'Warnings', 'SPLIT_AFTER' => 'Split topic from selected post onwards', 'SPLIT_FORUM' => 'Forum for new topic', 'SPLIT_POSTS' => 'Split selected posts', 'SPLIT_SUBJECT' => 'New topic title', 'SPLIT_TOPIC_ALL' => 'Split topic from selected posts', 'SPLIT_TOPIC_ALL_CONFIRM' => 'Are you sure you want to split this topic?', 'SPLIT_TOPIC_BEYOND' => 'Split topic at selected post', 'SPLIT_TOPIC_BEYOND_CONFIRM' => 'Are you sure you want to split this topic at the selected post?', 'SPLIT_TOPIC_EXPLAIN' => 'Using the form below you can split a topic in two, either by selecting the posts individually or by splitting at a selected post.', 'THIS_PM_IP' => 'IP for this private message', 'THIS_POST_IP' => 'IP for this post', 'TOPICS_APPROVED_SUCCESS' => 'The selected topics have been approved.', 'TOPICS_DELETED_SUCCESS' => 'The selected topics have been successfully removed from the database.', 'TOPICS_DISAPPROVED_SUCCESS'=> 'The selected topics have been disapproved.', 'TOPICS_FORKED_SUCCESS' => 'The selected topics have been copied successfully.', 'TOPICS_LOCKED_SUCCESS' => 'The selected topics have been locked.', 'TOPICS_MOVED_SUCCESS' => 'The selected topics have been moved successfully.', 'TOPICS_RESTORED_SUCCESS' => 'The selected topics have been restored successfully.', 'TOPICS_RESYNC_SUCCESS' => 'The selected topics have been resynchronised.', 'TOPICS_TYPE_CHANGED' => 'Topic types changed successfully.', 'TOPICS_UNLOCKED_SUCCESS' => 'The selected topics have been unlocked.', 'TOPIC_APPROVED_SUCCESS' => 'The selected topic has been approved.', 'TOPIC_DELETED_SUCCESS' => 'The selected topic has been successfully removed from the database.', 'TOPIC_DISAPPROVED_SUCCESS' => 'The selected topic has been disapproved.', 'TOPIC_FORKED_SUCCESS' => 'The selected topic has been copied successfully.', 'TOPIC_LOCKED_SUCCESS' => 'The selected topic has been locked.', 'TOPIC_MOVED_SUCCESS' => 'The selected topic has been moved successfully.', 'TOPIC_NOT_EXIST' => 'The topic you selected does not exist.', 'TOPIC_RESTORED_SUCCESS' => 'The selected topic has been restored successfully.', 'TOPIC_RESYNC_SUCCESS' => 'The selected topic has been resynchronised.', 'TOPIC_SPLIT_SUCCESS' => 'The selected topic has been split successfully.', 'TOPIC_TIME' => 'Topic time', 'TOPIC_TYPE_CHANGED' => 'Topic type changed successfully.', 'TOPIC_UNLOCKED_SUCCESS' => 'The selected topic has been unlocked.', 'TOTAL_WARNINGS' => 'Total Warnings', 'UNAPPROVED_POSTS_TOTAL' => array( 0 => 'There are no posts waiting for approval.', 1 => 'In total there is <strong>1</strong> post waiting for approval.', 2 => 'In total there are <strong>%d</strong> posts waiting for approval.', ), 'UNLOCK' => 'Unlock', 'UNLOCK_POST' => 'Unlock post', 'UNLOCK_POST_EXPLAIN' => 'Allow editing', 'UNLOCK_POST_POST' => 'Unlock post', 'UNLOCK_POST_POST_CONFIRM' => 'Are you sure you want to allow editing this post?', 'UNLOCK_POST_POSTS' => 'Unlock selected posts', 'UNLOCK_POST_POSTS_CONFIRM' => 'Are you sure you want to allow editing the selected posts?', 'UNLOCK_TOPIC' => 'Unlock topic', 'UNLOCK_TOPIC_CONFIRM' => 'Are you sure you want to unlock this topic?', 'UNLOCK_TOPICS' => 'Unlock selected topics', 'UNLOCK_TOPICS_CONFIRM' => 'Are you sure you want to unlock all selected topics?', 'USER_CANNOT_POST' => 'You cannot post in this forum.', 'USER_CANNOT_REPORT' => 'You cannot report posts in this forum.', 'USER_FEEDBACK_ADDED' => 'User feedback added successfully.', 'USER_WARNING_ADDED' => 'User warned successfully.', 'VIEW_DETAILS' => 'View details', 'VIEW_PM' => 'View private message', 'VIEW_POST' => 'View post', 'WARNED_USERS' => 'Warned users', 'WARNED_USERS_EXPLAIN' => 'This is a list of users with unexpired warnings issued to them.', 'WARNING_PM_BODY' => 'The following is a warning which has been issued to you by an administrator or moderator of this site.[quote]%s[/quote]', 'WARNING_PM_SUBJECT' => 'Board warning issued', 'WARNING_POST_DEFAULT' => 'This is a warning regarding the following post made by you: %s .', 'NO_WARNINGS' => 'No warnings exist.', 'YOU_SELECTED_TOPIC' => 'You selected topic number %d: %s.', 'report_reasons' => array( 'TITLE' => array( 'WAREZ' => 'Warez', 'SPAM' => 'Spam', 'OFF_TOPIC' => 'Off-topic', 'OTHER' => 'Other', ), 'DESCRIPTION' => array( 'WAREZ' => 'The message contains links to illegal or pirated software.', 'SPAM' => 'The reported message has the only purpose to advertise for a website or another product.', 'OFF_TOPIC' => 'The reported message is off topic.', 'OTHER' => 'The reported message does not fit into any other category, please use the further information field.', ), ), ));
{'repo_name': 'phpbb/phpbb', 'stars': '1326', 'repo_language': 'PHP', 'file_name': 'phpbb-install-config.yml', 'mime_type': 'text/plain', 'hash': 6860047267316310972, 'source_dataset': 'data'}
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from sleekxmpp.plugins.base import register_plugin from sleekxmpp.plugins.xep_0016 import stanza from sleekxmpp.plugins.xep_0016.stanza import Privacy from sleekxmpp.plugins.xep_0016.privacy import XEP_0016 register_plugin(XEP_0016)
{'repo_name': 'fritzy/SleekXMPP', 'stars': '1131', 'repo_language': 'Python', 'file_name': 'live_test.py', 'mime_type': 'text/x-python', 'hash': 2477557711680520868, 'source_dataset': 'data'}
module.exports = quantizeDuration function quantizeDuration (value) { var grid = getGrid(value) return Math.round(value / grid) * grid } function getGrid (duration) { if (duration < 0.7) { return 0.5 } else if (duration < 1.7) { return 1 } else { return 2 } }
{'repo_name': 'mmckegg/loop-drop-app', 'stars': '774', 'repo_language': 'JavaScript', 'file_name': 'window.html', 'mime_type': 'text/html', 'hash': -5225490632174030732, 'source_dataset': 'data'}
/* * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* This file contains configuration settings for the demos. */ #ifndef IOT_CONFIG_H_ #define IOT_CONFIG_H_ /* Standard include. */ #include <stdbool.h> /* MQTT demo configuration. */ #define IOT_DEMO_MQTT_PUBLISH_BURST_COUNT ( 10 ) #define IOT_DEMO_MQTT_PUBLISH_BURST_SIZE ( 2 ) /* Shadow demo configuration. The demo publishes periodic Shadow updates and responds * to changing Shadows. */ #define AWS_IOT_DEMO_SHADOW_UPDATE_COUNT ( 20 ) /* Number of updates to publish. */ #define AWS_IOT_DEMO_SHADOW_UPDATE_PERIOD_MS ( 3000 ) /* Period of Shadow updates. */ /* Library logging configuration. IOT_LOG_LEVEL_GLOBAL provides a global log * level for all libraries; the library-specific settings override the global * setting. If both the library-specific and global settings are undefined, * no logs will be printed. */ #define IOT_LOG_LEVEL_GLOBAL IOT_LOG_INFO #define IOT_LOG_LEVEL_DEMO IOT_LOG_INFO #define IOT_LOG_LEVEL_PLATFORM IOT_LOG_NONE #define IOT_LOG_LEVEL_NETWORK IOT_LOG_INFO #define IOT_LOG_LEVEL_TASKPOOL IOT_LOG_NONE #define IOT_LOG_LEVEL_MQTT IOT_LOG_INFO #define AWS_IOT_LOG_LEVEL_SHADOW IOT_LOG_INFO #define AWS_IOT_LOG_LEVEL_DEFENDER IOT_LOG_INFO #define IOT_LOG_LEVEL_HTTPS IOT_LOG_INFO /* Platform thread stack size and priority. */ #define IOT_THREAD_DEFAULT_STACK_SIZE 2048 #define IOT_THREAD_DEFAULT_PRIORITY 5 /* Include the common configuration file for FreeRTOS. */ #include "iot_config_common.h" #endif /* ifndef IOT_CONFIG_H_ */
{'repo_name': 'aws/amazon-freertos', 'stars': '2036', 'repo_language': 'C', 'file_name': 'aws.mk', 'mime_type': 'text/plain', 'hash': 1922470122879703329, 'source_dataset': 'data'}
// jDownloader - Downloadmanager // Copyright (C) 2009 JD-Team support@jdownloader.org // // This program 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, either version 3 of the License, or // (at your option) any later version. // // This program 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 this program. If not, see <http://www.gnu.org/licenses/>. package jd.plugins; import jd.gui.UserIO; import org.jdownloader.translate._JDT; /** * Little Helper class for often used Plugin issues * * @author Coalado */ public class PluginUtils { /** * Asks the user to entere a password for plugin */ public static String askPassword(final Plugin plg) { return askPassword(plg.getHost(), ""); } public static String askPassword(String message, final CryptedLink link) { // with null message, long urls will push out the length of the dialog. Lets prevent that. if (message == null) { message = link.getCryptedUrl(); if (message.length() >= 120) { message = message.substring(0, 117) + "..."; } message = _JDT.T.jd_plugins_PluginUtils_askPassword(message); } final String password = askPassword(message, link.getDecrypterPassword()); return password; } public static String askPassword(final String message, final String defaultmessage) { return UserIO.getInstance().requestInputDialog(0, message, defaultmessage); } // public static void evalJSPacker(final Browser br) { // final String regex = "eval\\((.*?\\,\\{\\}\\))\\)"; // final String[] containers = br.getRegex(regex).getColumn(0); // // String htmlcode; // try { // htmlcode = br.getRequest().getHtmlCode(); // // for (String c : containers) { // final Context cx = ContextFactory.getGlobal().enterContext(); // final Scriptable scope = cx.initStandardObjects(); // c = c.replaceAll("return p\\}\\(", " return p} f(").replaceAll("function\\s*\\(p\\,a\\,c\\,k\\,e\\,d\\)", // "function f(p,a,c,k,e,d)"); // final Object result = cx.evaluateString(scope, c, "<cmd>", 1, null); // final String code = Context.toString(result); // htmlcode = htmlcode.replaceFirst(regex, code); // } // br.getRequest().setHtmlCode(htmlcode); // } catch (CharacterCodingException e) { // Log.exception(e); // } // } }
{'repo_name': 'mirror/jdownloader', 'stars': '155', 'repo_language': 'Java', 'file_name': 'ActionData.java', 'mime_type': 'text/plain', 'hash': 5620361866904587795, 'source_dataset': 'data'}
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSObject.h" @class NSMutableArray; @interface CalNetworkChangeNotifier : NSObject { struct __SCDynamicStore *_store; struct __CFRunLoopSource *_runLoopSource; NSMutableArray *_listeners; BOOL _pendingPost; BOOL _asleep; BOOL _checkedNetwork; BOOL _isNetworkUp; } + (BOOL)isHostReachable:(id)arg1; + (BOOL)isNetworkUp; + (void)disableNotifications; + (BOOL)enableNotifications; + (id)sharedNotifier; - (BOOL)isHostReachable:(id)arg1; - (BOOL)isNetworkUp; - (void)dealloc; - (void)removeListener:(id)arg1; - (void)addListener:(id)arg1; - (id)init; - (BOOL)_listenForChanges; - (void)_wakeUp:(id)arg1; - (void)_goingToSleep:(id)arg1; - (void)_sendNotification; - (void)_cancelAndRepostIfNecessary; - (void)_cancelPost; - (void)_delayPost; @end
{'repo_name': 'samdmarshall/OSXPrivateSDK', 'stars': '142', 'repo_language': 'C', 'file_name': 'NSTableViewDataSource-Protocol.h', 'mime_type': 'text/x-objective-c', 'hash': 1872239687910075598, 'source_dataset': 'data'}
package math // Mathematical constants. // Reference: http://oeis.org/Axxxxxx const ( E = 2.71828182845904523536028747135266249775724709369995957496696763 // A001113 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // A000796 Phi = 1.61803398874989484820458683436563811772030917980576286213544862 // A001622 Sqrt2 = 1.41421356237309504880168872420969807856967187537694807317667974 // A002193 SqrtE = 1.64872127070012814684865078781416357165377610071014801157507931 // A019774 SqrtPi = 1.77245385090551602729816748334114518279754945612238712821380779 // A002161 SqrtPhi = 1.27201964951406896425242246173749149171560804184009624861664038 // A139339 Ln2 = 0.693147180559945309417232121458176568075500134360255254120680009 // A002162 Log2E = 1 / Ln2 Ln10 = 2.30258509299404568401799145468436420760110148862877297603332790 // A002392 Log10E = 1 / Ln10 Log10Ef = float32(1) / float32(Ln10) ) // Floating-point limit values. // Max is the largest finite value representable by the type. // SmallestNonzero is the smallest positive, non-zero value representable by the type. const ( MaxFloat32 = 3.40282346638528859811704183484516925440e+38 // 2**127 * (2**24 - 1) / 2**23 SmallestNonzeroFloat32 = 1.401298464324817070923729583289916131280e-45 // 1 / 2**(127 - 1 + 23) MaxFloat64 = 1.797693134862315708145274237317043567981e+308 // 2**1023 * (2**53 - 1) / 2**52 SmallestNonzeroFloat64 = 4.940656458412465441765687928682213723651e-324 // 1 / 2**(1023 - 1 + 52) ) // Integer limit values. const ( MaxInt8 = 1<<7 - 1 MinInt8 = -1 << 7 MaxInt16 = 1<<15 - 1 MinInt16 = -1 << 15 MaxInt32 = 1<<31 - 1 MinInt32 = -1 << 31 MaxInt64 = 1<<63 - 1 MinInt64 = -1 << 63 MaxUint8 = 1<<8 - 1 MaxUint16 = 1<<16 - 1 MaxUint32 = 1<<32 - 1 MaxUint64 = 1<<64 - 1 )
{'repo_name': 'EngoEngine/engo', 'stars': '1227', 'repo_language': 'Go', 'file_name': 'go-build.sh', 'mime_type': 'text/x-shellscript', 'hash': 1802883330377836938, 'source_dataset': 'data'}
# [Neolotto ](http://alexa.amazon.com/#skills/amzn1.ask.skill.48f3e094-a245-4cbc-a1a7-02cdd506745c) ![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png)![0 stars](../../images/ic_star_border_black_18dp_1x.png) 0 null *** ### Skill Details * **Invocation Name:** null * **Category:** null * **ID:** amzn1.ask.skill.48f3e094-a245-4cbc-a1a7-02cdd506745c * **ASIN:** B01MQ1MV8C * **Author:** Neolotto * **Release Date:** October 29, 2016 @ 12:42:14 * **In-App Purchasing:** No
{'repo_name': 'dale3h/alexa-skills-list', 'stars': '201', 'repo_language': 'JavaScript', 'file_name': 'README.md', 'mime_type': 'text/plain', 'hash': 7980302814653308937, 'source_dataset': 'data'}
package getter import ( "compress/bzip2" "os" "path/filepath" ) // TarBzip2Decompressor is an implementation of Decompressor that can // decompress tar.bz2 files. type TarBzip2Decompressor struct{} func (d *TarBzip2Decompressor) Decompress(dst, src string, dir bool) error { // If we're going into a directory we should make that first mkdir := dst if !dir { mkdir = filepath.Dir(dst) } if err := os.MkdirAll(mkdir, 0755); err != nil { return err } // File first f, err := os.Open(src) if err != nil { return err } defer f.Close() // Bzip2 compression is second bzipR := bzip2.NewReader(f) return untar(bzipR, dst, src, dir) }
{'repo_name': 'terraform-providers/terraform-provider-github', 'stars': '214', 'repo_language': 'Go', 'file_name': 'organization_webhook.html.markdown', 'mime_type': 'text/plain', 'hash': -6607940961259945799, 'source_dataset': 'data'}
/* apps/progs.h */ /* automatically generated by progs.pl for openssl.c */ extern int verify_main(int argc, char *argv[]); extern int asn1parse_main(int argc, char *argv[]); extern int req_main(int argc, char *argv[]); extern int dgst_main(int argc, char *argv[]); extern int dh_main(int argc, char *argv[]); extern int dhparam_main(int argc, char *argv[]); extern int enc_main(int argc, char *argv[]); extern int passwd_main(int argc, char *argv[]); extern int gendh_main(int argc, char *argv[]); extern int errstr_main(int argc, char *argv[]); extern int ca_main(int argc, char *argv[]); extern int crl_main(int argc, char *argv[]); extern int rsa_main(int argc, char *argv[]); extern int rsautl_main(int argc, char *argv[]); extern int dsa_main(int argc, char *argv[]); extern int dsaparam_main(int argc, char *argv[]); extern int ec_main(int argc, char *argv[]); extern int ecparam_main(int argc, char *argv[]); extern int x509_main(int argc, char *argv[]); extern int genrsa_main(int argc, char *argv[]); extern int gendsa_main(int argc, char *argv[]); extern int genpkey_main(int argc, char *argv[]); extern int s_server_main(int argc, char *argv[]); extern int s_client_main(int argc, char *argv[]); extern int speed_main(int argc, char *argv[]); extern int s_time_main(int argc, char *argv[]); extern int version_main(int argc, char *argv[]); extern int pkcs7_main(int argc, char *argv[]); extern int cms_main(int argc, char *argv[]); extern int crl2pkcs7_main(int argc, char *argv[]); extern int sess_id_main(int argc, char *argv[]); extern int ciphers_main(int argc, char *argv[]); extern int nseq_main(int argc, char *argv[]); extern int pkcs12_main(int argc, char *argv[]); extern int pkcs8_main(int argc, char *argv[]); extern int pkey_main(int argc, char *argv[]); extern int pkeyparam_main(int argc, char *argv[]); extern int pkeyutl_main(int argc, char *argv[]); extern int spkac_main(int argc, char *argv[]); extern int smime_main(int argc, char *argv[]); extern int rand_main(int argc, char *argv[]); extern int engine_main(int argc, char *argv[]); extern int ocsp_main(int argc, char *argv[]); extern int prime_main(int argc, char *argv[]); extern int ts_main(int argc, char *argv[]); extern int srp_main(int argc, char *argv[]); #define FUNC_TYPE_GENERAL 1 #define FUNC_TYPE_MD 2 #define FUNC_TYPE_CIPHER 3 #define FUNC_TYPE_PKEY 4 #define FUNC_TYPE_MD_ALG 5 #define FUNC_TYPE_CIPHER_ALG 6 typedef struct { int type; const char *name; int (*func)(int argc, char *argv[]); } FUNCTION; DECLARE_LHASH_OF(FUNCTION); FUNCTION functions[] = { {FUNC_TYPE_GENERAL, "verify", verify_main}, {FUNC_TYPE_GENERAL, "asn1parse", asn1parse_main}, {FUNC_TYPE_GENERAL, "req", req_main}, {FUNC_TYPE_GENERAL, "dgst", dgst_main}, #ifndef OPENSSL_NO_DH {FUNC_TYPE_GENERAL, "dh", dh_main}, #endif #ifndef OPENSSL_NO_DH {FUNC_TYPE_GENERAL, "dhparam", dhparam_main}, #endif {FUNC_TYPE_GENERAL, "enc", enc_main}, {FUNC_TYPE_GENERAL, "passwd", passwd_main}, #ifndef OPENSSL_NO_DH {FUNC_TYPE_GENERAL, "gendh", gendh_main}, #endif {FUNC_TYPE_GENERAL, "errstr", errstr_main}, {FUNC_TYPE_GENERAL, "ca", ca_main}, {FUNC_TYPE_GENERAL, "crl", crl_main}, #ifndef OPENSSL_NO_RSA {FUNC_TYPE_GENERAL, "rsa", rsa_main}, #endif #ifndef OPENSSL_NO_RSA {FUNC_TYPE_GENERAL, "rsautl", rsautl_main}, #endif #ifndef OPENSSL_NO_DSA {FUNC_TYPE_GENERAL, "dsa", dsa_main}, #endif #ifndef OPENSSL_NO_DSA {FUNC_TYPE_GENERAL, "dsaparam", dsaparam_main}, #endif #ifndef OPENSSL_NO_EC {FUNC_TYPE_GENERAL, "ec", ec_main}, #endif #ifndef OPENSSL_NO_EC {FUNC_TYPE_GENERAL, "ecparam", ecparam_main}, #endif {FUNC_TYPE_GENERAL, "x509", x509_main}, #ifndef OPENSSL_NO_RSA {FUNC_TYPE_GENERAL, "genrsa", genrsa_main}, #endif #ifndef OPENSSL_NO_DSA {FUNC_TYPE_GENERAL, "gendsa", gendsa_main}, #endif {FUNC_TYPE_GENERAL, "genpkey", genpkey_main}, #if !defined(OPENSSL_NO_SOCK) {FUNC_TYPE_GENERAL, "s_server", s_server_main}, #endif #if !defined(OPENSSL_NO_SOCK) {FUNC_TYPE_GENERAL, "s_client", s_client_main}, #endif #ifndef OPENSSL_NO_SPEED {FUNC_TYPE_GENERAL, "speed", speed_main}, #endif #if !defined(OPENSSL_NO_SOCK) {FUNC_TYPE_GENERAL, "s_time", s_time_main}, #endif {FUNC_TYPE_GENERAL, "version", version_main}, {FUNC_TYPE_GENERAL, "pkcs7", pkcs7_main}, #ifndef OPENSSL_NO_CMS {FUNC_TYPE_GENERAL, "cms", cms_main}, #endif {FUNC_TYPE_GENERAL, "crl2pkcs7", crl2pkcs7_main}, {FUNC_TYPE_GENERAL, "sess_id", sess_id_main}, #if !defined(OPENSSL_NO_SOCK) {FUNC_TYPE_GENERAL, "ciphers", ciphers_main}, #endif {FUNC_TYPE_GENERAL, "nseq", nseq_main}, #if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1) {FUNC_TYPE_GENERAL, "pkcs12", pkcs12_main}, #endif {FUNC_TYPE_GENERAL, "pkcs8", pkcs8_main}, {FUNC_TYPE_GENERAL, "pkey", pkey_main}, {FUNC_TYPE_GENERAL, "pkeyparam", pkeyparam_main}, {FUNC_TYPE_GENERAL, "pkeyutl", pkeyutl_main}, {FUNC_TYPE_GENERAL, "spkac", spkac_main}, {FUNC_TYPE_GENERAL, "smime", smime_main}, {FUNC_TYPE_GENERAL, "rand", rand_main}, #ifndef OPENSSL_NO_ENGINE {FUNC_TYPE_GENERAL, "engine", engine_main}, #endif #ifndef OPENSSL_NO_OCSP {FUNC_TYPE_GENERAL, "ocsp", ocsp_main}, #endif {FUNC_TYPE_GENERAL, "prime", prime_main}, {FUNC_TYPE_GENERAL, "ts", ts_main}, #ifndef OPENSSL_NO_SRP {FUNC_TYPE_GENERAL, "srp", srp_main}, #endif #ifndef OPENSSL_NO_MD2 {FUNC_TYPE_MD, "md2", dgst_main}, #endif #ifndef OPENSSL_NO_MD4 {FUNC_TYPE_MD, "md4", dgst_main}, #endif #ifndef OPENSSL_NO_MD5 {FUNC_TYPE_MD, "md5", dgst_main}, #endif #ifndef OPENSSL_NO_SHA {FUNC_TYPE_MD, "sha", dgst_main}, #endif #ifndef OPENSSL_NO_SHA1 {FUNC_TYPE_MD, "sha1", dgst_main}, #endif #ifndef OPENSSL_NO_MDC2 {FUNC_TYPE_MD, "mdc2", dgst_main}, #endif #ifndef OPENSSL_NO_RMD160 {FUNC_TYPE_MD, "rmd160", dgst_main}, #endif #ifndef OPENSSL_NO_AES {FUNC_TYPE_CIPHER, "aes-128-cbc", enc_main}, #endif #ifndef OPENSSL_NO_AES {FUNC_TYPE_CIPHER, "aes-128-ecb", enc_main}, #endif #ifndef OPENSSL_NO_AES {FUNC_TYPE_CIPHER, "aes-192-cbc", enc_main}, #endif #ifndef OPENSSL_NO_AES {FUNC_TYPE_CIPHER, "aes-192-ecb", enc_main}, #endif #ifndef OPENSSL_NO_AES {FUNC_TYPE_CIPHER, "aes-256-cbc", enc_main}, #endif #ifndef OPENSSL_NO_AES {FUNC_TYPE_CIPHER, "aes-256-ecb", enc_main}, #endif #ifndef OPENSSL_NO_CAMELLIA {FUNC_TYPE_CIPHER, "camellia-128-cbc", enc_main}, #endif #ifndef OPENSSL_NO_CAMELLIA {FUNC_TYPE_CIPHER, "camellia-128-ecb", enc_main}, #endif #ifndef OPENSSL_NO_CAMELLIA {FUNC_TYPE_CIPHER, "camellia-192-cbc", enc_main}, #endif #ifndef OPENSSL_NO_CAMELLIA {FUNC_TYPE_CIPHER, "camellia-192-ecb", enc_main}, #endif #ifndef OPENSSL_NO_CAMELLIA {FUNC_TYPE_CIPHER, "camellia-256-cbc", enc_main}, #endif #ifndef OPENSSL_NO_CAMELLIA {FUNC_TYPE_CIPHER, "camellia-256-ecb", enc_main}, #endif {FUNC_TYPE_CIPHER, "base64", enc_main}, #ifdef ZLIB {FUNC_TYPE_CIPHER, "zlib", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des3", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "desx", enc_main}, #endif #ifndef OPENSSL_NO_IDEA {FUNC_TYPE_CIPHER, "idea", enc_main}, #endif #ifndef OPENSSL_NO_SEED {FUNC_TYPE_CIPHER, "seed", enc_main}, #endif #ifndef OPENSSL_NO_RC4 {FUNC_TYPE_CIPHER, "rc4", enc_main}, #endif #ifndef OPENSSL_NO_RC4 {FUNC_TYPE_CIPHER, "rc4-40", enc_main}, #endif #ifndef OPENSSL_NO_RC2 {FUNC_TYPE_CIPHER, "rc2", enc_main}, #endif #ifndef OPENSSL_NO_BF {FUNC_TYPE_CIPHER, "bf", enc_main}, #endif #ifndef OPENSSL_NO_CAST {FUNC_TYPE_CIPHER, "cast", enc_main}, #endif #ifndef OPENSSL_NO_RC5 {FUNC_TYPE_CIPHER, "rc5", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-ecb", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-ede", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-ede3", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-cbc", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-ede-cbc", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-ede3-cbc", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-cfb", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-ede-cfb", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-ede3-cfb", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-ofb", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-ede-ofb", enc_main}, #endif #ifndef OPENSSL_NO_DES {FUNC_TYPE_CIPHER, "des-ede3-ofb", enc_main}, #endif #ifndef OPENSSL_NO_IDEA {FUNC_TYPE_CIPHER, "idea-cbc", enc_main}, #endif #ifndef OPENSSL_NO_IDEA {FUNC_TYPE_CIPHER, "idea-ecb", enc_main}, #endif #ifndef OPENSSL_NO_IDEA {FUNC_TYPE_CIPHER, "idea-cfb", enc_main}, #endif #ifndef OPENSSL_NO_IDEA {FUNC_TYPE_CIPHER, "idea-ofb", enc_main}, #endif #ifndef OPENSSL_NO_SEED {FUNC_TYPE_CIPHER, "seed-cbc", enc_main}, #endif #ifndef OPENSSL_NO_SEED {FUNC_TYPE_CIPHER, "seed-ecb", enc_main}, #endif #ifndef OPENSSL_NO_SEED {FUNC_TYPE_CIPHER, "seed-cfb", enc_main}, #endif #ifndef OPENSSL_NO_SEED {FUNC_TYPE_CIPHER, "seed-ofb", enc_main}, #endif #ifndef OPENSSL_NO_RC2 {FUNC_TYPE_CIPHER, "rc2-cbc", enc_main}, #endif #ifndef OPENSSL_NO_RC2 {FUNC_TYPE_CIPHER, "rc2-ecb", enc_main}, #endif #ifndef OPENSSL_NO_RC2 {FUNC_TYPE_CIPHER, "rc2-cfb", enc_main}, #endif #ifndef OPENSSL_NO_RC2 {FUNC_TYPE_CIPHER, "rc2-ofb", enc_main}, #endif #ifndef OPENSSL_NO_RC2 {FUNC_TYPE_CIPHER, "rc2-64-cbc", enc_main}, #endif #ifndef OPENSSL_NO_RC2 {FUNC_TYPE_CIPHER, "rc2-40-cbc", enc_main}, #endif #ifndef OPENSSL_NO_BF {FUNC_TYPE_CIPHER, "bf-cbc", enc_main}, #endif #ifndef OPENSSL_NO_BF {FUNC_TYPE_CIPHER, "bf-ecb", enc_main}, #endif #ifndef OPENSSL_NO_BF {FUNC_TYPE_CIPHER, "bf-cfb", enc_main}, #endif #ifndef OPENSSL_NO_BF {FUNC_TYPE_CIPHER, "bf-ofb", enc_main}, #endif #ifndef OPENSSL_NO_CAST {FUNC_TYPE_CIPHER, "cast5-cbc", enc_main}, #endif #ifndef OPENSSL_NO_CAST {FUNC_TYPE_CIPHER, "cast5-ecb", enc_main}, #endif #ifndef OPENSSL_NO_CAST {FUNC_TYPE_CIPHER, "cast5-cfb", enc_main}, #endif #ifndef OPENSSL_NO_CAST {FUNC_TYPE_CIPHER, "cast5-ofb", enc_main}, #endif #ifndef OPENSSL_NO_CAST {FUNC_TYPE_CIPHER, "cast-cbc", enc_main}, #endif #ifndef OPENSSL_NO_RC5 {FUNC_TYPE_CIPHER, "rc5-cbc", enc_main}, #endif #ifndef OPENSSL_NO_RC5 {FUNC_TYPE_CIPHER, "rc5-ecb", enc_main}, #endif #ifndef OPENSSL_NO_RC5 {FUNC_TYPE_CIPHER, "rc5-cfb", enc_main}, #endif #ifndef OPENSSL_NO_RC5 {FUNC_TYPE_CIPHER, "rc5-ofb", enc_main}, #endif {0, NULL, NULL} };
{'repo_name': 'mceSystems/node-jsc', 'stars': '178', 'repo_language': 'JavaScript', 'file_name': 'dnt_helper.js', 'mime_type': 'text/plain', 'hash': 3213440190276874106, 'source_dataset': 'data'}
<?php /* * * ____ _ _ __ __ _ __ __ ____ * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * @author PocketMine Team * @link http://www.pocketmine.net/ * * */ namespace pocketmine\scheduler; /** * Allows the creation of simple callbacks with extra data * The last parameter in the callback will be this object * * If you want to do a task in a Plugin, consider extending PluginTask to your needs * * @deprecated * Do NOT use this anymore, it was deprecated a long time ago at PocketMine * and will be removed at some stage in the future. */ class CallbackTask extends Task{ /** @var callable */ protected $callable; /** @var array */ protected $args; /** * @param callable $callable * @param array $args */ public function __construct(callable $callable, array $args = []){ $this->callable = $callable; $this->args = $args; $this->args[] = $this; } /** * @return callable */ public function getCallable(){ return $this->callable; } public function onRun($currentTicks){ call_user_func_array($this->callable, $this->args); } }
{'repo_name': 'iTXTech/Genisys', 'stars': '431', 'repo_language': 'PHP', 'file_name': 'travis.sh', 'mime_type': 'text/x-shellscript', 'hash': -6646268536334756156, 'source_dataset': 'data'}
/** * * dmq module - distributed message queue * * Copyright (C) 2011 Bucur Marius - Ovidiu * * This file is part of Kamailio, a free SIP server. * * Kamailio 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; either version 2 of the License, or * (at your option) any later version * * Kamailio 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "dmq.h" #include "bind_dmq.h" #include "peer.h" #include "dmq_funcs.h" /** * @brief bind dmq module api */ int bind_dmq(dmq_api_t *api) { api->register_dmq_peer = register_dmq_peer; api->send_message = dmq_send_message; api->bcast_message = bcast_dmq_message; api->find_dmq_node_uri = find_dmq_node_uri2; return 0; }
{'repo_name': 'kamailio/kamailio', 'stars': '1178', 'repo_language': 'C', 'file_name': 'dbschema.dtd', 'mime_type': 'text/plain', 'hash': 7511673293651744826, 'source_dataset': 'data'}
#!perl use strict; use warnings; use Test::More tests => 196; use lib 't'; use Util; prep_environment(); my $file = 't/text/raven.txt'; my $word = 'nevermore'; # Order doesn't matter. They are reported in alphabetical order. for my $opt ( qw( -p --proximate ) ) { are_mutually_exclusive( '-f', $opt, ['-f', $opt] ); are_mutually_exclusive( '-f', $opt, [$opt, '-f'] ); } # Check for abbreviations. https://github.com/beyondgrep/ack3/issues/57 for my $opt ( qw( --pro --prox --proxima --proximat --proximate ) ) { are_mutually_exclusive( '-f', '--proximate', ['-f', $opt, '4'], ['-f', "$opt=4"], ); } # XXX Should also handle --files-with-matches and --files-without-matches. See https://github.com/beyondgrep/ack3/issues/57 are_mutually_exclusive('-l', '-L', ['-l', '-L', $word, $file]); for my $opt ( qw( -l -L ) ) { are_mutually_exclusive( $opt, '-o', [$opt, '-o', $word, $file] ); are_mutually_exclusive( $opt, '--passthru', [$opt, '--passthru', $word, $file] ); are_mutually_exclusive( $opt, '--output', [$opt, '--output', '$&', $word, $file] ); are_mutually_exclusive( $opt, '--output', [$opt, '--output=$&', $word, $file] ); are_mutually_exclusive( $opt, '-h', [$opt, '-h', $word, $file] ); are_mutually_exclusive( $opt, '--with-filename', [$opt, '--with-filename', $word, $file] ); are_mutually_exclusive( $opt, '--no-filename', [$opt, '--no-filename', $word, $file] ); are_mutually_exclusive( $opt, '--column', [$opt, '--column', $word, $file] ); are_mutually_exclusive( $opt, '-A', [$opt, '-A', 1, $word, $file] ); are_mutually_exclusive( $opt, '--after-context', [$opt, '--after-context', 1, $word, $file] ); are_mutually_exclusive( $opt, '--after-context', [$opt, '--after-context=1', $word, $file] ); are_mutually_exclusive( $opt, '-B', [$opt, '-B', 1, $word, $file] ); are_mutually_exclusive( $opt, '--before-context', [$opt, '--before-context', 1, $word, $file] ); are_mutually_exclusive( $opt, '--before-context', [$opt, '--before-context=1', $word, $file] ); are_mutually_exclusive( $opt, '-C', [$opt, '-C', 1, $word, $file] ); are_mutually_exclusive( $opt, '--context', [$opt, '--context', 1, $word, $file] ); are_mutually_exclusive( $opt, '--context', [$opt, '--context=1', $word, $file] ); are_mutually_exclusive( $opt, '--heading', [$opt, '--heading', $word, $file] ); are_mutually_exclusive( $opt, '--break', [$opt, '--break', $word, $file] ); are_mutually_exclusive( $opt, '--group', [$opt, '--group', $word, $file] ); are_mutually_exclusive( $opt, '-f', [$opt, '-f', $file] ); are_mutually_exclusive( $opt, '-g', [$opt, '-g', $word, $file] ); are_mutually_exclusive( $opt, '--show-types', [$opt, '--show-types', $word, $file] ); } # -o are_mutually_exclusive( '-o', '--output', ['-o', '--output', '$&', $word, $file], ['-o', '--output=$&', $word, $file], ); are_mutually_exclusive('-o', '-c', ['-o', '-c', $word, $file]); are_mutually_exclusive('-o', '--count', ['-o', '--count', $word, $file]); are_mutually_exclusive('-o', '--column', ['-o', '--column', $word, $file]); are_mutually_exclusive('-o', '-A', ['-o', '-A', 1, $word, $file]); are_mutually_exclusive('-o', '--after-context', ['-o', '--after-context', 1, $word, $file]); are_mutually_exclusive('-o', '--after-context', ['-o', '--after-context=1', $word, $file]); are_mutually_exclusive('-o', '-B', ['-o', '-B', 1, $word, $file]); are_mutually_exclusive('-o', '--before-context', ['-o', '--before-context', 1, $word, $file]); are_mutually_exclusive('-o', '--before-context', ['-o', '--before-context=1', $word, $file]); are_mutually_exclusive('-o', '-C', ['-o', '-C', 1, $word, $file]); are_mutually_exclusive('-o', '--context', ['-o', '--context', 1, $word, $file]); are_mutually_exclusive('-o', '--context', ['-o', '--context=1', $word, $file]); are_mutually_exclusive('-o', '-f', ['-o', '-f', $word, $file]); are_mutually_exclusive('-o', '--passthru', ['-o', '--passthru', $word, $file]); # --passthru are_mutually_exclusive('--passthru', '--output', ['--passthru', '--output', '$&', $word, $file]); are_mutually_exclusive('--passthru', '--output', ['--passthru', '--output=$&', $word, $file]); are_mutually_exclusive('--passthru', '-m', ['--passthru', '-m', 1, $word, $file]); are_mutually_exclusive('--passthru', '--max-count', ['--passthru', '--max-count', 1, $word, $file]); are_mutually_exclusive('--passthru', '--max-count', ['--passthru', '--max-count=1', $word, $file]); are_mutually_exclusive('--passthru', '-1', ['--passthru', '-1', $word, $file]); are_mutually_exclusive('--passthru', '-c', ['--passthru', '-c', $word, $file]); are_mutually_exclusive('--passthru', '--count', ['--passthru', '--count', $word, $file]); are_mutually_exclusive('--passthru', '-A', ['--passthru', '-A', 1, $word, $file]); are_mutually_exclusive('--passthru', '--after-context', ['--passthru', '--after-context', 1, $word, $file]); are_mutually_exclusive('--passthru', '--after-context', ['--passthru', '--after-context=1', $word, $file]); are_mutually_exclusive('--passthru', '-B', ['--passthru', '-B', 1, $word, $file]); are_mutually_exclusive('--passthru', '--before-context', ['--passthru', '--before-context', 1, $word, $file]); are_mutually_exclusive('--passthru', '--before-context', ['--passthru', '--before-context=1', $word, $file]); are_mutually_exclusive('--passthru', '-C', ['--passthru', '-C', 1, $word, $file]); are_mutually_exclusive('--passthru', '--context', ['--passthru', '--context', 1, $word, $file]); are_mutually_exclusive('--passthru', '--context', ['--passthru', '--context=1', $word, $file]); are_mutually_exclusive('--passthru', '-f', ['--passthru', '-f', $word, $file]); are_mutually_exclusive('--passthru', '-g', ['--passthru', '-g', $word, $file]); are_mutually_exclusive('--passthru', '--column', ['--passthru', '--column', $word, $file]); are_mutually_exclusive('--passthru', '-v', ['--passthru', '-v', $word, $file]); are_mutually_exclusive('--passthru', '-o', ['--passthru', '-o', $word, $file]); are_mutually_exclusive('--passthru', '--output', ['--passthru', '--output', $word, $file]); # --output for my $opt ( qw( -f -g -c --count ) ) { are_mutually_exclusive('--output', $opt, ['--output', '$&', $opt, $word, $file], ['--output=$&', $opt, $word, $file], ); } are_mutually_exclusive('--output', '-A', ['--output=$&', '-A2', $word, $file]); are_mutually_exclusive('--output', '-B', ['--output=$&', '-B2', $word, $file]); are_mutually_exclusive('--output', '-C', ['--output=$&', '-C2', $word, $file]); are_mutually_exclusive('--output', '--after-context', ['--output=$&', '--after-context=2', $word, $file]); are_mutually_exclusive('--output', '--before-context', ['--output=$&', '--before-context=2', $word, $file]); are_mutually_exclusive('--output', '--context', ['--output=$&', '--context=2', $word, $file]); # --match for my $opt ( qw( -f -g ) ) { are_mutually_exclusive('--match', $opt, ['--match', $word, $opt, $file], ['--match=science', $opt, $file], ); } # --max-count for my $opt ( qw( -1 -c -f -g ) ) { are_mutually_exclusive( '-m', $opt, ['-m', 1, $opt, $word, $file] ); are_mutually_exclusive( '--max-count', $opt, ['--max-count', 1, $opt, $word, $file], ['--max-count=1', $opt, $word, $file], ); } for my $opt ( qw( -h --no-filename ) ) { are_mutually_exclusive( $opt, '-f', [$opt, '-f', $word, $file] ); are_mutually_exclusive( $opt, '-g', [$opt, '-g', $word, $file] ); } # -H/--with-filename for my $opt ( qw( -H --with-filename ) ) { are_mutually_exclusive( $opt, '-f', [ $opt, '-f', $word, $file] ); are_mutually_exclusive( $opt, '-g', [ $opt, '-g', $word, $file] ); } # -c/--count for my $opt ( qw( -c --count ) ) { are_mutually_exclusive( $opt, '--column', [ $opt, '--column', $word, $file ] ); are_mutually_exclusive( $opt, '-A', [ $opt, '-A', 1, $word, $file ] ); are_mutually_exclusive( $opt, '--after-context', [ $opt, '--after-context', 1, $word, $file ] ); are_mutually_exclusive( $opt, '-B', [ $opt, '-B', 1, $word, $file ] ); are_mutually_exclusive( $opt, '--before-context', [ $opt, '--before-context', 1, $word, $file ] ); are_mutually_exclusive( $opt, '-C', [ $opt, '-C', 1, $word, $file ] ); are_mutually_exclusive( $opt, '--context', [ $opt, '--context', 1, $word, $file ] ); are_mutually_exclusive( $opt, '--heading', [ $opt, '--heading', $word, $file ] ); are_mutually_exclusive( $opt, '--group', [ $opt, '--group', $word, $file ] ); are_mutually_exclusive( $opt, '--break', [ $opt, '--break', $word, $file ] ); are_mutually_exclusive( $opt, '-f', [ $opt, '-f', $word, $file ] ); are_mutually_exclusive( $opt, '-g', [ $opt, '-g', $word, $file ] ); } # -A/-B/-C/--after-context/--before-context/--context for my $opt ( qw( -A -B -C --after-context --before-context --context ) ) { are_mutually_exclusive( $opt, '-f', [$opt, 1, '-f', $word, $file] ); are_mutually_exclusive( $opt, '-g', [$opt, 1, '-g', $word, $file] ); are_mutually_exclusive( $opt, '-p', [$opt, 1, '-p', $word, $file] ); } # -f/-g are_mutually_exclusive('-f', '-g', ['-f', '-g', $word, $file]); for my $opt ( qw( -f -g ) ) { are_mutually_exclusive( $opt, '--group', [$opt, '--group', $word, $file] ); are_mutually_exclusive( $opt, '--heading', [$opt, '--heading', $word, $file] ); are_mutually_exclusive( $opt, '--break', [$opt, '--break', $word, $file] ); are_mutually_exclusive( $opt, '--column', [$opt, '--column', $word, $file] ); } # -x are_mutually_exclusive( '-x', '--files-from', ['-x', '--files-from', $word, $file] ); for my $opt ( qw( -f -g ) ) { are_mutually_exclusive( $opt, '-x', [$opt, '-x', $word, $file] ); are_mutually_exclusive( $opt, '--files-from', [$opt, '--files-from', $word, $file] ); } subtest q{Verify that "options" that follow -- aren't factored into the mutual exclusivity} => sub { my ( $stdout, $stderr ) = run_ack_with_stderr('-A', 5, $word, $file, '--', '-l'); ok(@{$stdout} > 0, 'Some lines should appear on standard output'); is(scalar(@{$stderr}), 1, 'A single line should be present on standard error'); like($stderr->[0], qr/No such file or directory/, 'The error message should indicate a missing file (-l is a filename here, not an option)'); is(get_rc(), 0, 'The ack command should not fail'); }; subtest q{Verify that mutex options in different sources don't cause a problem} => sub { my $ackrc = <<'HERE'; --group HERE my @stdout = run_ack('--count', $file, { ackrc => \$ackrc, }); ok(@stdout > 0, 'Some lines should appear on standard output'); }; done_testing(); # Do this without system(). sub are_mutually_exclusive { local $Test::Builder::Level = $Test::Builder::Level + 1; my $opt1 = shift; my $opt2 = shift; my @argsets = @_; @argsets or die 'Must pass argsets'; for my $argset ( @argsets ) { my @args = @{$argset}; my ( $stdout, $stderr ) = run_ack_with_stderr(@args); subtest subtest_name( $opt1, $opt2, $argset ) => sub { plan tests => 4; isnt( get_rc(), 0, 'The ack command should fail' ); is_empty_array( $stdout, 'No lines should be present on standard output' ); is( scalar(@{$stderr}), 1, 'A single line should be present on standard error' ); my $opt1_re = quotemeta($opt1); my $opt2_re = quotemeta($opt2); my $error = $stderr->[0] || ''; # avoid undef warnings if ( $error =~ /Options '$opt1_re' and '$opt2_re' can't be used together/ || $error =~ /Options '$opt2_re' and '$opt1_re' can't be used together/ ) { pass( qq{Error message resembles "Options '$opt1' and '$opt2' can't be used together"} ); } else { fail( qq{Error message does not resemble "Options '$opt1' and '$opt2' can't be used together"} ); diag("Error message: '$error'"); } }; } return; }
{'repo_name': 'beyondgrep/ack3', 'stars': '252', 'repo_language': 'Perl', 'file_name': 'ack-v3.3.0', 'mime_type': 'text/x-perl', 'hash': 4736764863764228753, 'source_dataset': 'data'}
/////////////////////////////////////////////////////////////////////// // File: tfnetwork.h // Description: Encapsulation of an entire tensorflow graph as a // Tesseract Network. // Author: Ray Smith // Created: Fri Feb 26 09:35:29 PST 2016 // // (C) Copyright 2016, Google Inc. // 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. /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_LSTM_TFNETWORK_H_ #define TESSERACT_LSTM_TFNETWORK_H_ #ifdef INCLUDE_TENSORFLOW #include <memory> #include <string> #include "network.h" #include "static_shape.h" #include "tfnetwork.proto.h" #include "third_party/tensorflow/core/framework/graph.pb.h" #include "third_party/tensorflow/core/public/session.h" namespace tesseract { class TFNetwork : public Network { public: explicit TFNetwork(const STRING& name); virtual ~TFNetwork(); // Returns the required shape input to the network. virtual StaticShape InputShape() const { return input_shape_; } // Returns the shape output from the network given an input shape (which may // be partially unknown ie zero). virtual StaticShape OutputShape(const StaticShape& input_shape) const { return output_shape_; } virtual STRING spec() const { return spec_.c_str(); } // Deserializes *this from a serialized TFNetwork proto. Returns 0 if failed, // otherwise the global step of the serialized graph. int InitFromProtoStr(const string& proto_str); // The number of classes in this network should be equal to those in the // recoder_ in LSTMRecognizer. int num_classes() const { return output_shape_.depth(); } // Writes to the given file. Returns false in case of error. // Should be overridden by subclasses, but called by their Serialize. virtual bool Serialize(TFile* fp) const; // Reads from the given file. Returns false in case of error. // Should be overridden by subclasses, but NOT called by their DeSerialize. virtual bool DeSerialize(TFile* fp); // Runs forward propagation of activations on the input line. // See Network for a detailed discussion of the arguments. virtual void Forward(bool debug, const NetworkIO& input, const TransposedArray* input_transpose, NetworkScratch* scratch, NetworkIO* output); private: int InitFromProto(); // The original network definition for reference. string spec_; // Input tensor parameters. StaticShape input_shape_; // Output tensor parameters. StaticShape output_shape_; // The tensor flow graph is contained in here. std::unique_ptr<tensorflow::Session> session_; // The serialized graph is also contained in here. TFNetworkModel model_proto_; }; } // namespace tesseract. #endif // ifdef INCLUDE_TENSORFLOW #endif // TESSERACT_TENSORFLOW_TFNETWORK_H_
{'repo_name': 'evermeer/PassportScanner', 'stars': '393', 'repo_language': 'Swift', 'file_name': 'IDEWorkspaceChecks.plist', 'mime_type': 'text/xml', 'hash': 3375545724953092799, 'source_dataset': 'data'}
/** * Copyright (c) 2013 Puppet Labs, Inc. and other contributors, as listed below. * 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Puppet Labs */ package com.puppetlabs.geppetto.pp.impl; import com.puppetlabs.geppetto.pp.LiteralNameOrReference; import com.puppetlabs.geppetto.pp.PPPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Literal Name Or Reference</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link com.puppetlabs.geppetto.pp.impl.LiteralNameOrReferenceImpl#getValue <em>Value</em>}</li> * </ul> * </p> * * @generated */ public class LiteralNameOrReferenceImpl extends LiteralExpressionImpl implements LiteralNameOrReference { /** * The default value of the '{@link #getValue() <em>Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @see #getValue() * @generated * @ordered */ protected static final String VALUE_EDEFAULT = null; /** * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @see #getValue() * @generated * @ordered */ protected String value = VALUE_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ protected LiteralNameOrReferenceImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch(featureID) { case PPPackage.LITERAL_NAME_OR_REFERENCE__VALUE: return getValue(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public boolean eIsSet(int featureID) { switch(featureID) { case PPPackage.LITERAL_NAME_OR_REFERENCE__VALUE: return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch(featureID) { case PPPackage.LITERAL_NAME_OR_REFERENCE__VALUE: setValue((String) newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override protected EClass eStaticClass() { return PPPackage.Literals.LITERAL_NAME_OR_REFERENCE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public void eUnset(int featureID) { switch(featureID) { case PPPackage.LITERAL_NAME_OR_REFERENCE__VALUE: setValue(VALUE_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public String getValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public void setValue(String newValue) { String oldValue = value; value = newValue; if(eNotificationRequired()) eNotify(new ENotificationImpl( this, Notification.SET, PPPackage.LITERAL_NAME_OR_REFERENCE__VALUE, oldValue, value)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ @Override public String toString() { if(eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (value: "); result.append(value); result.append(')'); return result.toString(); } } // LiteralNameOrReferenceImpl
{'repo_name': 'cloudsmith/geppetto', 'stars': '183', 'repo_language': 'Java', 'file_name': 'org.eclipse.core.resources.prefs', 'mime_type': 'text/plain', 'hash': 3082992903636145407, 'source_dataset': 'data'}
package reform import ( "context" "database/sql" "time" ) // TXInterface is a subset of *sql.Tx used by reform. // Can be used together with NewTXFromInterface for easier integration with existing code or for passing test doubles. // // It may grow and shrink over time to include only needed *sql.Tx methods, // and is excluded from SemVer compatibility guarantees. type TXInterface interface { DBTXContext Commit() error Rollback() error // Deprecated: do not use, it will be removed in v1.5. DBTX } // check interface var _ TXInterface = (*sql.Tx)(nil) // TX represents a SQL database transaction. type TX struct { *Querier tx TXInterface } // NewTX creates new TX object for given SQL database transaction. // Logger can be nil. func NewTX(tx *sql.Tx, dialect Dialect, logger Logger) *TX { return NewTXFromInterface(tx, dialect, logger) } // NewTXFromInterface creates new TX object for given TXInterface. // Can be used for easier integration with existing code or for passing test doubles. // Logger can be nil. func NewTXFromInterface(tx TXInterface, dialect Dialect, logger Logger) *TX { return newTX(context.Background(), tx, dialect, logger) } func newTX(ctx context.Context, tx TXInterface, dialect Dialect, logger Logger) *TX { return &TX{ Querier: newQuerier(ctx, tx, "", dialect, logger), tx: tx, } } // Commit commits the transaction. func (tx *TX) Commit() error { tx.logBefore("COMMIT", nil) start := time.Now() err := tx.tx.Commit() tx.logAfter("COMMIT", nil, time.Since(start), err) return err } // Rollback aborts the transaction. func (tx *TX) Rollback() error { tx.logBefore("ROLLBACK", nil) start := time.Now() err := tx.tx.Rollback() tx.logAfter("ROLLBACK", nil, time.Since(start), err) return err } // check interfaces var ( _ DBTX = (*TX)(nil) _ DBTXContext = (*TX)(nil) )
{'repo_name': 'go-reform/reform', 'stars': '874', 'repo_language': 'Go', 'file_name': 'base.go', 'mime_type': 'text/plain', 'hash': 845560013959048095, 'source_dataset': 'data'}
# # 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. # """ Field names for de-serializing json representation of Models """ class FieldNames: ID = 'id' NAME = 'name' EMAIL_ADDRESS = 'emailAddress' CREDIT_CARD = 'creditCard' CITY = "city" STATE = "state" DATE_TIME = "dateTime" EXTRA = "extra" ITEM_NAME = "itemName" DESCRIPTION = "description" INITIAL_BID = "initialBid" RESERVE = "reserve" EXPIRES = "expires" SELLER = "seller" CATEGORY = "category" AUCTION = "auction" BIDDER = "bidder" PRICE = "price"
{'repo_name': 'apache/beam', 'stars': '4117', 'repo_language': 'Java', 'file_name': 'get-licenses.sh', 'mime_type': 'text/x-shellscript', 'hash': 5418456399416330279, 'source_dataset': 'data'}
# #18 Convert A Hex String To RGB 5급 짜리 문젠데 엄청 쉬운거 나왔다. `#124232` 같은 색을 나타내는 rgb 문자열을 받아서 r, g, b int 값을 가지는 객체로 리턴하는 문제다. ## 1. 내 코드 ```js function hexStringToRGB(hexString) { return { r : parseInt(hexString.slice(1, 3), 16), g : parseInt(hexString.slice(3, 5), 16), b : parseInt(hexString.slice(5), 16) } } ``` 단순하게 slice로 부분 부분 끊어서 16진수로 parseInt 썼다. ## 2. 다른 해답 가장 많이 나온 해답, 최고 득표 해답은 나와 같았고 아래와 같은 해답도 있었다. ```js function hexStringToRGB(hexString) { var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hexString); return { r: parseInt(rgb[1], 16), g: parseInt(rgb[2], 16), b: parseInt(rgb[3], 16) }; } ``` - 정규표현식 활용했다. `#` 이후부터 탐색을 시작하고, `a-f` 그리고 `숫자`가 2개만 나오는 그룹을 세 개 찾았다. 마지막에 `$`을 넣어서 문장의 끝임을 명시했고, `i`로 대소문자 구분을 없앴다. - `REGEX.exec(str)` : 정규표현식을 매개변수의 문자열에 적용시키는 함수다. - 그래서 결과값을 하나씩 객체에 담아 리턴한다. rgb의 첫 번째 원소는 매칭된 전체 문자열이다. 그래서 인덱스가 1, 2, 3이다.
{'repo_name': 'Gyubin/TIL', 'stars': '102', 'repo_language': 'JavaScript', 'file_name': 'cpp_fundamental.md', 'mime_type': 'text/x-c++', 'hash': 7139379619310306460, 'source_dataset': 'data'}
/* * jQuery timepicker addon * By: Trent Richardson [http://trentrichardson.com] * Version 0.9.7 * Last Modified: 10/02/2011 * * Copyright 2011 Trent Richardson * Dual licensed under the MIT and GPL licenses. * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt * * HERES THE CSS: * .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } * .ui-timepicker-div dl { text-align: left; } * .ui-timepicker-div dl dt { height: 25px; } * .ui-timepicker-div dl dd { margin: -25px 10px 10px 65px; } * .ui-timepicker-div td { font-size: 90%; } * .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; } */ (function($) { $.extend($.ui, { timepicker: { version: "0.9.7" } }); /* Time picker manager. Use the singleton instance of this class, $.timepicker, to interact with the time picker. Settings for (groups of) time pickers are maintained in an instance object, allowing multiple different settings on the same page. */ function Timepicker() { this.regional = []; // Available regional settings, indexed by language code this.regional[''] = { // Default regional settings currentText: 'Now', closeText: 'Done', ampm: false, amNames: ['AM', 'A'], pmNames: ['PM', 'P'], timeFormat: 'hh:mm tt', timeSuffix: '', timeOnlyTitle: 'Choose Time', timeText: 'Time', hourText: 'Hour', minuteText: 'Minute', secondText: 'Second', millisecText: 'Millisecond', timezoneText: 'Time Zone' }; this._defaults = { // Global defaults for all the datetime picker instances showButtonPanel: true, timeOnly: false, showHour: true, showMinute: true, showSecond: false, showMillisec: false, showTimezone: false, showTime: true, stepHour: 0.05, stepMinute: 0.05, stepSecond: 0.05, stepMillisec: 0.5, hour: 0, minute: 0, second: 0, millisec: 0, timezone: '+0000', hourMin: 0, minuteMin: 0, secondMin: 0, millisecMin: 0, hourMax: 23, minuteMax: 59, secondMax: 59, millisecMax: 999, minDateTime: null, maxDateTime: null, onSelect: null, hourGrid: 0, minuteGrid: 0, secondGrid: 0, millisecGrid: 0, alwaysSetTime: true, separator: ' ', altFieldTimeOnly: true, showTimepicker: true, timezoneIso8609: false, timezoneList: null }; $.extend(this._defaults, this.regional['']); } $.extend(Timepicker.prototype, { $input: null, $altInput: null, $timeObj: null, inst: null, hour_slider: null, minute_slider: null, second_slider: null, millisec_slider: null, timezone_select: null, hour: 0, minute: 0, second: 0, millisec: 0, timezone: '+0000', hourMinOriginal: null, minuteMinOriginal: null, secondMinOriginal: null, millisecMinOriginal: null, hourMaxOriginal: null, minuteMaxOriginal: null, secondMaxOriginal: null, millisecMaxOriginal: null, ampm: '', formattedDate: '', formattedTime: '', formattedDateTime: '', timezoneList: null, /* Override the default settings for all instances of the time picker. @param settings object - the new settings to use as defaults (anonymous object) @return the manager object */ setDefaults: function(settings) { extendRemove(this._defaults, settings || {}); return this; }, //######################################################################## // Create a new Timepicker instance //######################################################################## _newInst: function($input, o) { var tp_inst = new Timepicker(), inlineSettings = {}; for (var attrName in this._defaults) { var attrValue = $input.attr('time:' + attrName); if (attrValue) { try { inlineSettings[attrName] = eval(attrValue); } catch (err) { inlineSettings[attrName] = attrValue; } } } tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, o, { beforeShow: function(input, dp_inst) { if ($.isFunction(o.beforeShow)) o.beforeShow(input, dp_inst, tp_inst); }, onChangeMonthYear: function(year, month, dp_inst) { // Update the time as well : this prevents the time from disappearing from the $input field. tp_inst._updateDateTime(dp_inst); if ($.isFunction(o.onChangeMonthYear)) o.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst); }, onClose: function(dateText, dp_inst) { if (tp_inst.timeDefined === true && $input.val() != '') tp_inst._updateDateTime(dp_inst); if ($.isFunction(o.onClose)) o.onClose.call($input[0], dateText, dp_inst, tp_inst); }, timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker'); }); tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) { return val.toUpperCase() }); tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) { return val.toUpperCase() }); if (tp_inst._defaults.timezoneList === null) { var timezoneList = []; for (var i = -11; i <= 12; i++) timezoneList.push((i >= 0 ? '+' : '-') + ('0' + Math.abs(i).toString()).slice(-2) + '00'); if (tp_inst._defaults.timezoneIso8609) timezoneList = $.map(timezoneList, function(val) { return val == '+0000' ? 'Z' : (val.substring(0, 3) + ':' + val.substring(3)); }); tp_inst._defaults.timezoneList = timezoneList; } tp_inst.hour = tp_inst._defaults.hour; tp_inst.minute = tp_inst._defaults.minute; tp_inst.second = tp_inst._defaults.second; tp_inst.millisec = tp_inst._defaults.millisec; tp_inst.ampm = ''; tp_inst.$input = $input; if (o.altField) tp_inst.$altInput = $(o.altField) .css({ cursor: 'pointer' }) .focus(function(){ $input.trigger("focus"); }); if(tp_inst._defaults.minDate==0 || tp_inst._defaults.minDateTime==0) { tp_inst._defaults.minDate=new Date(); } if(tp_inst._defaults.maxDate==0 || tp_inst._defaults.maxDateTime==0) { tp_inst._defaults.maxDate=new Date(); } // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime.. if(tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime()); if(tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime()); if(tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime()); if(tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime()); return tp_inst; }, //######################################################################## // add our sliders to the calendar //######################################################################## _addTimePicker: function(dp_inst) { var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val(); this.timeDefined = this._parseTime(currDT); this._limitMinMaxDateTime(dp_inst, false); this._injectTimePicker(); }, //######################################################################## // parse the time string from input value or _setTime //######################################################################## _parseTime: function(timeString, withDate) { var regstr = this._defaults.timeFormat.toString() .replace(/h{1,2}/ig, '(\\d?\\d)') .replace(/m{1,2}/ig, '(\\d?\\d)') .replace(/s{1,2}/ig, '(\\d?\\d)') .replace(/l{1}/ig, '(\\d?\\d?\\d)') .replace(/t{1,2}/ig, this._getPatternAmpm()) .replace(/z{1}/ig, '(z|[-+]\\d\\d:?\\d\\d)?') .replace(/\s/g, '\\s?') + this._defaults.timeSuffix + '$', order = this._getFormatPositions(), ampm = '', treg; if (!this.inst) this.inst = $.datepicker._getInst(this.$input[0]); if (withDate || !this._defaults.timeOnly) { // the time should come after x number of characters and a space. // x = at least the length of text specified by the date format var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat'); // escape special regex characters in the seperator var specials = new RegExp("[.*+?|()\\[\\]{}\\\\]", "g"); regstr = '.{' + dp_dateFormat.length + ',}' + this._defaults.separator.replace(specials, "\\$&") + regstr; } treg = timeString.match(new RegExp(regstr, 'i')); if (treg) { if (order.t !== -1) { if (treg[order.t] === undefined || treg[order.t].length === 0) { ampm = ''; this.ampm = ''; } else { ampm = $.inArray(treg[order.t].toUpperCase(), this.amNames) !== -1 ? 'AM' : 'PM'; this.ampm = this._defaults[ampm == 'AM' ? 'amNames' : 'pmNames'][0]; } } if (order.h !== -1) { if (ampm == 'AM' && treg[order.h] == '12') this.hour = 0; // 12am = 0 hour else if (ampm == 'PM' && treg[order.h] != '12') this.hour = (parseFloat(treg[order.h]) + 12).toFixed(0); // 12pm = 12 hour, any other pm = hour + 12 else this.hour = Number(treg[order.h]); } if (order.m !== -1) this.minute = Number(treg[order.m]); if (order.s !== -1) this.second = Number(treg[order.s]); if (order.l !== -1) this.millisec = Number(treg[order.l]); if (order.z !== -1 && treg[order.z] !== undefined) { var tz = treg[order.z].toUpperCase(); switch (tz.length) { case 1: // Z tz = this._defaults.timezoneIso8609 ? 'Z' : '+0000'; break; case 5: // +hhmm if (this._defaults.timezoneIso8609) tz = tz.substring(1) == '0000' ? 'Z' : tz.substring(0, 3) + ':' + tz.substring(3); break; case 6: // +hh:mm if (!this._defaults.timezoneIso8609) tz = tz == 'Z' || tz.substring(1) == '00:00' ? '+0000' : tz.replace(/:/, ''); else if (tz.substring(1) == '00:00') tz = 'Z'; break; } this.timezone = tz; } return true; } return false; }, //######################################################################## // pattern for standard and localized AM/PM markers //######################################################################## _getPatternAmpm: function() { var markers = []; o = this._defaults; if (o.amNames) $.merge(markers, o.amNames); if (o.pmNames) $.merge(markers, o.pmNames); markers = $.map(markers, function(val) { return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&') }); return '(' + markers.join('|') + ')?'; }, //######################################################################## // figure out position of time elements.. cause js cant do named captures //######################################################################## _getFormatPositions: function() { var finds = this._defaults.timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|t{1,2}|z)/g), orders = { h: -1, m: -1, s: -1, l: -1, t: -1, z: -1 }; if (finds) for (var i = 0; i < finds.length; i++) if (orders[finds[i].toString().charAt(0)] == -1) orders[finds[i].toString().charAt(0)] = i + 1; return orders; }, //######################################################################## // generate and inject html for timepicker into ui datepicker //######################################################################## _injectTimePicker: function() { var $dp = this.inst.dpDiv, o = this._defaults, tp_inst = this, // Added by Peter Medeiros: // - Figure out what the hour/minute/second max should be based on the step values. // - Example: if stepMinute is 15, then minMax is 45. hourMax = (o.hourMax - ((o.hourMax - o.hourMin) % o.stepHour)).toFixed(0), minMax = (o.minuteMax - ((o.minuteMax - o.minuteMin) % o.stepMinute)).toFixed(0), secMax = (o.secondMax - ((o.secondMax - o.secondMin) % o.stepSecond)).toFixed(0), millisecMax = (o.millisecMax - ((o.millisecMax - o.millisecMin) % o.stepMillisec)).toFixed(0), dp_id = this.inst.id.toString().replace(/([^A-Za-z0-9_])/g, ''); // Prevent displaying twice //if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0) { if ($dp.find("div#ui-timepicker-div-"+ dp_id).length === 0 && o.showTimepicker) { var noDisplay = ' style="display:none;"', html = '<div class="ui-timepicker-div" id="ui-timepicker-div-' + dp_id + '"><dl>' + '<dt class="ui_tpicker_time_label" id="ui_tpicker_time_label_' + dp_id + '"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' + '<dd class="ui_tpicker_time" id="ui_tpicker_time_' + dp_id + '"' + ((o.showTime) ? '' : noDisplay) + '></dd>' + '<dt class="ui_tpicker_hour_label" id="ui_tpicker_hour_label_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '>' + o.hourText + '</dt>', hourGridSize = 0, minuteGridSize = 0, secondGridSize = 0, millisecGridSize = 0, size; // Hours if (o.showHour && o.hourGrid > 0) { html += '<dd class="ui_tpicker_hour">' + '<div id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></div>' + '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>'; for (var h = o.hourMin; h <= hourMax; h += parseInt(o.hourGrid,10)) { hourGridSize++; var tmph = (o.ampm && h > 12) ? h-12 : h; if (tmph < 10) tmph = '0' + tmph; if (o.ampm) { if (h == 0) tmph = 12 +'a'; else if (h < 12) tmph += 'a'; else tmph += 'p'; } html += '<td>' + tmph + '</td>'; } html += '</tr></table></div>' + '</dd>'; } else html += '<dd class="ui_tpicker_hour" id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></dd>'; html += '<dt class="ui_tpicker_minute_label" id="ui_tpicker_minute_label_' + dp_id + '"' + ((o.showMinute) ? '' : noDisplay) + '>' + o.minuteText + '</dt>'; // Minutes if (o.showMinute && o.minuteGrid > 0) { html += '<dd class="ui_tpicker_minute ui_tpicker_minute_' + o.minuteGrid + '">' + '<div id="ui_tpicker_minute_' + dp_id + '"' + ((o.showMinute) ? '' : noDisplay) + '></div>' + '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>'; for (var m = o.minuteMin; m <= minMax; m += parseInt(o.minuteGrid,10)) { minuteGridSize++; html += '<td>' + ((m < 10) ? '0' : '') + m + '</td>'; } html += '</tr></table></div>' + '</dd>'; } else html += '<dd class="ui_tpicker_minute" id="ui_tpicker_minute_' + dp_id + '"' + ((o.showMinute) ? '' : noDisplay) + '></dd>'; // Seconds html += '<dt class="ui_tpicker_second_label" id="ui_tpicker_second_label_' + dp_id + '"' + ((o.showSecond) ? '' : noDisplay) + '>' + o.secondText + '</dt>'; if (o.showSecond && o.secondGrid > 0) { html += '<dd class="ui_tpicker_second ui_tpicker_second_' + o.secondGrid + '">' + '<div id="ui_tpicker_second_' + dp_id + '"' + ((o.showSecond) ? '' : noDisplay) + '></div>' + '<div style="padding-left: 1px"><table><tr>'; for (var s = o.secondMin; s <= secMax; s += parseInt(o.secondGrid,10)) { secondGridSize++; html += '<td>' + ((s < 10) ? '0' : '') + s + '</td>'; } html += '</tr></table></div>' + '</dd>'; } else html += '<dd class="ui_tpicker_second" id="ui_tpicker_second_' + dp_id + '"' + ((o.showSecond) ? '' : noDisplay) + '></dd>'; // Milliseconds html += '<dt class="ui_tpicker_millisec_label" id="ui_tpicker_millisec_label_' + dp_id + '"' + ((o.showMillisec) ? '' : noDisplay) + '>' + o.millisecText + '</dt>'; if (o.showMillisec && o.millisecGrid > 0) { html += '<dd class="ui_tpicker_millisec ui_tpicker_millisec_' + o.millisecGrid + '">' + '<div id="ui_tpicker_millisec_' + dp_id + '"' + ((o.showMillisec) ? '' : noDisplay) + '></div>' + '<div style="padding-left: 1px"><table><tr>'; for (var l = o.millisecMin; l <= millisecMax; l += parseInt(o.millisecGrid,10)) { millisecGridSize++; html += '<td>' + ((l < 10) ? '0' : '') + s + '</td>'; } html += '</tr></table></div>' + '</dd>'; } else html += '<dd class="ui_tpicker_millisec" id="ui_tpicker_millisec_' + dp_id + '"' + ((o.showMillisec) ? '' : noDisplay) + '></dd>'; // Timezone html += '<dt class="ui_tpicker_timezone_label" id="ui_tpicker_timezone_label_' + dp_id + '"' + ((o.showTimezone) ? '' : noDisplay) + '>' + o.timezoneText + '</dt>'; html += '<dd class="ui_tpicker_timezone" id="ui_tpicker_timezone_' + dp_id + '"' + ((o.showTimezone) ? '' : noDisplay) + '></dd>'; html += '</dl></div>'; $tp = $(html); // if we only want time picker... if (o.timeOnly === true) { $tp.prepend( '<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + '</div>'); $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide(); } this.hour_slider = $tp.find('#ui_tpicker_hour_'+ dp_id).slider({ orientation: "horizontal", value: this.hour, min: o.hourMin, max: hourMax, step: o.stepHour, slide: function(event, ui) { tp_inst.hour_slider.slider( "option", "value", ui.value); tp_inst._onTimeChange(); } }); // Updated by Peter Medeiros: // - Pass in Event and UI instance into slide function this.minute_slider = $tp.find('#ui_tpicker_minute_'+ dp_id).slider({ orientation: "horizontal", value: this.minute, min: o.minuteMin, max: minMax, step: o.stepMinute, slide: function(event, ui) { // update the global minute slider instance value with the current slider value tp_inst.minute_slider.slider( "option", "value", ui.value); tp_inst._onTimeChange(); } }); this.second_slider = $tp.find('#ui_tpicker_second_'+ dp_id).slider({ orientation: "horizontal", value: this.second, min: o.secondMin, max: secMax, step: o.stepSecond, slide: function(event, ui) { tp_inst.second_slider.slider( "option", "value", ui.value); tp_inst._onTimeChange(); } }); this.millisec_slider = $tp.find('#ui_tpicker_millisec_'+ dp_id).slider({ orientation: "horizontal", value: this.millisec, min: o.millisecMin, max: millisecMax, step: o.stepMillisec, slide: function(event, ui) { tp_inst.millisec_slider.slider( "option", "value", ui.value); tp_inst._onTimeChange(); } }); this.timezone_select = $tp.find('#ui_tpicker_timezone_'+ dp_id).append('<select></select>').find("select"); $.fn.append.apply(this.timezone_select, $.map(o.timezoneList, function(val, idx) { return $("<option />") .val(typeof val == "object" ? val.value : val) .text(typeof val == "object" ? val.label : val); }) ); this.timezone_select.val((typeof this.timezone != "undefined" && this.timezone != null && this.timezone != "") ? this.timezone : o.timezone); this.timezone_select.change(function() { tp_inst._onTimeChange(); }); // Add grid functionality if (o.showHour && o.hourGrid > 0) { size = 100 * hourGridSize * o.hourGrid / (hourMax - o.hourMin); $tp.find(".ui_tpicker_hour table").css({ width: size + "%", marginLeft: (size / (-2 * hourGridSize)) + "%", borderCollapse: 'collapse' }).find("td").each( function(index) { $(this).click(function() { var h = $(this).html(); if(o.ampm) { var ap = h.substring(2).toLowerCase(), aph = parseInt(h.substring(0,2), 10); if (ap == 'a') { if (aph == 12) h = 0; else h = aph; } else if (aph == 12) h = 12; else h = aph + 12; } tp_inst.hour_slider.slider("option", "value", h); tp_inst._onTimeChange(); tp_inst._onSelectHandler(); }).css({ cursor: 'pointer', width: (100 / hourGridSize) + '%', textAlign: 'center', overflow: 'hidden' }); }); } if (o.showMinute && o.minuteGrid > 0) { size = 100 * minuteGridSize * o.minuteGrid / (minMax - o.minuteMin); $tp.find(".ui_tpicker_minute table").css({ width: size + "%", marginLeft: (size / (-2 * minuteGridSize)) + "%", borderCollapse: 'collapse' }).find("td").each(function(index) { $(this).click(function() { tp_inst.minute_slider.slider("option", "value", $(this).html()); tp_inst._onTimeChange(); tp_inst._onSelectHandler(); }).css({ cursor: 'pointer', width: (100 / minuteGridSize) + '%', textAlign: 'center', overflow: 'hidden' }); }); } if (o.showSecond && o.secondGrid > 0) { $tp.find(".ui_tpicker_second table").css({ width: size + "%", marginLeft: (size / (-2 * secondGridSize)) + "%", borderCollapse: 'collapse' }).find("td").each(function(index) { $(this).click(function() { tp_inst.second_slider.slider("option", "value", $(this).html()); tp_inst._onTimeChange(); tp_inst._onSelectHandler(); }).css({ cursor: 'pointer', width: (100 / secondGridSize) + '%', textAlign: 'center', overflow: 'hidden' }); }); } if (o.showMillisec && o.millisecGrid > 0) { $tp.find(".ui_tpicker_millisec table").css({ width: size + "%", marginLeft: (size / (-2 * millisecGridSize)) + "%", borderCollapse: 'collapse' }).find("td").each(function(index) { $(this).click(function() { tp_inst.millisec_slider.slider("option", "value", $(this).html()); tp_inst._onTimeChange(); tp_inst._onSelectHandler(); }).css({ cursor: 'pointer', width: (100 / millisecGridSize) + '%', textAlign: 'center', overflow: 'hidden' }); }); } var $buttonPanel = $dp.find('.ui-datepicker-buttonpane'); if ($buttonPanel.length) $buttonPanel.before($tp); else $dp.append($tp); this.$timeObj = $tp.find('#ui_tpicker_time_'+ dp_id); if (this.inst !== null) { var timeDefined = this.timeDefined; this._onTimeChange(); this.timeDefined = timeDefined; } //Emulate datepicker onSelect behavior. Call on slidestop. var onSelectDelegate = function() { tp_inst._onSelectHandler(); }; this.hour_slider.bind('slidestop',onSelectDelegate); this.minute_slider.bind('slidestop',onSelectDelegate); this.second_slider.bind('slidestop',onSelectDelegate); this.millisec_slider.bind('slidestop',onSelectDelegate); } }, //######################################################################## // This function tries to limit the ability to go outside the // min/max date range //######################################################################## _limitMinMaxDateTime: function(dp_inst, adjustSliders){ var o = this._defaults, dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay); if(!this._defaults.showTimepicker) return; // No time so nothing to check here if($.datepicker._get(dp_inst, 'minDateTime') !== null && $.datepicker._get(dp_inst, 'minDateTime') !== undefined && dp_date){ var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'), minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0); if(this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null){ this.hourMinOriginal = o.hourMin; this.minuteMinOriginal = o.minuteMin; this.secondMinOriginal = o.secondMin; this.millisecMinOriginal = o.millisecMin; } if(dp_inst.settings.timeOnly || minDateTimeDate.getTime() == dp_date.getTime()) { this._defaults.hourMin = minDateTime.getHours(); if (this.hour <= this._defaults.hourMin) { this.hour = this._defaults.hourMin; this._defaults.minuteMin = minDateTime.getMinutes(); if (this.minute <= this._defaults.minuteMin) { this.minute = this._defaults.minuteMin; this._defaults.secondMin = minDateTime.getSeconds(); } else if (this.second <= this._defaults.secondMin){ this.second = this._defaults.secondMin; this._defaults.millisecMin = minDateTime.getMilliseconds(); } else { if(this.millisec < this._defaults.millisecMin) this.millisec = this._defaults.millisecMin; this._defaults.millisecMin = this.millisecMinOriginal; } } else { this._defaults.minuteMin = this.minuteMinOriginal; this._defaults.secondMin = this.secondMinOriginal; this._defaults.millisecMin = this.millisecMinOriginal; } }else{ this._defaults.hourMin = this.hourMinOriginal; this._defaults.minuteMin = this.minuteMinOriginal; this._defaults.secondMin = this.secondMinOriginal; this._defaults.millisecMin = this.millisecMinOriginal; } } if($.datepicker._get(dp_inst, 'maxDateTime') !== null && $.datepicker._get(dp_inst, 'maxDateTime') !== undefined && dp_date){ var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'), maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0); if(this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null){ this.hourMaxOriginal = o.hourMax; this.minuteMaxOriginal = o.minuteMax; this.secondMaxOriginal = o.secondMax; this.millisecMaxOriginal = o.millisecMax; } if(dp_inst.settings.timeOnly || maxDateTimeDate.getTime() == dp_date.getTime()){ this._defaults.hourMax = maxDateTime.getHours(); if (this.hour >= this._defaults.hourMax) { this.hour = this._defaults.hourMax; this._defaults.minuteMax = maxDateTime.getMinutes(); if (this.minute >= this._defaults.minuteMax) { this.minute = this._defaults.minuteMax; this._defaults.secondMax = maxDateTime.getSeconds(); } else if (this.second >= this._defaults.secondMax) { this.second = this._defaults.secondMax; this._defaults.millisecMax = maxDateTime.getMilliseconds(); } else { if(this.millisec > this._defaults.millisecMax) this.millisec = this._defaults.millisecMax; this._defaults.millisecMax = this.millisecMaxOriginal; } } else { this._defaults.minuteMax = this.minuteMaxOriginal; this._defaults.secondMax = this.secondMaxOriginal; this._defaults.millisecMax = this.millisecMaxOriginal; } }else{ this._defaults.hourMax = this.hourMaxOriginal; this._defaults.minuteMax = this.minuteMaxOriginal; this._defaults.secondMax = this.secondMaxOriginal; this._defaults.millisecMax = this.millisecMaxOriginal; } } if(adjustSliders !== undefined && adjustSliders === true){ var hourMax = (this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)).toFixed(0), minMax = (this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)).toFixed(0), secMax = (this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)).toFixed(0), millisecMax = (this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)).toFixed(0); if(this.hour_slider) this.hour_slider.slider("option", { min: this._defaults.hourMin, max: hourMax }).slider('value', this.hour); if(this.minute_slider) this.minute_slider.slider("option", { min: this._defaults.minuteMin, max: minMax }).slider('value', this.minute); if(this.second_slider) this.second_slider.slider("option", { min: this._defaults.secondMin, max: secMax }).slider('value', this.second); if(this.millisec_slider) this.millisec_slider.slider("option", { min: this._defaults.millisecMin, max: millisecMax }).slider('value', this.millisec); } }, //######################################################################## // when a slider moves, set the internal time... // on time change is also called when the time is updated in the text field //######################################################################## _onTimeChange: function() { var hour = (this.hour_slider) ? this.hour_slider.slider('value') : false, minute = (this.minute_slider) ? this.minute_slider.slider('value') : false, second = (this.second_slider) ? this.second_slider.slider('value') : false, millisec = (this.millisec_slider) ? this.millisec_slider.slider('value') : false, timezone = (this.timezone_select) ? this.timezone_select.val() : false, o = this._defaults; if (typeof(hour) == 'object') hour = false; if (typeof(minute) == 'object') minute = false; if (typeof(second) == 'object') second = false; if (typeof(millisec) == 'object') millisec = false; if (typeof(timezone) == 'object') timezone = false; if (hour !== false) hour = parseInt(hour,10); if (minute !== false) minute = parseInt(minute,10); if (second !== false) second = parseInt(second,10); if (millisec !== false) millisec = parseInt(millisec,10); var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0]; // If the update was done in the input field, the input field should not be updated. // If the update was done using the sliders, update the input field. var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || millisec != this.millisec || (this.ampm.length > 0 && (hour < 12) != ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || timezone != this.timezone); if (hasChanged) { if (hour !== false)this.hour = hour; if (minute !== false) this.minute = minute; if (second !== false) this.second = second; if (millisec !== false) this.millisec = millisec; if (timezone !== false) this.timezone = timezone; if (!this.inst) this.inst = $.datepicker._getInst(this.$input[0]); this._limitMinMaxDateTime(this.inst, true); } if (o.ampm) this.ampm = ampm; this._formatTime(); if (this.$timeObj) this.$timeObj.text(this.formattedTime + o.timeSuffix); this.timeDefined = true; if (hasChanged) this._updateDateTime(); }, //######################################################################## // call custom onSelect. // bind to sliders slidestop, and grid click. //######################################################################## _onSelectHandler: function() { var onSelect = this._defaults.onSelect; var inputEl = this.$input ? this.$input[0] : null; if (onSelect && inputEl) { onSelect.apply(inputEl, [this.formattedDateTime, this]); } }, //######################################################################## // format the time all pretty... //######################################################################## _formatTime: function(time, format, ampm) { if (ampm == undefined) ampm = this._defaults.ampm; time = time || { hour: this.hour, minute: this.minute, second: this.second, millisec: this.millisec, ampm: this.ampm, timezone: this.timezone }; var tmptime = (format || this._defaults.timeFormat).toString(); var hour = parseInt(time.hour, 10); if (ampm) { if (!$.inArray(time.ampm.toUpperCase(), this.amNames) !== -1) hour = hour % 12; if (hour === 0) hour = 12; } tmptime = tmptime.replace(/(?:hh?|mm?|ss?|[tT]{1,2}|[lz])/g, function(match) { switch (match.toLowerCase()) { case 'hh': return ('0' + hour).slice(-2); case 'h': return hour; case 'mm': return ('0' + time.minute).slice(-2); case 'm': return time.minute; case 'ss': return ('0' + time.second).slice(-2); case 's': return time.second; case 'l': return ('00' + time.millisec).slice(-3); case 'z': return time.timezone; case 't': case 'tt': if (ampm) { var _ampm = time.ampm; if (match.length == 1) _ampm = _ampm.charAt(0); return match.charAt(0) == 'T' ? _ampm.toUpperCase() : _ampm.toLowerCase(); } return ''; } }); if (arguments.length) return tmptime; else this.formattedTime = tmptime; }, //######################################################################## // update our input with the new date time.. //######################################################################## _updateDateTime: function(dp_inst) { dp_inst = this.inst || dp_inst, dt = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay), dateFmt = $.datepicker._get(dp_inst, 'dateFormat'), formatCfg = $.datepicker._getFormatConfig(dp_inst), timeAvailable = dt !== null && this.timeDefined; this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg); var formattedDateTime = this.formattedDate; if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) return; if (this._defaults.timeOnly === true) { formattedDateTime = this.formattedTime; } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) { formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix; } this.formattedDateTime = formattedDateTime; if(!this._defaults.showTimepicker) { this.$input.val(this.formattedDate); } else if (this.$altInput && this._defaults.altFieldTimeOnly === true) { this.$altInput.val(this.formattedTime); this.$input.val(this.formattedDate); } else if(this.$altInput) { this.$altInput.val(formattedDateTime); this.$input.val(formattedDateTime); } else { this.$input.val(formattedDateTime); } this.$input.trigger("change"); } }); $.fn.extend({ //######################################################################## // shorthand just to use timepicker.. //######################################################################## timepicker: function(o) { o = o || {}; var tmp_args = arguments; if (typeof o == 'object') tmp_args[0] = $.extend(o, { timeOnly: true }); return $(this).each(function() { $.fn.datetimepicker.apply($(this), tmp_args); }); }, //######################################################################## // extend timepicker to datepicker //######################################################################## datetimepicker: function(o) { o = o || {}; var $input = this, tmp_args = arguments; if (typeof(o) == 'string'){ if(o == 'getDate') return $.fn.datepicker.apply($(this[0]), tmp_args); else return this.each(function() { var $t = $(this); $t.datepicker.apply($t, tmp_args); }); } else return this.each(function() { var $t = $(this); $t.datepicker($.timepicker._newInst($t, o)._defaults); }); } }); //######################################################################## // the bad hack :/ override datepicker so it doesnt close on select // inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378 //######################################################################## $.datepicker._base_selectDate = $.datepicker._selectDate; $.datepicker._selectDate = function (id, dateStr) { var inst = this._getInst($(id)[0]), tp_inst = this._get(inst, 'timepicker'); if (tp_inst) { tp_inst._limitMinMaxDateTime(inst, true); inst.inline = inst.stay_open = true; //This way the onSelect handler called from calendarpicker get the full dateTime this._base_selectDate(id, dateStr); inst.inline = inst.stay_open = false; this._notifyChange(inst); this._updateDatepicker(inst); } else this._base_selectDate(id, dateStr); }; //############################################################################################# // second bad hack :/ override datepicker so it triggers an event when changing the input field // and does not redraw the datepicker on every selectDate event //############################################################################################# $.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker; $.datepicker._updateDatepicker = function(inst) { // don't popup the datepicker if there is another instance already opened var input = inst.input[0]; if($.datepicker._curInst && $.datepicker._curInst != inst && $.datepicker._datepickerShowing && $.datepicker._lastInput != input) { return; } if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) { this._base_updateDatepicker(inst); // Reload the time control when changing something in the input text field. var tp_inst = this._get(inst, 'timepicker'); if(tp_inst) tp_inst._addTimePicker(inst); } }; //####################################################################################### // third bad hack :/ override datepicker so it allows spaces and colon in the input field //####################################################################################### $.datepicker._base_doKeyPress = $.datepicker._doKeyPress; $.datepicker._doKeyPress = function(event) { var inst = $.datepicker._getInst(event.target), tp_inst = $.datepicker._get(inst, 'timepicker'); if (tp_inst) { if ($.datepicker._get(inst, 'constrainInput')) { var ampm = tp_inst._defaults.ampm, dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')), datetimeChars = tp_inst._defaults.timeFormat.toString() .replace(/[hms]/g, '') .replace(/TT/g, ampm ? 'APM' : '') .replace(/Tt/g, ampm ? 'AaPpMm' : '') .replace(/tT/g, ampm ? 'AaPpMm' : '') .replace(/T/g, ampm ? 'AP' : '') .replace(/tt/g, ampm ? 'apm' : '') .replace(/t/g, ampm ? 'ap' : '') + " " + tp_inst._defaults.separator + tp_inst._defaults.timeSuffix + (tp_inst._defaults.showTimezone ? tp_inst._defaults.timezoneList.join('') : '') + (tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) + dateChars, chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode); return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1); } } return $.datepicker._base_doKeyPress(event); }; //####################################################################################### // Override key up event to sync manual input changes. //####################################################################################### $.datepicker._base_doKeyUp = $.datepicker._doKeyUp; $.datepicker._doKeyUp = function (event) { var inst = $.datepicker._getInst(event.target), tp_inst = $.datepicker._get(inst, 'timepicker'); if (tp_inst) { if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) { try { $.datepicker._updateDatepicker(inst); } catch (err) { $.datepicker.log(err); } } } return $.datepicker._base_doKeyUp(event); }; //####################################################################################### // override "Today" button to also grab the time. //####################################################################################### $.datepicker._base_gotoToday = $.datepicker._gotoToday; $.datepicker._gotoToday = function(id) { var inst = this._getInst($(id)[0]), $dp = inst.dpDiv; this._base_gotoToday(id); var now = new Date(); var tp_inst = this._get(inst, 'timepicker'); if (tp_inst._defaults.showTimezone && tp_inst.timezone_select) { var tzoffset = now.getTimezoneOffset(); // If +0100, returns -60 var tzsign = tzoffset > 0 ? '-' : '+'; tzoffset = Math.abs(tzoffset); var tzmin = tzoffset % 60 tzoffset = tzsign + ('0' + (tzoffset - tzmin) / 60).slice(-2) + ('0' + tzmin).slice(-2); if (tp_inst._defaults.timezoneIso8609) tzoffset = tzoffset.substring(0, 3) + ':' + tzoffset.substring(3); tp_inst.timezone_select.val(tzoffset); } this._setTime(inst, now); $( '.ui-datepicker-today', $dp).click(); }; //####################################################################################### // Disable & enable the Time in the datetimepicker //####################################################################################### $.datepicker._disableTimepickerDatepicker = function(target, date, withDate) { var inst = this._getInst(target), tp_inst = this._get(inst, 'timepicker'); $(target).datepicker('getDate'); // Init selected[Year|Month|Day] if (tp_inst) { tp_inst._defaults.showTimepicker = false; tp_inst._updateDateTime(inst); } }; $.datepicker._enableTimepickerDatepicker = function(target, date, withDate) { var inst = this._getInst(target), tp_inst = this._get(inst, 'timepicker'); $(target).datepicker('getDate'); // Init selected[Year|Month|Day] if (tp_inst) { tp_inst._defaults.showTimepicker = true; tp_inst._addTimePicker(inst); // Could be disabled on page load tp_inst._updateDateTime(inst); } }; //####################################################################################### // Create our own set time function //####################################################################################### $.datepicker._setTime = function(inst, date) { var tp_inst = this._get(inst, 'timepicker'); if (tp_inst) { var defaults = tp_inst._defaults, // calling _setTime with no date sets time to defaults hour = date ? date.getHours() : defaults.hour, minute = date ? date.getMinutes() : defaults.minute, second = date ? date.getSeconds() : defaults.second, millisec = date ? date.getMilliseconds() : defaults.millisec; //check if within min/max times.. if ((hour < defaults.hourMin || hour > defaults.hourMax) || (minute < defaults.minuteMin || minute > defaults.minuteMax) || (second < defaults.secondMin || second > defaults.secondMax) || (millisec < defaults.millisecMin || millisec > defaults.millisecMax)) { hour = defaults.hourMin; minute = defaults.minuteMin; second = defaults.secondMin; millisec = defaults.millisecMin; } tp_inst.hour = hour; tp_inst.minute = minute; tp_inst.second = second; tp_inst.millisec = millisec; if (tp_inst.hour_slider) tp_inst.hour_slider.slider('value', hour); if (tp_inst.minute_slider) tp_inst.minute_slider.slider('value', minute); if (tp_inst.second_slider) tp_inst.second_slider.slider('value', second); if (tp_inst.millisec_slider) tp_inst.millisec_slider.slider('value', millisec); tp_inst._onTimeChange(); tp_inst._updateDateTime(inst); } }; //####################################################################################### // Create new public method to set only time, callable as $().datepicker('setTime', date) //####################################################################################### $.datepicker._setTimeDatepicker = function(target, date, withDate) { var inst = this._getInst(target), tp_inst = this._get(inst, 'timepicker'); if (tp_inst) { this._setDateFromField(inst); var tp_date; if (date) { if (typeof date == "string") { tp_inst._parseTime(date, withDate); tp_date = new Date(); tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec); } else tp_date = new Date(date.getTime()); if (tp_date.toString() == 'Invalid Date') tp_date = undefined; this._setTime(inst, tp_date); } } }; //####################################################################################### // override setDate() to allow setting time too within Date object //####################################################################################### $.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker; $.datepicker._setDateDatepicker = function(target, date) { var inst = this._getInst(target), tp_date = (date instanceof Date) ? new Date(date.getTime()) : date; this._updateDatepicker(inst); this._base_setDateDatepicker.apply(this, arguments); this._setTimeDatepicker(target, tp_date, true); }; //####################################################################################### // override getDate() to allow getting time too within Date object //####################################################################################### $.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker; $.datepicker._getDateDatepicker = function(target, noDefault) { var inst = this._getInst(target), tp_inst = this._get(inst, 'timepicker'); if (tp_inst) { this._setDateFromField(inst, noDefault); var date = this._getDate(inst); if (date && tp_inst._parseTime($(target).val(), tp_inst.timeOnly)) date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec); return date; } return this._base_getDateDatepicker(target, noDefault); }; //####################################################################################### // override parseDate() because UI 1.8.14 throws an error about "Extra characters" // An option in datapicker to ignore extra format characters would be nicer. //####################################################################################### $.datepicker._base_parseDate = $.datepicker.parseDate; $.datepicker.parseDate = function(format, value, settings) { var date; try { date = this._base_parseDate(format, value, settings); } catch (err) { // Hack! The error message ends with a colon, a space, and // the "extra" characters. We rely on that instead of // attempting to perfectly reproduce the parsing algorithm. date = this._base_parseDate(format, value.substring(0,value.length-(err.length-err.indexOf(':')-2)), settings); } return date; }; //####################################################################################### // override formatDate to set date with time to the input //####################################################################################### $.datepicker._base_formatDate=$.datepicker._formatDate; $.datepicker._formatDate = function(inst, day, month, year){ var tp_inst = this._get(inst, 'timepicker'); if(tp_inst) { if(day) var b = this._base_formatDate(inst, day, month, year); tp_inst._updateDateTime(); return tp_inst.$input.val(); } return this._base_formatDate(inst); } //####################################################################################### // override options setter to add time to maxDate(Time) and minDate(Time). MaxDate //####################################################################################### $.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker; $.datepicker._optionDatepicker = function(target, name, value) { var inst = this._getInst(target), tp_inst = this._get(inst, 'timepicker'); if (tp_inst) { var min,max,onselect; if (typeof name == 'string') { // if min/max was set with the string if (name==='minDate' || name==='minDateTime' ) min = value; else if (name==='maxDate' || name==='maxDateTime') max = value; else if (name==='onSelect') onselect=value; } else if (typeof name == 'object') { //if min/max was set with the JSON if(name.minDate) min = name.minDate; else if (name.minDateTime) min = name.minDateTime; else if (name.maxDate) max = name.maxDate; else if (name.maxDateTime) max = name.maxDateTime; } if(min){ //if min was set if(min==0) min=new Date(); else min= new Date(min); tp_inst._defaults.minDate = min; tp_inst._defaults.minDateTime = min; } else if (max){ //if max was set if(max==0) max=new Date(); else max= new Date(max); tp_inst._defaults.maxDate = max; tp_inst._defaults.maxDateTime = max; } else if (onselect) tp_inst._defaults.onSelect=onselect; } this._base_optionDatepicker(target, name, value); }; //####################################################################################### // jQuery extend now ignores nulls! //####################################################################################### function extendRemove(target, props) { $.extend(target, props); for (var name in props) if (props[name] === null || props[name] === undefined) target[name] = props[name]; return target; } $.timepicker = new Timepicker(); // singleton instance $.timepicker.version = "0.9.7"; })(jQuery);
{'repo_name': 'openmrs/openmrs-core', 'stars': '901', 'repo_language': 'Java', 'file_name': 'OrderUtilTest.java', 'mime_type': 'text/x-java', 'hash': -4188974971953760009, 'source_dataset': 'data'}
<?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="sr-Latn"> <translation id="1112374155460533568">Prikazuje se iskačući prozor za automatsko popunjavanje</translation> </translationbundle>
{'repo_name': 'nwjs/chromium.src', 'stars': '111', 'repo_language': 'None', 'file_name': 'AndroidManifest.xml', 'mime_type': 'text/xml', 'hash': 806336832539827867, 'source_dataset': 'data'}
import { createStore, applyMiddleware, compose } from "redux"; import thunkMiddleware from "redux-thunk"; import reduxImmutableStateInvariant from "redux-immutable-state-invariant"; import reducers from "reducers/promptReducers"; import DevTools from "containers/DevTools"; import { IS_DEV} from "globals/promptInit"; export default function configureStore(initialState) { let enhancer; if (IS_DEV) { enhancer = compose(applyMiddleware(thunkMiddleware, reduxImmutableStateInvariant()), DevTools.instrument()); } else { enhancer = applyMiddleware(thunkMiddleware); } return createStore(reducers, initialState, enhancer); }
{'repo_name': 'dnnsoftware/Dnn.Platform', 'stars': '730', 'repo_language': 'C#', 'file_name': 'PageSettingsBuilder.cs', 'mime_type': 'text/plain', 'hash': 2548948523149926563, 'source_dataset': 'data'}
/******************************************************************************* * Copyright (c) 2008 Actuate Corporation. * 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Actuate Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.birt.report.data.oda.jdbc.ui.model; import org.eclipse.birt.report.data.bidi.utils.core.BidiConstants; import org.eclipse.birt.report.data.bidi.utils.core.BidiTransform; import org.eclipse.birt.report.data.oda.jdbc.ui.JdbcPlugin; import org.eclipse.birt.report.data.oda.jdbc.ui.provider.JdbcMetaDataProvider; import org.eclipse.birt.report.data.oda.jdbc.ui.util.Utility; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageRegistry; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.graphics.Image; public class TableColumnNode implements IDBNode, Comparable<TableColumnNode> { private static String COLUMN_ICON = TableColumnNode.class.getName( ) + ".ColumnIcon"; static { ImageRegistry reg = JFaceResources.getImageRegistry( ); reg.put( COLUMN_ICON, ImageDescriptor.createFromFile( JdbcPlugin.class, "icons/column.gif" ) );//$NON-NLS-1$ } private String schemaName; private String tableName; private String columnName; private String typeName; public TableColumnNode( String schemaName, String tableName, String columnName, String typeName ) { assert columnName != null && tableName != null; this.columnName = columnName; this.schemaName = schemaName; this.tableName = tableName; this.typeName = typeName; } //bidi_hcg: add metadataBidiFormatStr parameter to allow Bidi transformations (if required) public String getDisplayName( String metadataBidiFormatStr ) { return BidiTransform.transform(columnName,metadataBidiFormatStr,BidiConstants.DEFAULT_BIDI_FORMAT_STR) + " (" + typeName + ")"; } public Image getImage( ) { return JFaceResources.getImage( COLUMN_ICON ); } //bidi_hcg: add metadataBidiFormatStr parameter to allow Bidi transformations (if required) public String getQualifiedNameInSQL( boolean useIdentifierQuoteString, boolean includeSchema, String metadataBidiFormatStr ) { StringBuffer sb = new StringBuffer( ); String quoteFlag = ""; if ( useIdentifierQuoteString ) { quoteFlag = JdbcMetaDataProvider.getInstance( ) .getIdentifierQuoteString( ); } //bidi_hcg: perform required Bidi transformations String schemaNameStr = schemaName; String tableNameStr = tableName; String columnNameStr = columnName; if ( includeSchema && schemaName != null ) { if (metadataBidiFormatStr != null){ schemaNameStr = BidiTransform.transform(schemaName,metadataBidiFormatStr, BidiConstants.DEFAULT_BIDI_FORMAT_STR); tableNameStr = BidiTransform.transform(tableNameStr,metadataBidiFormatStr, BidiConstants.DEFAULT_BIDI_FORMAT_STR); columnNameStr = BidiTransform.transform(columnNameStr,metadataBidiFormatStr, BidiConstants.DEFAULT_BIDI_FORMAT_STR); } sb.append( Utility.quoteString( schemaNameStr, quoteFlag ) ) .append( "." ); } sb.append( Utility.quoteString( tableNameStr, quoteFlag ) ).append( "." ); sb.append( Utility.quoteString( columnNameStr, quoteFlag ) ); return sb.toString( ); } public int compareTo( TableColumnNode o ) { /** * In our case, 2 <code>TableColumn</code> instances need to be compared * <p>only when they belong to the same <schema, table> */ return this.columnName.compareTo( o.columnName ); } }
{'repo_name': 'eclipse/birt', 'stars': '201', 'repo_language': 'Java', 'file_name': 'Messages.properties', 'mime_type': 'text/plain', 'hash': 1832233543297160566, 'source_dataset': 'data'}
/* Copyright The Kubernetes Authors. 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. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" ) // FakePersistentVolumeClaims implements PersistentVolumeClaimInterface type FakePersistentVolumeClaims struct { Fake *FakeCoreV1 ns string } var persistentvolumeclaimsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "persistentvolumeclaims"} var persistentvolumeclaimsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolumeClaim"} // Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any. func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{}) if obj == nil { return nil, err } return obj.(*corev1.PersistentVolumeClaim), err } // List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *corev1.PersistentVolumeClaimList, err error) { obj, err := c.Fake. Invokes(testing.NewListAction(persistentvolumeclaimsResource, persistentvolumeclaimsKind, c.ns, opts), &corev1.PersistentVolumeClaimList{}) if obj == nil { return nil, err } label, _, _ := testing.ExtractFromListOptions(opts) if label == nil { label = labels.Everything() } list := &corev1.PersistentVolumeClaimList{ListMeta: obj.(*corev1.PersistentVolumeClaimList).ListMeta} for _, item := range obj.(*corev1.PersistentVolumeClaimList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } } return list, err } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(testing.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts)) } // Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) if obj == nil { return nil, err } return obj.(*corev1.PersistentVolumeClaim), err } // Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) if obj == nil { return nil, err } return obj.(*corev1.PersistentVolumeClaim), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) { obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) if obj == nil { return nil, err } return obj.(*corev1.PersistentVolumeClaim), err } // Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. Invokes(testing.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{}) return err } // DeleteCollection deletes a collection of objects. func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions) _, err := c.Fake.Invokes(action, &corev1.PersistentVolumeClaimList{}) return err } // Patch applies the patch and returns the patched persistentVolumeClaim. func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, pt, data, subresources...), &corev1.PersistentVolumeClaim{}) if obj == nil { return nil, err } return obj.(*corev1.PersistentVolumeClaim), err }
{'repo_name': 'kubernetes-sigs/aws-iam-authenticator', 'stars': '1446', 'repo_language': 'Go', 'file_name': 'server.go', 'mime_type': 'text/plain', 'hash': -3469168622578110459, 'source_dataset': 'data'}
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_CRX_FILE_CRX_CREATOR_H_ #define COMPONENTS_CRX_FILE_CRX_CREATOR_H_ namespace base { class FilePath; } // namespace base namespace crypto { class RSAPrivateKey; } // namespace crypto namespace crx_file { enum class CreatorResult { OK, // The CRX file was successfully created. ERROR_SIGNING_FAILURE, ERROR_FILE_NOT_READABLE, ERROR_FILE_NOT_WRITABLE, ERROR_FILE_WRITE_FAILURE, }; // Create a CRX3 file at |output_path|, using the contents of the ZIP archive // located at |zip_path| and signing with (and deriving the CRX ID from) // |signing_key|. CreatorResult Create(const base::FilePath& output_path, const base::FilePath& zip_path, crypto::RSAPrivateKey* signing_key); } // namespace crx_file #endif // COMPONENTS_CRX_FILE_CRX_CREATOR_H_
{'repo_name': 'kiwibrowser/src', 'stars': '728', 'repo_language': 'None', 'file_name': '3db76d1dd7d3a759dccc3f8fa7f68675c080cb095e4881063a6b850fdd68b8bc.pem', 'mime_type': 'text/plain', 'hash': 3287587463293347455, 'source_dataset': 'data'}
namespace Ocelot.Infrastructure { using Microsoft.AspNetCore.Http; using Ocelot.Infrastructure.RequestData; using Ocelot.Middleware; using Ocelot.Request.Middleware; using Ocelot.Responses; using System; using System.Collections.Generic; using System.Linq; public class Placeholders : IPlaceholders { private readonly Dictionary<string, Func<Response<string>>> _placeholders; private readonly Dictionary<string, Func<DownstreamRequest, string>> _requestPlaceholders; private readonly IBaseUrlFinder _finder; private readonly IRequestScopedDataRepository _repo; private readonly IHttpContextAccessor _httpContextAccessor; public Placeholders(IBaseUrlFinder finder, IRequestScopedDataRepository repo, IHttpContextAccessor httpContextAccessor) { _repo = repo; _httpContextAccessor = httpContextAccessor; _finder = finder; _placeholders = new Dictionary<string, Func<Response<string>>> { { "{BaseUrl}", GetBaseUrl() }, { "{TraceId}", GetTraceId() }, { "{RemoteIpAddress}", GetRemoteIpAddress() }, { "{UpstreamHost}", GetUpstreamHost() }, }; _requestPlaceholders = new Dictionary<string, Func<DownstreamRequest, string>> { { "{DownstreamBaseUrl}", GetDownstreamBaseUrl() }, }; } public Response<string> Get(string key) { if (_placeholders.ContainsKey(key)) { var response = _placeholders[key].Invoke(); if (!response.IsError) { return new OkResponse<string>(response.Data); } } return new ErrorResponse<string>(new CouldNotFindPlaceholderError(key)); } public Response<string> Get(string key, DownstreamRequest request) { if (_requestPlaceholders.ContainsKey(key)) { return new OkResponse<string>(_requestPlaceholders[key].Invoke(request)); } return new ErrorResponse<string>(new CouldNotFindPlaceholderError(key)); } public Response Add(string key, Func<Response<string>> func) { if (_placeholders.ContainsKey(key)) { return new ErrorResponse(new CannotAddPlaceholderError($"Unable to add placeholder: {key}, placeholder already exists")); } _placeholders.Add(key, func); return new OkResponse(); } public Response Remove(string key) { if (!_placeholders.ContainsKey(key)) { return new ErrorResponse(new CannotRemovePlaceholderError($"Unable to remove placeholder: {key}, placeholder does not exists")); } _placeholders.Remove(key); return new OkResponse(); } private Func<Response<string>> GetRemoteIpAddress() { return () => { // this can blow up so adding try catch and return error try { var remoteIdAddress = _httpContextAccessor.HttpContext.Connection.RemoteIpAddress.ToString(); return new OkResponse<string>(remoteIdAddress); } catch { return new ErrorResponse<string>(new CouldNotFindPlaceholderError("{RemoteIpAddress}")); } }; } private Func<DownstreamRequest, string> GetDownstreamBaseUrl() { return x => { var downstreamUrl = $"{x.Scheme}://{x.Host}"; if (x.Port != 80 && x.Port != 443) { downstreamUrl = $"{downstreamUrl}:{x.Port}"; } return $"{downstreamUrl}/"; }; } private Func<Response<string>> GetTraceId() { return () => { var traceId = _repo.Get<string>("TraceId"); if (traceId.IsError) { return new ErrorResponse<string>(traceId.Errors); } return new OkResponse<string>(traceId.Data); }; } private Func<Response<string>> GetBaseUrl() { return () => new OkResponse<string>(_finder.Find()); } private Func<Response<string>> GetUpstreamHost() { return () => { try { if (_httpContextAccessor.HttpContext.Request.Headers.TryGetValue("Host", out var upstreamHost)) { return new OkResponse<string>(upstreamHost.First()); } return new ErrorResponse<string>(new CouldNotFindPlaceholderError("{UpstreamHost}")); } catch { return new ErrorResponse<string>(new CouldNotFindPlaceholderError("{UpstreamHost}")); } }; } } }
{'repo_name': 'ThreeMammals/Ocelot', 'stars': '5321', 'repo_language': 'C#', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -8091358780770447075, 'source_dataset': 'data'}
<?xml version="1.0" encoding="UTF-8"?> <!-- Reviewed: no --> <sect1 id="zend.exception.previous"> <title>Previous Exceptions</title> <para> Since Zend Framework 1.10, <classname>Zend_Exception</classname> implements the <acronym>PHP</acronym> 5.3 support for previous exceptions. Simply put, when in a <methodname>catch()</methodname> block, you can throw a new exception that references the original exception, which helps provide additional context when debugging. By providing this support in Zend Framework, your code may now be forwards compatible with <acronym>PHP</acronym> 5.3. </para> <para> Previous exceptions are indicated as the third argument to an exception constructor. </para> <example id="zend.exception.previous.example"> <title>Previous exceptions</title> <programlisting language="php"><![CDATA[ try { $db->query($sql); } catch (Zend_Db_Statement_Exception $e) { if ($e->getPrevious()) { echo '[' . get_class($e) . '] has the previous exception of [' . get_class($e->getPrevious()) . ']' . PHP_EOL; } else { echo '[' . get_class($e) . '] does not have a previous exception' . PHP_EOL; } echo $e; // displays all exceptions starting by the first thrown // exception if available. } ]]></programlisting> </example> </sect1> <!-- vim:se ts=4 sw=4 et: -->
{'repo_name': 'zendframework/zf1', 'stars': '351', 'repo_language': 'PHP', 'file_name': 'demo.php', 'mime_type': 'text/x-php', 'hash': 7562441949974612812, 'source_dataset': 'data'}
import cv2 as cv import numpy as np from PIL import Image import pytesseract as tess """ 验证码识别 1.步骤: 1. 预处理-去除干扰线和点 2.不同的结构元素中选择 3. Image和numpy array相互转换 4. 识别和输出 tess.image_to_string 2. 报错与处理 当出现该错误:raise TesseractNotFoundError() pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path 不同系统采用不同策略: On Linux sudo apt update sudo apt install tesseract-ocr sudo apt install libtesseract-dev On Mac brew install tesseract On Windows 先下载tesseract包:https://github.com/UB-Mannheim/tesseract/wiki. 然后修改pytesseract.py中tesseract_cmd指向的路径:tesseract_cmd = 'C:\\Program Files (x86)\\Tesseract-OCR\\tesseract.exe' references: https://pypi.org/project/pytesseract/ (INSTALLATION section) and https://github.com/tesseract-ocr/tesseract/wiki#installation """ def recognition_demo(image): gray = cv.cvtColor(image, cv.COLOR_BGR2GRAY) ret, binary = cv.threshold(gray, 0, 255, cv.THRESH_BINARY_INV | cv.THRESH_OTSU) cv.imshow("binary", binary) kernel = cv.getStructuringElement(cv.MORPH_RECT, (4, 4)) bin1 = cv.morphologyEx(binary, cv.MORPH_OPEN, kernel=kernel) cv.imshow("bin1", bin1) textImage = Image.fromarray(bin1) text = tess.image_to_string(textImage) print("The result:", text) def main(): src = cv.imread("../images/yzm.jpg") cv.imshow("demo", src) recognition_demo(src) cv.waitKey(0) # 等有键输入或者1000ms后自动将窗口消除,0表示只用键输入结束窗口 cv.destroyAllWindows() # 关闭所有窗口 if __name__ == '__main__': main()
{'repo_name': 'Betterming/opencv_exercises', 'stars': '248', 'repo_language': 'Python', 'file_name': 'advance_4_kNN.py', 'mime_type': 'text/x-python', 'hash': 1965767806198953731, 'source_dataset': 'data'}
//// 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. //// --input-fields-terminated-by (char):: Sets the input field separator --input-lines-terminated-by (char):: Sets the input end-of-line char --input-optionally-enclosed-by (char):: Sets an input field-enclosing character --input-enclosed-by (char):: Sets a required input field encloser --input-escaped-by (char):: Sets the input escape character
{'repo_name': 'apache/sqoop', 'stars': '731', 'repo_language': 'Java', 'file_name': 'sqoop-env-template.sh', 'mime_type': 'text/plain', 'hash': 3184856432140156058, 'source_dataset': 'data'}
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from msrest.serialization import Model class WorkflowRunActionRepetitionDefinitionCollection(Model): """A collection of workflow run action repetitions. :param value: :type value: list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] """ _attribute_map = { 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, } def __init__(self, *, value=None, **kwargs) -> None: super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) self.value = value
{'repo_name': 'Azure/azure-sdk-for-python', 'stars': '1321', 'repo_language': 'Python', 'file_name': 'test_largest_block_blob.py', 'mime_type': 'text/x-python', 'hash': -4487236111351682179, 'source_dataset': 'data'}
/* 961206-1.c from the execute part of the gcc torture suite. */ #include <testfwk.h> #ifdef __SDCC #pragma std_c99 #endif // TODO: Enable when sdcc supports long long in these ports! #if !defined(__SDCC_ds390) && !defined(__SDCC_pic14) && !defined(__SDCC_pic16) int sub1 (unsigned long long i) { if (i < 0x80000000) return 1; else return 0; } int sub2 (unsigned long long i) { if (i <= 0x7FFFFFFF) return 1; else return 0; } int sub3 (unsigned long long i) { if (i >= 0x80000000) return 0; else return 1; } int sub4 (unsigned long long i) { if (i > 0x7FFFFFFF) return 0; else return 1; } #endif void testTortureExecute (void) { #if !defined(__SDCC_ds390) && !defined(__SDCC_pic14) && !defined(__SDCC_pic16) if (sub1 (0x80000000ULL)) ASSERT (0); if (sub2 (0x80000000ULL)) ASSERT (0); if (sub3 (0x80000000ULL)) ASSERT (0); if (sub4 (0x80000000ULL)) ASSERT (0); return; #endif }
{'repo_name': 'lronaldo/cpctelera', 'stars': '126', 'repo_language': 'C', 'file_name': 'build_config.mk', 'mime_type': 'text/x-makefile', 'hash': -828856644951890892, 'source_dataset': 'data'}
/* permutation/gsl_permute_vector_double.h * * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough * * This program 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; either version 3 of the License, or (at * your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __GSL_PERMUTE_VECTOR_DOUBLE_H__ #define __GSL_PERMUTE_VECTOR_DOUBLE_H__ #include <stdlib.h> #include "gsl_errno.h" #include "gsl_permutation.h" #include "gsl_vector_double.h" #undef __BEGIN_DECLS #undef __END_DECLS #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # define __BEGIN_DECLS /* empty */ # define __END_DECLS /* empty */ #endif __BEGIN_DECLS int gsl_permute_vector (const gsl_permutation * p, gsl_vector * v); int gsl_permute_vector_inverse (const gsl_permutation * p, gsl_vector * v); __END_DECLS #endif /* __GSL_PERMUTE_VECTOR_DOUBLE_H__ */
{'repo_name': 'praat/praat', 'stars': '552', 'repo_language': 'Objective-C', 'file_name': 'Artword_Speaker_Sound.h', 'mime_type': 'text/x-c', 'hash': 4096326880334168879, 'source_dataset': 'data'}
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2008 Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de> # Copyright (c) 2008 Center for Bioinformatics, University of Hamburg # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # from gt.core import * from gt.extended import * from gt.annotationsketch import * import sys import re if __name__ == "__main__": if len(sys.argv) != 2: sys.stderr.write("Usage: " + (sys.argv)[0] + " GFF3_file\n") sys.stderr.write("Show sequence ids contained in GFF3 annotation file.") sys.exit(1) in_stream = GFF3InStream((sys.argv)[1]) feature_index = FeatureIndexMemory() feature_stream = FeatureStream(in_stream, feature_index) gn = feature_stream.next_tree() # fill feature index while gn: gn = feature_stream.next_tree() seqids = feature_index.get_seqids() for seqid in seqids: print(seqid)
{'repo_name': 'genometools/genometools', 'stars': '165', 'repo_language': 'C', 'file_name': 'TransProt12', 'mime_type': 'text/plain', 'hash': -5752217517088671990, 'source_dataset': 'data'}
; Names are based on ; http://nesdevwiki.org/index.php/NES_PPU ; http://nesdevwiki.org/index.php/2A03 ; PPU registers PPUCTRL = $2000 NT_2000 = $00 NT_2400 = $01 NT_2800 = $02 NT_2C00 = $03 MSB_XSCROLL = $01 MSB_YSCROLL = $02 VRAM_RIGHT = $00 ; writes/reads to PPUDATA increment PPUADDR VRAM_ACROSS = $00 VRAM_DOWN = $04 ; writes/reads to PPUDATA add 32 to PPUADDR OBJ_0000 = $00 OBJ_1000 = $08 OBJ_8X8 = $00 OBJ_8X16 = $20 BG_0000 = $00 BG_1000 = $10 VBLANK_NMI = $80 PPUMASK = $2001 LIGHTGRAY = $01 BG_OFF = $00 BG_CLIP = $08 BG_ON = $0A OBJ_OFF = $00 OBJ_CLIP = $10 OBJ_ON = $14 INT_RED = %00100000 INT_GREEN = %01000000 INT_BLUE = %10000000 PPUSTATUS = $2002 SPR_OVERFLOW = %00100000 SPR_HIT = %01000000 VBLANK_STARTED = %10000000 OAMADDR = $2003 OAMDATA = $2004 PPUSCROLL = $2005 PPUADDR = $2006 PPUDATA = $2007 ; Pulse channel registers SQ1_VOL = $4000 SQ1_SWEEP = $4001 SQ1_LO = $4002 SQ1_HI = $4003 SQ2_VOL = $4004 SQ2_SWEEP = $4005 SQ2_LO = $4006 SQ2_HI = $4007 SQ_1_8 = $00 ; 1/8 duty (sounds sharp) SQ_1_4 = $40 ; 1/4 duty (sounds rich) SQ_1_2 = $80 ; 1/2 duty (sounds hollow) SQ_3_4 = $C0 ; 3/4 duty (sounds like 1/4) SQ_HOLD = $20 ; halt length counter SQ_CONSTVOL = $10 ; 0: envelope decays from 15 to 0; 1: constant volume SWEEP_OFF = $08 ; Triangle channel registers TRI_LINEAR = $4008 TRI_LO = $400A TRI_HI = $400B TRI_HOLD = $80 ; Noise channel registers NOISE_VOL = $400C NOISE_LO = $400E NOISE_HI = $400F NOISE_HOLD = SQ_HOLD NOISE_CONSTVOL = SQ_CONSTVOL NOISE_LOOP = $80 ; DPCM registers DMC_FREQ = $4010 DMC_RAW = $4011 DMC_START = $4012 DMC_LEN = $4013 ; OAM DMA unit register ; Writing $xx here causes 256 bytes to be copied from $xx00-$xxFF ; to OAMDATA OAM_DMA = $4014 OAMDMA = $4014 ; Sound channel control and status register SND_CHN = $4015 CH_SQ1 = %00000001 CH_SQ2 = %00000010 CH_TRI = %00000100 CH_NOISE = %00001000 CH_ALL = %00001111 ; all tone generators, not dpcm CH_DPCM = %00010000 JOY1 = $4016 JOY2 = $4017 APUCTRL = $4017 APUCTRL_5STEP = $80 APUCTRL_NOIRQ = $40 OAM_COLOR_0 = %00000000 OAM_COLOR_1 = %00000001 OAM_COLOR_2 = %00000010 OAM_COLOR_3 = %00000011 OAM_PRIORITY = %00100000 OAM_XFLIP = %01000000 OAM_YFLIP = %10000000 OAM_YPOS = $200 OAM_TILE = $201 OAM_ATTR = $202 OAM_XPOS = $203 KEY_RIGHT = %00000001 KEY_LEFT = %00000010 KEY_DOWN = %00000100 KEY_UP = %00001000 KEY_START = %00010000 KEY_SELECT= %00100000 KEY_B = %01000000 KEY_A = %10000000 KEY_SNES_A = %10000000 KEY_SNES_X = %01000000 KEY_SNES_L = %00100000 KEY_SNES_R = %00010000 ; and now macros ---------------------------------------------------------- .feature leading_dot_in_identifiers .macpack generic .macpack longbranch ; Meant to be an easy replacement for .repeat and .endrepeat ; when you're trying to save space. Uses a zeropage memory location ; instead of a register as a loop counter so as not to disturb any ; registers. ; Times - Number of times to loop ( may be a memory location ) ; Free - Free zeropage memory location to use .macro .dj_loop Times, Free .scope DJ_Counter = Free lda Times sta Free DJ_Label: .endmacro .macro .end_djl NextIndex: dec DJ_Counter jne DJ_Label .endscope .endmacro ; These use increments (useless) .macro .ij_loop Times, Free .scope DJ_Times = Times DJ_Counter = Free lda #0 sta Free DJ_Label: .endmacro .macro .end_ijl NextIndex: inc DJ_Counter lda DJ_Counter cmp Times jne DJ_Label .endscope .endmacro ; swap using X .macro swapx mema, memb ldx mema lda memb stx memb sta mema .endmacro ; swap using Y .macro swapy mema, memb ldy mema lda memb sty memb sta mema .endmacro ; swap using just A + stack .macro swapa mema, memb lda mema pha lda memb sta mema pla sta memb .endmacro ; swap array,x and array,y .macro swaparray list lda list,x pha lda list,y sta list,x pla sta list,y .endmacro ; Imitation of z80's djnz opcode. ; Can be on A, X, Y, or a zeropage memory location ; Label - Label to jump to ; Reg - Counter register to use: A,X,Y or memory location .macro djnz Label, Reg .if (.match({Reg}, a)) sub #1 .elseif (.match({Reg}, x)) dex .elseif (.match({Reg}, y)) dey .else dec var .endif bne Label .endmacro ; Working with X,Y is much more fun than working with PPU addresses ; give it an X and Y position, as well as a nametable number (0-3), ; and if you want to save the address to a 16-bit zeropage address ; ( big endian ) you can give an additional argument. ; NT - Nametable number (0-3) ; PX - X position in tiles ; PY - Y position in tiles ; Var - Variable to store address in (optional) .macro PositionXY NT, PX, PY, Var .scope t0 = $2000 + (NT * 1024) ; Nametable data starts at $2000 t1 = PX ; and each nametable is 1024 bytes in size t2 = PY * 32 ; Nametable rows are 32 bytes large t3 = t0 + t1 + t2 .ifblank Var ; Are we going to be writing this directly to PPUADDR? lda #>t3 sta $2006 lda #<t3 sta $2006 .else ; Are we going to be storing this to a pointer in zeropage instead? lda #>t3 sta Var+0 lda #<t3 sta Var+1 .endif .endscope .endmacro .macro .nyb InpA, InpB ; Makes a .byt storing two 4 bit values .byt ( InpA<<4 ) | InpB .endmacro .macro .raddr This ; like .addr but for making "RTS trick" tables with .addr This-1 .endmacro .macro neg eor #255 add #1 .endmacro .macro abs ; absolute value .local @Skip bpl @Skip neg @Skip: .endmacro .macro sex ; sign extend .local @Skip ora #$7F bmi @Skip lda #0 @Skip: .endmacro .macro neg16 lo, hi sec ;Ensure carry is set lda #0 ;Load constant zero sbc lo ;... subtract the least significant byte sta lo ;... and store the result lda #0 ;Load constant zero again sbc hi ;... subtract the most significant byte sta hi ;... and store the result .endmacro .macro neg16x lo, hi sec ;Ensure carry is set lda #0 ;Load constant zero sbc lo,x ;... subtract the least significant byte sta lo,x ;... and store the result lda #0 ;Load constant zero again sbc hi,x ;... subtract the most significant byte sta hi,x ;... and store the result .endmacro .macro inc16 variable .local @Skip inc variable+0 bne @Skip inc variable+1 @Skip: .endmacro .macro dec16 variable .local @Skip lda variable+0 bne @Skip dec variable+1 @Skip: dec variable+0 .endmacro .macro pushaxy pha txa pha tya pha .endmacro .macro pullaxy pla tay pla tax pla .endmacro .macro pushax pha txa pha .endmacro .macro pullax pla tax pla .endmacro .macro pushay pha tya pha .endmacro .macro pullay pla tay pla .endmacro .macro addcarry to .local @Skip bcc @Skip inc to @Skip: .endmacro .macro subcarry to .local @Skip bcs @Skip dec to @Skip: .endmacro .macro addcarryx to .local @Skip bcc @Skip inc to,x @Skip: .endmacro .macro subcarryx to .local @Skip bcs @Skip dec to,x @Skip: .endmacro .macro countdown counter .local @Skip lda counter beq @Skip dec counter @Skip: .endmacro ; --- conditional return --- .macro rtseq .local @Skip bne @Skip rts @Skip: .endmacro .macro rtsne .local @Skip beq @Skip rts @Skip: .endmacro .macro rtscc .local @Skip bcs @Skip rts @Skip: .endmacro .macro rtscs .local @Skip bcc @Skip rts @Skip: .endmacro .macro rtspl .local @Skip bmi @Skip rts @Skip: .endmacro .macro rtsmi .local @Skip bpl @Skip rts @Skip: .endmacro .macro unpack lo, hi pha and #15 sta lo pla lsr lsr lsr lsr sta hi .endmacro .macro unpackx lo, hi pha and #15 sta lo,x pla lsr lsr lsr lsr sta hi,x .endmacro .macro unpacky lo, hi pha and #15 sta lo,y pla lsr lsr lsr lsr sta hi,y .endmacro .macro skip2 .byt $2c ; BIT absolute .endmacro .macro asr ; Arithmetic shift left cmp #$80 ror .endmacro .macro notcarry ; toggles carry rol eor #1 ror .endmacro
{'repo_name': 'NovaSquirrel/NovaTheSquirrel', 'stars': '104', 'repo_language': 'Assembly', 'file_name': 'novapuzzle sfx.s', 'mime_type': 'text/x-asm', 'hash': -405959943486281631, 'source_dataset': 'data'}
#!/Volumes/Stuff/Dropbox/Code/Crouton_public/python_clients/venv/bin/python # -*- coding: utf-8 -*- import re import sys from setuptools.command.easy_install import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main())
{'repo_name': 'edfungus/Crouton', 'stars': '255', 'repo_language': 'Python', 'file_name': 'crouton-frame.less', 'mime_type': 'text/plain', 'hash': 1426224389208576900, 'source_dataset': 'data'}
using System; using System.Linq; using System.Threading.Tasks; using Cosmos.Core; using Cosmos.Debug.Kernel; namespace Cosmos.Core.Memory.Old { // This class must be static, as for creating objects, we need the heap // this heap implementation it the very most basic one: no reentrancy, etc. // Interrupts are disabled when trying to allocate a new block of memory. public static unsafe class Heap { private static Debugger mDebugger = new Debugger("Core", "Memory"); private static uint mEndOfRam; private static DataLookupTable* mLastTable; private static uint mLastEntryIndex = 0u; private static bool mInitialized = false; private static void DoInitialize(uint aEndOfRam) { mLastTable = null; mLastEntryIndex = 0u; mEndOfRam = aEndOfRam; // } internal static void EnsureIsInitialized() { if (!mInitialized) { mInitialized = true; DoInitialize((CPU.GetAmountOfRAM() - 1) * 1024 * 1024); } } private static void ClearMemory(void* aStartAddress, uint aLength) { //TODO: Move to memory. Internal access only... CPU.ZeroFill((uint)aStartAddress, aLength); } public static uint MemAlloc(uint aLength) { if (aLength == 0) { mDebugger.Send(" Request to retrieve block with size = 0 was halted!"); while (true) { } } bool xInterruptsWereEnabled = CPU.DisableInterrupts(); try { EnsureIsInitialized(); DataLookupTable* xCurrentTable = GlobalSystemInfo.GlobalInformationTable->FirstDataLookupTable; DataLookupTable* xPreviousTable = null; uint xResult; if (mLastTable != null) { xCurrentTable = mLastTable; } #region Loop through existing tables and see if we find a free spot while (xCurrentTable != null) { if (ScanDataLookupTable(xCurrentTable, aLength, out xResult)) { if (xResult < CPU.GetEndOfKernel()) { Debugger.DoSend("Wrong handle returned!"); while (true) { } } return xResult; } mLastTable = xPreviousTable; xPreviousTable = xCurrentTable; xCurrentTable = xCurrentTable->Next; mLastEntryIndex = 0; } #endregion Loop through existing tables and see if we find a free spot // no tables found, lets create a new one, and use that if (xPreviousTable == null) { // this check should theoretically be unnecessary, but lets keep it, to do some double-checking. Debugger.DoSend("No PreviousTable found!"); while (true) { } } var xLastItem = xPreviousTable->GetEntry(DataLookupTable.EntriesPerTable - 1); var xNextTablePointer = (DataLookupTable*)((uint)xLastItem->DataBlock + xLastItem->Size); // the memory hasn't been cleared yet, so lets do that now. ClearMemory(xNextTablePointer, GlobalSystemInfo.TotalDataLookupTableSize); xPreviousTable->Next = xNextTablePointer; xNextTablePointer->Previous = xPreviousTable; if (!ScanDataLookupTable(xNextTablePointer, aLength, out xResult)) { // Something seriously weird happened: we could create a new DataLookupTable (with new entries) // but couldn't allocate a new handle from it. Debugger.DoSend(" Something seriously weird happened: we could create a new DataLookupTable (with new entries), but couldn't allocate a new handle from it."); while (true) { } } mLastTable = xNextTablePointer; mLastEntryIndex = 0; return xResult; } finally { if (xInterruptsWereEnabled) { CPU.EnableInterrupts(); } else { //Debugger.DoSend(" Not enabling interrupts, because they weren't enabled yet!"); } } } private static bool ScanDataLookupTable(DataLookupTable* aTable, uint aSize, out uint aHandle) { //Debugger.DoSend("At address:"); //Debugger.DoSendNumber((uint)aTable); DataLookupEntry* xPreviousEntry = null; for (uint i = mLastEntryIndex; i < DataLookupTable.EntriesPerTable; i++) { var xCurrentEntry = aTable->GetEntry(i); //Debugger.DoSend($"Item.Size", xCurrentEntry->Size); //Debugger.DoSend($"Item.Refcount", xCurrentEntry->Refcount); if (xCurrentEntry->Size == 0) { #region Found an uninitialized entry // found an entry now. Let's set it if (aTable->Next != null) { // once a handle is used, the size should be set. But at this point, it somehow got unset again. // This should never occur. Debugger.DoSend("Found an entry which has no size, but there is a followup DataLookupTable"); while (true) { } } void* xDataBlock; //Debugger.DoSend("Now calculate datablock pointer"); // now we found ourself a free handle if (i == 0) { //Debugger.DoSend("Using table end"); // we don't have a previous handle yet, so we take the FirstByteAfterTable field of the DataLookupTable // note: we're explicitly initializing all blocks, as memory hasn't been cleared yet. var xTableAddr = (uint)aTable; //Debugger.DoSend("xTableAddr"); //Debugger.DoSendNumber(xTableAddr); var xTotalTableSize = GlobalSystemInfo.TotalDataLookupTableSize; //Debugger.DoSend("xTotalTableSize"); //Debugger.DoSendNumber(xTotalTableSize); xDataBlock = (void*)(xTableAddr + xTotalTableSize); } else { //Debugger.DoSend("Using previous entry"); // We're not the very first handle being assigned, so calculate the start address using the previous block xDataBlock = (void*)((uint)xPreviousEntry->DataBlock + xPreviousEntry->Size); } // make sure the memory is empty ClearMemory(xDataBlock, aSize); //Debugger.DoSend("Cleared memory"); xCurrentEntry->Size = aSize; xCurrentEntry->DataBlock = xDataBlock; xCurrentEntry->Refcount = 1; aHandle = (uint)xCurrentEntry->DataBlock; //Debugger.DoSend("Returning handle"); //Debugger.DoSendNumber(aHandle); mLastEntryIndex = i; #endregion Found an uninitialized entry return true; } // Refcount == UInt32.MaxValue, it means that the block has been reclaimed, and can be reused now. if (xCurrentEntry->Refcount == UInt32.MaxValue) { // we can reuse this entry if its Size >= aLength if (xCurrentEntry->Size >= aSize) { // we can reuse this entry xCurrentEntry->Refcount = 1; aHandle = (uint)xCurrentEntry->DataBlock; mLastEntryIndex = i; return true; } } xPreviousEntry = xCurrentEntry; } aHandle = 0; return false; } } }
{'repo_name': 'CosmosOS/Cosmos', 'stars': '1879', 'repo_language': 'C#', 'file_name': 'BeepDemo.csproj', 'mime_type': 'text/plain', 'hash': 6340113574669067746, 'source_dataset': 'data'}
{ lib, bundlerApp, bundlerUpdateScript }: bundlerApp { pname = "fpm"; gemdir = ./.; exes = [ "fpm" ]; passthru.updateScript = bundlerUpdateScript "fpm"; meta = with lib; { description = "Tool to build packages for multiple platforms with ease"; homepage = "https://github.com/jordansissel/fpm"; license = licenses.mit; maintainers = with maintainers; [ manveru nicknovitski ]; platforms = platforms.unix; }; }
{'repo_name': 'NixOS/nixpkgs-channels', 'stars': '161', 'repo_language': 'Nix', 'file_name': 'default.nix', 'mime_type': 'text/plain', 'hash': -1795636920469872499, 'source_dataset': 'data'}
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using System.Threading.Tasks; using Telegram.Td.Api; using Unigram.Collections; using Unigram.Common; using Unigram.Controls; using Unigram.Navigation.Services; using Unigram.Services; using Unigram.ViewModels.Delegates; using Unigram.Views.Folders; using Unigram.Views.Popups; using Windows.Foundation; using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Data; namespace Unigram.ViewModels { public class ChatsViewModel : TLViewModelBase, IDelegable<IChatsDelegate>, IChatListDelegate { private readonly INotificationsService _notificationsService; private readonly Dictionary<long, bool> _deletedChats = new Dictionary<long, bool>(); public IChatsDelegate Delegate { get; set; } public ChatsViewModel(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator, INotificationsService notificationsService, ChatList chatList) : base(protoService, cacheService, settingsService, aggregator) { _notificationsService = notificationsService; Items = new ItemsCollection(protoService, aggregator, this, chatList); SearchFilters = new MvxObservableCollection<ISearchChatsFilter>(); ChatPinCommand = new RelayCommand<Chat>(ChatPinExecute); ChatArchiveCommand = new RelayCommand<Chat>(ChatArchiveExecute); ChatMarkCommand = new RelayCommand<Chat>(ChatMarkExecute); ChatNotifyCommand = new RelayCommand<Chat>(ChatNotifyExecute); ChatDeleteCommand = new RelayCommand<Chat>(ChatDeleteExecute); ChatClearCommand = new RelayCommand<Chat>(ChatClearExecute); ChatSelectCommand = new RelayCommand<Chat>(ChatSelectExecute); ChatsMarkCommand = new RelayCommand(ChatsMarkExecute); ChatsNotifyCommand = new RelayCommand(ChatsNotifyExecute); ChatsArchiveCommand = new RelayCommand(ChatsArchiveExecute); ChatsDeleteCommand = new RelayCommand(ChatsDeleteExecute); ChatsClearCommand = new RelayCommand(ChatsClearExecute); FolderAddCommand = new RelayCommand<(int, Chat)>(FolderAddExecute); FolderRemoveCommand = new RelayCommand<(int, Chat)>(FolderRemoveExecute); FolderCreateCommand = new RelayCommand<Chat>(FolderCreateExecute); ClearRecentChatsCommand = new RelayCommand(ClearRecentChatsExecute); TopChatDeleteCommand = new RelayCommand<Chat>(TopChatDeleteExecute); #if MOCKUP Items.AddRange(protoService.GetChats(null)); #endif SelectedItems = new MvxObservableCollection<Chat>(); } #region Selection private long? _selectedItem; public long? SelectedItem { get { return _selectedItem; } set { Set(ref _selectedItem, value); } } private MvxObservableCollection<Chat> _selectedItems; public MvxObservableCollection<Chat> SelectedItems { get { return _selectedItems; } set { Set(ref _selectedItems, value); } } private ListViewSelectionMode _selectionMode = ListViewSelectionMode.None; public ListViewSelectionMode SelectionMode { get { return _selectionMode; } set { Set(ref _selectionMode, value); } } public int SelectedCount => _selectedItems.Count; public void SetSelectionMode(bool enabled) { Delegate?.SetSelectionMode(enabled); } public void SetSelectedItem(Chat chat) { if (SelectionMode != ListViewSelectionMode.Multiple) { Delegate?.Navigate(chat); //ChatsList.SelectedItem = chat; } } public void SetSelectedItems(IList<Chat> chats) { //if (ViewModel.Chats.SelectionMode == ListViewSelectionMode.Multiple) //{ // foreach (var item in chats) // { // if (!ChatsList.SelectedItems.Contains(item)) // { // ChatsList.SelectedItems.Add(item); // } // } // foreach (Chat item in ChatsList.SelectedItems) // { // if (!chats.Contains(item)) // { // ChatsList.SelectedItems.Remove(item); // } // } //} } public void AddSelectedItem(Chat chat) { SelectedItems.Add(chat); } public void RemoveSelectedItem(Chat chat) { SelectedItems.Remove(chat); } public bool IsItemSelected(Chat chat) { return SelectedItems.Contains(chat); } #endregion public ItemsCollection Items { get; private set; } public bool IsLastSliceLoaded { get; set; } private SearchChatsCollection _search; public SearchChatsCollection Search { get { return _search; } set { Set(ref _search, value); } } public MvxObservableCollection<ISearchChatsFilter> SearchFilters { get; private set; } private TopChatsCollection _topChats; public TopChatsCollection TopChats { get { return _topChats; } set { Set(ref _topChats, value); } } #region Pin public RelayCommand<Chat> ChatPinCommand { get; } private void ChatPinExecute(Chat chat) { var position = chat.GetPosition(Items.ChatList); if (position == null) { return; } ProtoService.Send(new ToggleChatIsPinned(Items.ChatList, chat.Id, !position.IsPinned)); } #endregion #region Archive public RelayCommand<Chat> ChatArchiveCommand { get; } private void ChatArchiveExecute(Chat chat) { var archived = chat.Positions.Any(x => x.List is ChatListArchive); if (archived) { ProtoService.Send(new AddChatToList(chat.Id, new ChatListMain())); return; } else { ProtoService.Send(new AddChatToList(chat.Id, new ChatListArchive())); } Delegate?.ShowChatsUndo(new[] { chat }, UndoType.Archive, items => { var undo = items.FirstOrDefault(); if (undo == null) { return; } ProtoService.Send(new AddChatToList(chat.Id, new ChatListMain())); }); } #endregion #region Multiple Archive public RelayCommand ChatsArchiveCommand { get; } private void ChatsArchiveExecute() { var chats = SelectedItems.ToList(); foreach (var chat in chats) { ProtoService.Send(new AddChatToList(chat.Id, new ChatListArchive())); } Delegate?.ShowChatsUndo(chats, UndoType.Archive, items => { foreach (var undo in items) { ProtoService.Send(new AddChatToList(undo.Id, new ChatListMain())); } }); Delegate?.SetSelectionMode(false); SelectedItems.Clear(); } #endregion #region Mark public RelayCommand<Chat> ChatMarkCommand { get; } private void ChatMarkExecute(Chat chat) { if (chat.UnreadCount > 0) { ProtoService.Send(new ViewMessages(chat.Id, 0, new[] { chat.LastMessage.Id }, true)); if (chat.UnreadMentionCount > 0) { ProtoService.Send(new ReadAllChatMentions(chat.Id)); } } else { ProtoService.Send(new ToggleChatIsMarkedAsUnread(chat.Id, !chat.IsMarkedAsUnread)); } } #endregion #region Multiple Mark public RelayCommand ChatsMarkCommand { get; } private void ChatsMarkExecute() { var chats = SelectedItems.ToList(); var unread = chats.Any(x => x.IsUnread()); foreach (var chat in chats) { if (unread) { if (chat.UnreadCount > 0) { ProtoService.Send(new ViewMessages(chat.Id, 0, new[] { chat.LastMessage.Id }, true)); } else if (chat.IsMarkedAsUnread) { ProtoService.Send(new ToggleChatIsMarkedAsUnread(chat.Id, false)); } if (chat.UnreadMentionCount > 0) { ProtoService.Send(new ReadAllChatMentions(chat.Id)); } } else if (chat.UnreadCount == 0 && !chat.IsMarkedAsUnread) { ProtoService.Send(new ToggleChatIsMarkedAsUnread(chat.Id, true)); } } Delegate?.SetSelectionMode(false); SelectedItems.Clear(); } #endregion #region Notify public RelayCommand<Chat> ChatNotifyCommand { get; } private void ChatNotifyExecute(Chat chat) { _notificationsService.SetMuteFor(chat, CacheService.GetNotificationSettingsMuteFor(chat) > 0 ? 0 : 632053052); } #endregion #region Multiple Notify public RelayCommand ChatsNotifyCommand { get; } private void ChatsNotifyExecute() { var chats = SelectedItems.ToList(); var muted = chats.Any(x => CacheService.GetNotificationSettingsMuteFor(x) > 0); foreach (var chat in chats) { if (chat.Type is ChatTypePrivate privata && privata.UserId == CacheService.Options.MyId) { continue; } _notificationsService.SetMuteFor(chat, muted ? 0 : 632053052); } Delegate?.SetSelectionMode(false); SelectedItems.Clear(); } #endregion #region Delete public RelayCommand<Chat> ChatDeleteCommand { get; } private async void ChatDeleteExecute(Chat chat) { var updated = await ProtoService.SendAsync(new GetChat(chat.Id)) as Chat ?? chat; var dialog = new DeleteChatPopup(ProtoService, updated, Items.ChatList, false); var confirm = await dialog.ShowQueuedAsync(); if (confirm == ContentDialogResult.Primary) { var check = dialog.IsChecked == true; _deletedChats[chat.Id] = true; Items.Handle(chat.Id, 0); Delegate?.ShowChatsUndo(new[] { chat }, UndoType.Delete, items => { var undo = items.FirstOrDefault(); if (undo == null) { return; } _deletedChats.Remove(undo.Id); Items.Handle(undo.Id, undo.Positions); }, async items => { var delete = items.FirstOrDefault(); if (delete == null) { return; } if (delete.Type is ChatTypeSecret secret) { await ProtoService.SendAsync(new CloseSecretChat(secret.SecretChatId)); } else if (delete.Type is ChatTypeBasicGroup || delete.Type is ChatTypeSupergroup) { await ProtoService.SendAsync(new LeaveChat(delete.Id)); } var user = CacheService.GetUser(delete); if (user != null && user.Type is UserTypeRegular) { ProtoService.Send(new DeleteChatHistory(delete.Id, true, check)); } else { if (delete.Type is ChatTypePrivate && check) { await ProtoService.SendAsync(new ToggleChatIsBlocked(delete.Id, true)); } ProtoService.Send(new DeleteChatHistory(delete.Id, true, false)); } }); } } #endregion #region Multiple Delete public RelayCommand ChatsDeleteCommand { get; } private async void ChatsDeleteExecute() { var chats = SelectedItems.ToList(); var confirm = await MessagePopup.ShowAsync(Strings.Resources.AreYouSureDeleteFewChats, Locale.Declension("ChatsSelected", chats.Count), Strings.Resources.Delete, Strings.Resources.Cancel); if (confirm == ContentDialogResult.Primary) { foreach (var chat in chats) { _deletedChats[chat.Id] = true; Items.Handle(chat.Id, 0); } Delegate?.ShowChatsUndo(chats, UndoType.Delete, items => { foreach (var undo in items) { _deletedChats.Remove(undo.Id); Items.Handle(undo.Id, undo.Positions); } }, async items => { foreach (var delete in items) { if (delete.Type is ChatTypeSecret secret) { await ProtoService.SendAsync(new CloseSecretChat(secret.SecretChatId)); } else if (delete.Type is ChatTypeBasicGroup || delete.Type is ChatTypeSupergroup) { await ProtoService.SendAsync(new LeaveChat(delete.Id)); } ProtoService.Send(new DeleteChatHistory(delete.Id, true, false)); } }); } Delegate?.SetSelectionMode(false); SelectedItems.Clear(); } #endregion #region Clear public RelayCommand<Chat> ChatClearCommand { get; } private async void ChatClearExecute(Chat chat) { var updated = await ProtoService.SendAsync(new GetChat(chat.Id)) as Chat ?? chat; var dialog = new DeleteChatPopup(ProtoService, updated, Items.ChatList, true); var confirm = await dialog.ShowQueuedAsync(); if (confirm == ContentDialogResult.Primary) { Delegate?.ShowChatsUndo(new[] { chat }, UndoType.Clear, items => { var undo = items.FirstOrDefault(); if (undo == null) { return; } _deletedChats.Remove(undo.Id); Items.Handle(undo.Id, undo.Positions); }, items => { foreach (var delete in items) { ProtoService.Send(new DeleteChatHistory(delete.Id, false, dialog.IsChecked)); } }); } } #endregion #region Multiple Clear public RelayCommand ChatsClearCommand { get; } private async void ChatsClearExecute() { var chats = SelectedItems.ToList(); var confirm = await MessagePopup.ShowAsync(Strings.Resources.AreYouSureClearHistoryFewChats, Locale.Declension("ChatsSelected", chats.Count), Strings.Resources.ClearHistory, Strings.Resources.Cancel); if (confirm == ContentDialogResult.Primary) { Delegate?.ShowChatsUndo(chats, UndoType.Clear, items => { foreach (var undo in items) { _deletedChats.Remove(undo.Id); Items.Handle(undo.Id, undo.Positions); } }, items => { var clear = items.FirstOrDefault(); if (clear == null) { return; } ProtoService.Send(new DeleteChatHistory(clear.Id, false, false)); }); } Delegate?.SetSelectionMode(false); SelectedItems.Clear(); } #endregion #region Select public RelayCommand<Chat> ChatSelectCommand { get; } private void ChatSelectExecute(Chat chat) { SelectedItems.ReplaceWith(new[] { chat }); SelectionMode = ListViewSelectionMode.Multiple; //Delegate?.SetSelectedItems(_selectedItems); } #endregion #region Commands public RelayCommand ClearRecentChatsCommand { get; } private async void ClearRecentChatsExecute() { var confirm = await MessagePopup.ShowAsync(Strings.Resources.ClearSearch, Strings.Resources.AppName, Strings.Resources.OK, Strings.Resources.Cancel); if (confirm != ContentDialogResult.Primary) { return; } ProtoService.Send(new ClearRecentlyFoundChats()); var items = Search; if (items != null && string.IsNullOrEmpty(items.Query)) { items.Clear(); } } public RelayCommand<Chat> TopChatDeleteCommand { get; } private async void TopChatDeleteExecute(Chat chat) { if (chat == null) { return; } var confirm = await MessagePopup.ShowAsync(string.Format(Strings.Resources.ChatHintsDelete, CacheService.GetTitle(chat)), Strings.Resources.AppName, Strings.Resources.OK, Strings.Resources.Cancel); if (confirm != ContentDialogResult.Primary) { return; } ProtoService.Send(new RemoveTopChat(new TopChatCategoryUsers(), chat.Id)); TopChats.Remove(chat); } #endregion #region Folder add public RelayCommand<(int, Chat)> FolderAddCommand { get; } private async void FolderAddExecute((int ChatFilterId, Chat Chat) data) { var filter = await ProtoService.SendAsync(new GetChatFilter(data.ChatFilterId)) as ChatFilter; if (filter == null) { return; } var total = filter.IncludedChatIds.Count + filter.PinnedChatIds.Count + 1; if (total > 99) { await MessagePopup.ShowAsync(Strings.Resources.FilterAddToAlertFullText, Strings.Resources.FilterAddToAlertFullTitle, Strings.Resources.OK); return; } if (filter.IncludedChatIds.Contains(data.Chat.Id)) { // Warn user about chat being already in the folder? return; } filter.ExcludedChatIds.Remove(data.Chat.Id); filter.IncludedChatIds.Add(data.Chat.Id); ProtoService.Send(new EditChatFilter(data.ChatFilterId, filter)); } #endregion #region Folder remove public RelayCommand<(int, Chat)> FolderRemoveCommand { get; } private async void FolderRemoveExecute((int ChatFilterId, Chat Chat) data) { var filter = await ProtoService.SendAsync(new GetChatFilter(data.ChatFilterId)) as ChatFilter; if (filter == null) { return; } var total = filter.ExcludedChatIds.Count + 1; if (total > 99) { await MessagePopup.ShowAsync(Strings.Resources.FilterRemoveFromAlertFullText, Strings.Resources.AppName, Strings.Resources.OK); return; } if (filter.ExcludedChatIds.Contains(data.Chat.Id)) { // Warn user about chat being already in the folder? return; } filter.IncludedChatIds.Remove(data.Chat.Id); filter.ExcludedChatIds.Add(data.Chat.Id); ProtoService.Send(new EditChatFilter(data.ChatFilterId, filter)); } #endregion #region Folder create public RelayCommand<Chat> FolderCreateCommand { get; } private void FolderCreateExecute(Chat chat) { NavigationService.Navigate(typeof(FolderPage), state: new NavigationState { { "included_chat_id", chat.Id } }); } #endregion public void SetFilter(ChatList chatList) { Aggregator.Unsubscribe(Items); Items = new ItemsCollection(ProtoService, Aggregator, this, chatList); RaisePropertyChanged(() => Items); } public class ItemsCollection : ObservableCollection<Chat>, ISupportIncrementalLoading, IHandle<UpdateChatDraftMessage>, IHandle<UpdateChatLastMessage>, IHandle<UpdateChatPosition> { private readonly IProtoService _protoService; private readonly IEventAggregator _aggregator; private readonly DisposableMutex _loadMoreLock = new DisposableMutex(); private readonly ChatsViewModel _viewModel; private readonly ChatList _chatList; private bool _hasMoreItems = true; private long _internalChatId = 0; private long _internalOrder = long.MaxValue; private long _lastChatId; private long _lastOrder; public ChatList ChatList => _chatList; public ItemsCollection(IProtoService protoService, IEventAggregator aggregator, ChatsViewModel viewModel, ChatList chatList) { _protoService = protoService; _aggregator = aggregator; _viewModel = viewModel; _chatList = chatList; #if MOCKUP _hasMoreItems = false; #endif _ = LoadMoreItemsAsync(0); } public IAsyncOperation<LoadMoreItemsResult> LoadMoreItemsAsync(uint count) { return AsyncInfo.Run(token => LoadMoreItemsAsync()); } private async Task<LoadMoreItemsResult> LoadMoreItemsAsync() { using (await _loadMoreLock.WaitAsync()) { //var response = await _protoService.SendAsync(new GetChats(_chatList, _internalOrder, _internalChatId, 20)); var response = await _protoService.GetChatListAsync(_chatList, Count, 20); if (response is Telegram.Td.Api.Chats chats) { foreach (var id in chats.ChatIds) { var chat = _protoService.GetChat(id); var order = chat.GetOrder(_chatList); if (chat != null && order != 0) { _internalChatId = chat.Id; _internalOrder = order; var next = NextIndexOf(chat, order); if (next >= 0) { Insert(next, chat); } _lastChatId = chat.Id; _lastOrder = order; } } _hasMoreItems = chats.ChatIds.Count > 0; _aggregator.Subscribe(this); _viewModel.Delegate?.SetSelectedItems(_viewModel.SelectedItems); return new LoadMoreItemsResult { Count = (uint)chats.ChatIds.Count }; } return new LoadMoreItemsResult { Count = 0 }; } } public bool HasMoreItems => _hasMoreItems; #region Handle public void Handle(UpdateChatPosition update) { if (update.Position.List.ListEquals(_chatList)) { Handle(update.ChatId, update.Position.Order); } } public void Handle(UpdateChatLastMessage update) { Handle(update.ChatId, update.Positions, true); } public void Handle(UpdateChatDraftMessage update) { Handle(update.ChatId, update.Positions, true); } public void Handle(long chatId, IList<ChatPosition> positions, bool lastMessage = false) { var chat = GetChat(chatId); var order = chat.GetOrder(_chatList); Handle(chat, order, lastMessage); } public void Handle(long chatId, long order) { var chat = GetChat(chatId); if (chat != null) { Handle(chat, order, false); } } private void Handle(Chat chat, long order, bool lastMessage) { if (_viewModel._deletedChats.ContainsKey(chat.Id)) { if (order == 0) { _viewModel._deletedChats.Remove(chat.Id); } else { return; } } //var chat = GetChat(chatId); if (chat != null /*&& _chatList.ListEquals(chat.ChatList)*/) { _viewModel.BeginOnUIThread(() => UpdateChatOrder(chat, order, lastMessage)); } } private async void UpdateChatOrder(Chat chat, long order, bool lastMessage) { if (order > _lastOrder || (order == _lastOrder && chat.Id >= _lastChatId)) { using (await _loadMoreLock.WaitAsync()) { var next = NextIndexOf(chat, order); if (next >= 0) { Remove(chat); Insert(Math.Min(Count, next), chat); if (chat.Id == _viewModel._selectedItem) { _viewModel.Delegate?.SetSelectedItem(chat); } if (_viewModel.SelectedItems.Contains(chat)) { _viewModel.Delegate?.SetSelectedItems(_viewModel._selectedItems); } } else if (lastMessage) { _viewModel.Delegate?.UpdateChatLastMessage(chat); } } } else { using (await _loadMoreLock.WaitAsync()) { Remove(chat); } if (chat.Id == _viewModel._selectedItem) { _viewModel.Delegate?.SetSelectedItem(chat); } if (_viewModel.SelectedItems.Contains(chat)) { _viewModel.SelectedItems.Remove(chat); _viewModel.Delegate?.SetSelectedItems(_viewModel._selectedItems); } if (!_hasMoreItems) { await LoadMoreItemsAsync(0); } } } private int NextIndexOf(Chat chat, long order) { var prev = -1; var next = 0; for (int i = 0; i < Count; i++) { var item = this[i]; if (item.Id == chat.Id) { prev = i; continue; } var itemOrder = item.GetOrder(_chatList); if (order > itemOrder || order == itemOrder && chat.Id >= item.Id) { return next == prev ? -1 : next; } next++; } return Count; } private Chat GetChat(long chatId) { //if (_viewModels.ContainsKey(chatId)) //{ // return _viewModels[chatId]; //} //else //{ // var chat = ProtoService.GetChat(chatId); // var item = _viewModels[chatId] = new ChatViewModel(ProtoService, chat); // return item; //} return _protoService.GetChat(chatId); } #endregion } } public class SearchResult { public Chat Chat { get; set; } public User User { get; set; } public string Query { get; set; } public bool IsPublic { get; set; } public SearchResult(Chat chat, string query, bool pub) { Chat = chat; Query = query; IsPublic = pub; } public SearchResult(User user, string query, bool pub) { User = user; Query = query; IsPublic = pub; } } } namespace Telegram.Td.Api { [Flags] public enum ChatListFilterFlags { IncludeContacts, IncludeNonContacts, IncludeGroups, IncludeChannels, IncludeBots, ExcludeMuted, ExcludeRead, ExcludeArchived } }
{'repo_name': 'UnigramDev/Unigram', 'stars': '1077', 'repo_language': 'C#', 'file_name': 'TDLib-logs.md', 'mime_type': 'text/plain', 'hash': 1910934609073818348, 'source_dataset': 'data'}
package com.example.appautocompletetextviewdemo1; //LAMW: Lazarus Android Module Wizard - version 0.7 - 04 July - 2016 //RAD Android: Project Wizard, Form Designer and Components Development Model! //https://github.com/jmpessoa/lazandroidmodulewizard //http://forum.lazarus.freepascal.org/index.php/topic,21919.270.html //Android Java Interface for LAZARUS [december/2013 by jmpessoa] //Developers: // Simon,Choi / Choi,Won-sik // simonsayz@naver.com // http://blog.naver.com/simonsayz // // LoadMan / Jang,Yang-Ho // wkddidgh@naver.com // http://blog.naver.com/wkddidgh // // Jose Marques Pessoa / jmpessoa@hotmail.com // //Version //History // 2013.02.24 ver0.01 Started // 2013.02.28 ver0.02 added Delphi Style // 2013.03.01 ver0.03 added sysInfo // 2013.03.05 ver0.04 added Java Loading Png // 2013.03.08 ver0.05 Restructuring (Interlation #.02) // 2013.07.13 ver0.06 added TForm // 2013.07.22 ver0.07 added Back Event for Close // 2013.07.26 ver0.08 Class,Method Cache (Single Thread,Class) // 2013.07.30 ver0.09 added TEditText Keyboard,Focus // 2013.08.02 ver0.10 added TextView - Enabled // 2013.08.05 ver0.11 added Form Object // 2013.08.11 ver0.12 added Canvas // added Direct Bitmap access // 2013.08.14 ver0.13 Fixed Memory Leak // 2013.08.18 ver0.14 added OpenGL ES1 2D (Stencil) // 2013.08.21 ver0.15 Fixed jImageBtn Memory Leak // Fixed Socket Buffer // 2013.08.23 ver0.16 Fixed Memory Leak for Form,Control // added Form Stack // 2013.08.24 ver0.17 added Thread // 2013.08.26 ver0.18 added OpenGL ES2 2D/3D // added Button Font Color/Height // 2013.08.31 ver0.19 added Unified OpenGL ES1,2 Canvas // added OpenGL ES1,2 Simulator for Windows // 2013.09.01 ver0.20 added GLThread on Canvas // Fixed OpenGL Crash // rename example Name // 12.2013 LAMW Started by jmpessoa import android.annotation.SuppressLint; import android.app.ActionBar; import android.app.Activity; import android.app.Dialog; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.AssetManager; import android.content.res.Configuration; import android.content.res.Resources; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.hardware.Sensor; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Environment; import android.os.Vibrator; import android.telephony.SmsManager; import android.telephony.SmsMessage; import android.telephony.TelephonyManager; import android.provider.ContactsContract; import android.provider.MediaStore; import android.util.DisplayMetrics; import android.util.TypedValue; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.net.wifi.WifiManager; import android.util.Log; import android.view.ContextMenu; import android.view.Menu; import android.view.MenuItem; import android.view.SurfaceHolder; import android.view.View.OnClickListener; import android.view.View; import android.view.ViewGroup; import android.view.inputmethod.InputMethodManager; import android.view.WindowManager; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.RelativeLayout.LayoutParams; import android.widget.RelativeLayout; import android.widget.Toast; import java.io.*; import java.lang.Class; import java.nio.ByteBuffer; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; import java.util.Locale; import java.lang.reflect.*; //------------------------------------------------------------------------- //Constants //------------------------------------------------------------------------- class Const { public static final int TouchDown = 0; public static final int TouchMove = 1; public static final int TouchUp = 2; public static final int Click_Default = 0; } //------------------------------------------------------------------------- //Form //------------------------------------------------------------------------- class jForm { // Java-Pascal Interface private long PasObj = 0; // Pascal Obj private Controls controls = null; // Control Class for Event private RelativeLayout layout = null; private LayoutParams layparam = null; private RelativeLayout parent = null; private OnClickListener onClickListener; // event private OnClickListener onViewClickListener; // generic delegate event private OnItemClickListener onListItemClickListener; private Boolean enabled = true; // private Intent intent; private int mCountTab = 0; // Constructor public jForm(Controls ctrls, long pasobj) { PasObj = pasobj; controls = ctrls; layout = new RelativeLayout(controls.activity); layparam = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); layout.setLayoutParams(layparam); // Init Event onClickListener = new OnClickListener() { public void onClick(View view) { if (enabled) { controls.pOnClick(PasObj,Const.Click_Default); } }; }; //geric list item click Event - experimental component model! onListItemClickListener = new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View v, int position, long id) { controls.jAppOnListItemClick(parent, v, position, v.getId()); } }; //Init Event onViewClickListener = new OnClickListener() { public void onClick(View view) { if (enabled) { controls.jAppOnViewClick(view, view.getId()); } }; }; layout.setOnClickListener(onClickListener); } public RelativeLayout GetLayout() { return layout; } public RelativeLayout GetView() { return layout; } public void Show(int effect) { controls.appLayout.addView(layout); parent = controls.appLayout; } public void Close(int effect ) { controls.pOnClose(PasObj); } public void Close2() { controls.appLayout.removeView(layout); controls.pOnClose(PasObj); } public boolean IsConnected(){ // by renabor boolean r = false; ConnectivityManager cm = (ConnectivityManager)controls.activity.getSystemService(Context.CONNECTIVITY_SERVICE); if (cm == null) return r; NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); if (activeNetwork == null) return r; return activeNetwork != null && activeNetwork.isConnectedOrConnecting(); } public boolean IsConnectedWifi(){ // by renabor boolean r = false; ConnectivityManager cm = (ConnectivityManager)controls.activity.getSystemService(Context.CONNECTIVITY_SERVICE); if (cm == null) return r; NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); if (activeNetwork == null) return r; return activeNetwork.getType() == ConnectivityManager.TYPE_WIFI; } public boolean IsConnectedTo(int _connectionType) { int r = -1; if (!IsConnected()) return false; ConnectivityManager cm = (ConnectivityManager)controls.activity.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); if (activeNetwork != null) { switch (activeNetwork.getType()){ case ConnectivityManager.TYPE_MOBILE: r = 0; break; //0 case ConnectivityManager.TYPE_WIFI: r = 1; break; //1 case ConnectivityManager.TYPE_BLUETOOTH: r = 2; break; //7 case ConnectivityManager.TYPE_ETHERNET: r = 3; break; //9 } } if (r == _connectionType) return true; else return false; } // public void SetVisible ( boolean visible ) { if (visible) { if (layout.getParent() == null) { controls.appLayout.addView(layout); } } else { if (layout.getParent() != null) { controls.appLayout.removeView(layout); } }; } // public void SetEnabled ( boolean enabled ) { for (int i = 0; i < layout.getChildCount(); i++) { View child = layout.getChildAt(i); child.setEnabled(enabled); } } public void ShowMessage(String msg){ Log.i("ShowMessage", msg); Toast.makeText(controls.activity, msg, Toast.LENGTH_SHORT).show(); } public String GetDateTime() { SimpleDateFormat formatter = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss", Locale.getDefault() ); return( formatter.format ( new Date () ) ); } //Free object except Self, Pascal Code Free the class. public void Free() { if (parent != null) { controls.appLayout.removeView(layout); } onClickListener = null; layout.setOnClickListener(null); layparam = null; layout = null; } //http://startandroid.ru/en/lessons/complete-list/250-lesson-29-invoking-activity-and-getting-a-result-startactivityforresult-method.html public String GetStringExtra(Intent data, String extraName) { String valueStr; valueStr= ""; if (data != null) { valueStr = data.getStringExtra(extraName); } return valueStr; } public int GetIntExtra(Intent data, String extraName, int defaultValue) { int value; value = defaultValue; if (data != null) { value = data.getIntExtra(extraName, defaultValue); } return value; } public double GetDoubleExtra(Intent data, String extraName, double defaultValue) { double value; value = defaultValue; if (data != null) { value = data.getDoubleExtra(extraName, defaultValue); } return value; } public OnClickListener GetOnViewClickListener () { return this.onViewClickListener; } public OnItemClickListener GetOnListItemClickListener () { return this.onListItemClickListener; } public int getSystemVersion() { return controls.systemVersion; } public boolean SetWifiEnabled(boolean _status) { WifiManager wifiManager = (WifiManager)this.controls.activity.getSystemService(Context.WIFI_SERVICE); return wifiManager.setWifiEnabled(_status); } public boolean IsWifiEnabled() { WifiManager wifiManager = (WifiManager)this.controls.activity.getSystemService(Context.WIFI_SERVICE); return wifiManager.isWifiEnabled(); } public boolean IsMobileDataEnabled() { boolean mobileDataEnabled = false; // Assume disabled ConnectivityManager cm = (ConnectivityManager) controls.activity.getSystemService(Context.CONNECTIVITY_SERVICE); try { final Class<?> cmClass = Class.forName(cm.getClass().getName()); Method method = cmClass.getDeclaredMethod("getMobileDataEnabled"); method.setAccessible(true); // Make the method callable // get the setting for "mobile data" mobileDataEnabled = (Boolean)method.invoke(cm); } catch (Exception e) { // Some problem accessible private API // TODO do whatever error handling you want here } return mobileDataEnabled; } public String GetEnvironmentDirectoryPath(int _directory) { File filePath= null; String absPath=""; //fail! //Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS);break; //only Api 19! if (_directory != 8) { switch(_directory) { case 0: filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); break; case 1: filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM); break; case 2: filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MUSIC); break; case 3: filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); break; case 4: filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_NOTIFICATIONS); break; case 5: filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES); break; case 6: filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PODCASTS); break; case 7: filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_RINGTONES); break; case 9: absPath = this.controls.activity.getFilesDir().getAbsolutePath(); break; //Result : /data/data/com/MyApp/files case 10: absPath = this.controls.activity.getFilesDir().getPath(); absPath = absPath.substring(0, absPath.lastIndexOf("/")) + "/databases"; break; case 11: absPath = this.controls.activity.getFilesDir().getPath(); absPath = absPath.substring(0, absPath.lastIndexOf("/")) + "/shared_prefs"; break; } //Make sure the directory exists. if (_directory < 8) { filePath.mkdirs(); absPath= filePath.getPath(); } }else { //== 8 if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) == true) { filePath = Environment.getExternalStorageDirectory(); //sdcard! // Make sure the directory exists. filePath.mkdirs(); absPath= filePath.getPath(); } } return absPath; } public String GetInternalAppStoragePath() { //GetAbsoluteDirectoryPath String PathDat = this.controls.activity.getFilesDir().getAbsolutePath(); //Result : /data/data/com/MyApp/files return PathDat; } private void copyFileUsingFileStreams(File source, File dest) throws IOException { InputStream input = null; OutputStream output = null; try { input = new FileInputStream(source); output = new FileOutputStream(dest); byte[] buf = new byte[1024]; int bytesRead; while ((bytesRead = input.read(buf)) > 0) { output.write(buf, 0, bytesRead); } } finally { input.close(); output.close(); } } public boolean CopyFile(String _scrFullFileName, String _destFullFileName) { File src= new File(_scrFullFileName); File dest= new File(_destFullFileName); try { copyFileUsingFileStreams(src, dest); return true; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } } //ref. https://xjaphx.wordpress.com/2011/10/02/store-and-use-files-in-assets/ //result: path to new storage [Internal App Storage] public String LoadFromAssets(String _filename){ String pathRes=""; InputStream is = null; FileOutputStream fos = null; String PathDat = controls.activity.getFilesDir().getAbsolutePath(); try { File outfile = new File(PathDat, _filename); fos = new FileOutputStream(outfile); //save to data/data/your_package/files/your_file_name is = controls.activity.getAssets().open(_filename); int size = is.available(); byte[] buffer = new byte[size]; for (int c = is.read(buffer); c != -1; c = is.read(buffer)){ fos.write(buffer, 0, c); } is.close(); fos.close(); pathRes= PathDat +"/"+ _filename; }catch (IOException e) { e.printStackTrace(); } return pathRes; } public boolean IsSdCardMounted() { return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED); } public void DeleteFile(String _filename) { this.controls.activity.deleteFile(_filename); } public void DeleteFile(String _fullPath, String _filename) { File file; if ( _fullPath.equalsIgnoreCase("") ) { file = new File(Environment.getExternalStorageDirectory()+"/"+ _filename); // root } else { file = new File(_fullPath+"/"+ _filename); } file.delete(); } public void DeleteFile(int _environmentDir, String _filename) { String baseDir = GetEnvironmentDirectoryPath(_environmentDir); if (!baseDir.equalsIgnoreCase("")) { File file = new File(baseDir, _filename); file.delete(); } } public String CreateDir(String _dirName) { this.controls.activity.getDir(_dirName, 0); //if not exist -->> CREATE! String absPath = this.controls.activity.getFilesDir().getPath(); absPath = absPath.substring(0, absPath.lastIndexOf("/")) + "/"+_dirName; return absPath; } public String CreateDir(int _environmentDir, String _dirName) { String baseDir = GetEnvironmentDirectoryPath(_environmentDir); if (!baseDir.equalsIgnoreCase("")) { File file = new File(baseDir, _dirName); file.mkdirs(); return file.getPath(); }else return ""; } public String CreateDir(String _fullPath, String _dirName) { File file = new File(_fullPath, _dirName); file.mkdirs(); return file.getPath(); } /* Added in API level 11 Returns whether the primary "external" storage device is emulated. If true, data stored on this device will be stored on a portion of the internal storage system. */ public boolean IsExternalStorageEmulated () { return Environment.isExternalStorageEmulated(); } /* Added in API level 9 Returns whether the primary "external" storage device is removable. */ public boolean IsExternalStorageRemovable() { return Environment.isExternalStorageRemovable(); } // public String GetjFormVersionFeatures() { String listVersionInfo = "6$5=SetWifiEnabled;" + //[0.6-05] "6$5=IsWifiEnabled;" + "6$5=GetEnvironmentDirectoryPath;" + "6$5=GetInternalAppStoragePath;" + "6$5=CopyFile;" + "6$5=LoadFromAssets;" + "6$5=IsSdCardMounted;" + "6$5=DeleteFile;" + "6$5=CreateDir;" + "6$5=IsExternalStorageEmulated;" + "6$5=IsExternalStorageRemovable"; return listVersionInfo; } /* *Given that you can access R.java just fine normally in code. *As long as you are retrieving data from your application's R.java - Use reflection! */ public int GetStringResourceId(String _resName) { try { Class<?> res = R.string.class; Field field = res.getField(_resName); int strId = field.getInt(null); return strId; } catch (Exception e) { Log.e("jForm", "Failure to Get String Resource", e); return 0; } } public String GetStringResourceById(int _resID) { return (String)( this.controls.activity.getResources().getText(_resID)); } public int GetDrawableResourceId(String _resName) { try { Class<?> res = R.drawable.class; Field field = res.getField(_resName); //"drawableName" int drawableId = field.getInt(null); return drawableId; } catch (Exception e) { Log.e("jForm", "Failure to get drawable id.", e); return 0; } } public Drawable GetDrawableResourceById(int _resID) { return (Drawable)( this.controls.activity.getResources().getDrawable(_resID)); } //by thierrydijoux public String GetQuantityStringByName(String _resName, int _quantity) { int id = this.controls.activity.getResources().getIdentifier(_resName, "plurals", this.controls.activity.getPackageName()); String value = id == 0 ? "" : (String) this.controls.activity.getResources().getQuantityString(id, _quantity, _quantity); return value; } //by thierrydijoux public String GetStringResourceByName(String _resName) { int id = this.controls.activity.getResources().getIdentifier(_resName, "string", this.controls.activity.getPackageName()); String value = id == 0 ? "" : (String) this.controls.activity.getResources().getText(id); return value; } public ActionBar GetActionBar() { return this.controls.activity.getActionBar(); } /* * To disableAction-bar Icon and Title, you must do two things: setDisplayShowHomeEnabled(false); // hides action bar icon setDisplayShowTitleEnabled(false); // hides action bar title */ public void HideActionBar() { ActionBar actionBar = this.controls.activity.getActionBar(); actionBar.hide(); } public void ShowActionBar() { ActionBar actionBar = this.controls.activity.getActionBar(); actionBar.show(); } //Hide the title label public void ShowTitleActionBar(boolean _value) { ActionBar actionBar = this.controls.activity.getActionBar(); actionBar.setDisplayShowTitleEnabled(_value); } //Hide the logo = false public void ShowLogoActionBar(boolean _value) { ActionBar actionBar = this.controls.activity.getActionBar(); actionBar.setDisplayShowHomeEnabled(_value); } //set a title and subtitle to the Action bar as shown in the code snippet. public void SetTitleActionBar(String _title) { ActionBar actionBar = this.controls.activity.getActionBar(); actionBar.setTitle(_title); } //set a title and subtitle to the Action bar as shown in the code snippet. public void SetSubTitleActionBar(String _subtitle) { ActionBar actionBar = this.controls.activity.getActionBar(); actionBar.setSubtitle(_subtitle); //actionBar.setDisplayHomeAsUpEnabled(true); } //forward [<] activity! // If your minSdkVersion is 11 or higher! /*.*/public void SetDisplayHomeAsUpEnabledActionBar(boolean _value) { ActionBar actionBar = this.controls.activity.getActionBar(); actionBar.setDisplayHomeAsUpEnabled(_value); } public void SetIconActionBar(String _iconIdentifier) { ActionBar actionBar = this.controls.activity.getActionBar(); actionBar.setIcon(GetDrawableResourceById(GetDrawableResourceId(_iconIdentifier))); } public void SetTabNavigationModeActionBar(){ ActionBar actionBar = this.controls.activity.getActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); //API 11 actionBar.setSelectedNavigationItem(0); } //This method remove all tabs from the action bar and deselect the current tab public void RemoveAllTabsActionBar() { ActionBar actionBar = this.controls.activity.getActionBar(); actionBar.removeAllTabs(); this.controls.activity.invalidateOptionsMenu(); // by renabor actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); //API 11 renabor } //Calculate ActionBar height //ref http://stackoverflow.com/questions/12301510/how-to-get-the-actionbar-height public int GetActionBarHeight() { int actionBarHeight = 0; TypedValue tv = new TypedValue(); if (controls.activity.getActionBar().isShowing()) { if (controls.activity.getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) { actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data,controls.activity.getResources().getDisplayMetrics()); } } return actionBarHeight; } public boolean ActionBarIsShowing() { return controls.activity.getActionBar().isShowing(); } public boolean IsPackageInstalled(String _packagename) { PackageManager pm = controls.activity.getPackageManager(); try { pm.getPackageInfo(_packagename, PackageManager.GET_ACTIVITIES); return true; } catch (NameNotFoundException e) { return false; } } //android.view.View public void ShowCustomMessage(View _layout, int _gravity) { //controls.pOnShowCustomMessage(PasObj); Toast toast = new Toast(controls.activity); toast.setGravity(_gravity, 0, 0); toast.setDuration(Toast.LENGTH_LONG); RelativeLayout par = (RelativeLayout)_layout.getParent(); if (par != null) { par.removeView(_layout); } _layout.setVisibility(0); toast.setView(_layout); toast.show(); } private class MyCountDownTimer extends CountDownTimer { Toast toast; public MyCountDownTimer(long startTime, long interval, Toast toas) { super(startTime, interval); toast = toas; } @Override public void onFinish() { //text.setText("Time's up!"); toast.cancel(); } @Override public void onTick(long millisUntilFinished) { //text.setText("" + millisUntilFinished / 1000); toast.show(); } } public void ShowCustomMessage(View _layout, int _gravity, int _lenghTimeSecond) { Toast toast = new Toast(controls.activity); toast.setGravity(_gravity, 0, 0); //toast.setDuration(Toast.LENGTH_LONG); RelativeLayout par = (RelativeLayout)_layout.getParent(); if (par != null) { par.removeView(_layout); } _layout.setVisibility(0); toast.setView(_layout); //it will show the toast for 20 seconds: //(20000 milliseconds/1st argument) with interval of 1 second/2nd argument //--> (20 000, 1000) MyCountDownTimer countDownTimer = new MyCountDownTimer(_lenghTimeSecond*1000, 1000, toast); countDownTimer.start(); } public void SetScreenOrientation(int _orientation) { //Log.i("Screen","Orientation "+ _orientation); switch(_orientation) { case 1: controls.activity.setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); break; case 2: controls.activity.setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); break; default:controls.activity.setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_SENSOR); break; } } public int GetScreenOrientation() { int orientation = controls.activity.getResources().getConfiguration().orientation; int r = 0; switch(orientation) { case Configuration.ORIENTATION_PORTRAIT: r= 1;//setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); break; case Configuration.ORIENTATION_LANDSCAPE: r = 2; //setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); break; } return r; } public String GetScreenDensity() { String r= ""; DisplayMetrics metrics = new DisplayMetrics(); controls.activity.getWindowManager().getDefaultDisplay().getMetrics(metrics); int density = metrics.densityDpi; if (density==DisplayMetrics.DENSITY_XXHIGH) { r= "XXHIGH:" + String.valueOf(density); } else if (density==DisplayMetrics.DENSITY_XHIGH) { r= "XHIGH:" + String.valueOf(density); } else if (density==DisplayMetrics.DENSITY_HIGH) { r= "HIGH:" + String.valueOf(density); } else if (density==DisplayMetrics.DENSITY_MEDIUM) { r= "MEDIUM:" + String.valueOf(density); } else if (density==DisplayMetrics.DENSITY_LOW) { r= "LOW:" + String.valueOf(density); } return r; } public String GetScreenSize() { String r= ""; if((controls.activity.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE) { r = "XLARGE"; }else if((controls.activity.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE) { r = "LARGE"; }else if ((controls.activity.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL) { r = "NORMAL"; }else if ((controls.activity.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_SMALL) { r = "SMALL"; } return r; } public void LogDebug(String _tag, String _msg) { Log.d(_tag, _msg); //debug } public void Vibrate(int _milliseconds) { Vibrator vib = (Vibrator) controls.activity.getSystemService(Context.VIBRATOR_SERVICE); if (vib.hasVibrator()) { vib.vibrate(_milliseconds); } } public void Vibrate(long[] _millisecondsPattern) { Vibrator vib = (Vibrator) controls.activity.getSystemService(Context.VIBRATOR_SERVICE); if (vib.hasVibrator()) { vib.vibrate(_millisecondsPattern, -1); } } //http://stackoverflow.com/questions/2661536/how-to-programatically-take-a-screenshot-on-android public void TakeScreenshot(String _savePath, String _saveFileNameJPG) { String myPath = _savePath + "/" + _saveFileNameJPG; Bitmap bitmap; View v1 = controls.activity.getWindow().getDecorView().getRootView(); v1.setDrawingCacheEnabled(true); bitmap = Bitmap.createBitmap(v1.getDrawingCache()); v1.setDrawingCacheEnabled(false); OutputStream fout = null; File imageFile = new File(myPath); try { fout = new FileOutputStream(imageFile); bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fout); fout.flush(); fout.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public String GetTitleActionBar() { ActionBar actionBar = this.controls.activity.getActionBar(); return (String)actionBar.getTitle(); } public String GetSubTitleActionBar() { ActionBar actionBar = this.controls.activity.getActionBar(); return (String)actionBar.getSubtitle(); } //https://xjaphx.wordpress.com/2011/10/02/store-and-use-files-in-assets/ public void CopyFromAssetsToInternalAppStorage(String _filename){ InputStream is = null; FileOutputStream fos = null; String PathDat = controls.activity.getFilesDir().getAbsolutePath(); try { File outfile = new File(PathDat+"/"+_filename); // if file doesnt exists, then create it if (!outfile.exists()) { outfile.createNewFile(); } fos = new FileOutputStream(outfile); //save to data/data/your_package/files/your_file_name is = controls.activity.getAssets().open(_filename); int size = is.available(); byte[] buffer = new byte[size]; for (int c = is.read(buffer); c != -1; c = is.read(buffer)){ fos.write(buffer, 0, c); } is.close(); fos.close(); }catch (IOException e) { // Log.i("ShareFromAssets","fail!!"); e.printStackTrace(); } } public void CopyFromInternalAppStorageToEnvironmentDir(String _filename, String _environmentDir) { String srcPath = controls.activity.getFilesDir().getAbsolutePath()+"/"+ _filename; //Result : /data/data/com/MyApp/files String destPath = _environmentDir + "/" + _filename; CopyFile(srcPath, destPath); } public void CopyFromAssetsToEnvironmentDir(String _filename, String _environmentDir) { CopyFromAssetsToInternalAppStorage(_filename); CopyFromInternalAppStorageToEnvironmentDir(_filename,_environmentDir); } public void ToggleSoftInput() { InputMethodManager imm =(InputMethodManager) controls.activity.getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); } //thanks to Mladen public String GetDeviceModel() { return android.os.Build.MODEL; } public String GetDeviceManufacturer() { return android.os.Build.MANUFACTURER; } public void SetKeepScreenOn(boolean _value) { if (_value) controls.activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); else controls.activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); } public void SetTurnScreenOn(boolean _value) { if (_value) controls.activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); else controls.activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); } public void SetAllowLockWhileScreenOn(boolean _value) { if (_value) controls.activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON); else controls.activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON); } public void SetShowWhenLocked(boolean _value) { if (_value) controls.activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); else controls.activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); } public Uri ParseUri(String _uriAsString) { return Uri.parse(_uriAsString); } public String UriToString(Uri _uri) { return _uri.toString(); } } //**class entrypoint**//please, do not remove/change this line! //Main Java/Pascal Interface Class public class Controls { // public Activity activity; // Activity public RelativeLayout appLayout; // Base Layout public int screenStyle=0; // Screen Style [Dev:0 , Portrait: 1, Landscape : 2] public int systemVersion; //Jave -> Pascal Function ( Pascal Side = Event ) public native void pAppOnCreate(Context context, RelativeLayout layout); public native int pAppOnScreenStyle(); public native void pAppOnNewIntent(); public native void pAppOnDestroy(); public native void pAppOnPause(); public native void pAppOnRestart(); public native void pAppOnResume(); public native void pAppOnStart(); public native void pAppOnStop(); public native void pAppOnBackPressed(); public native int pAppOnRotate(int rotate); public native void pAppOnConfigurationChanged(); public native void pAppOnActivityResult(int requestCode, int resultCode, Intent data); public native void pAppOnCreateOptionsMenu(Menu menu); public native void pAppOnClickOptionMenuItem(MenuItem menuItem, int itemID, String itemCaption, boolean checked); public native boolean pAppOnPrepareOptionsMenu(Menu menu, int menuSize); public native boolean pAppOnPrepareOptionsMenuItem(Menu menu, MenuItem menuItem, int itemIndex); public native void pAppOnCreateContextMenu(ContextMenu menu); public native void pAppOnClickContextMenuItem(MenuItem menuItem, int itemID, String itemCaption, boolean checked); public native void pOnDraw(long pasobj, Canvas canvas); public native void pOnTouch(long pasobj, int act, int cnt, float x1, float y1, float x2, float y2); public native void pOnClickGeneric(long pasobj, int value); public native boolean pAppOnSpecialKeyDown(char keyChar, int keyCode, String keyCodeString); public native void pOnClick(long pasobj, int value); public native void pOnChange(long pasobj, String txt, int count); public native void pOnChanged(long pasobj, String txt, int count); public native void pOnEnter(long pasobj); public native void pOnClose(long pasobj); public native void pAppOnViewClick(View view, int id); public native void pAppOnListItemClick(AdapterView adapter, View view, int position, int id); public native void pOnFlingGestureDetected(long pasobj, int direction); public native void pOnPinchZoomGestureDetected(long pasobj, float scaleFactor, int state); //Load Pascal Library static { /* try { System.loadLibrary("freetype"); // need by TFPNoGUIGraphicsBridge [ref. www.github.com/jmpessoa/tfpnoguigraphicsbridge] } catch (UnsatisfiedLinkError e) { Log.e("JNI_Load_LibFreetype", "exception", e); } */ try { System.loadLibrary("controls"); } catch (UnsatisfiedLinkError e) { Log.e("JNI_Load_LibControls", "exception", e); } } // ------------------------------------------------------------------------- // Activity Event // ------------------------------------------------------------------------- public int jAppOnScreenStyle() { return(pAppOnScreenStyle()); } // public void jAppOnCreate(Context context,RelativeLayout layout ) { pAppOnCreate(context,layout); } public void jAppOnNewIntent() { pAppOnNewIntent(); } public void jAppOnDestroy() { pAppOnDestroy(); } public void jAppOnPause() { pAppOnPause(); } public void jAppOnRestart() { pAppOnRestart(); } public void jAppOnResume() { pAppOnResume(); } public void jAppOnStart() { pAppOnStart(); } //change by jmpessoa : old OnActive public void jAppOnStop() { pAppOnStop(); } public void jAppOnBackPressed() { pAppOnBackPressed(); } public int jAppOnRotate(int rotate) { return(pAppOnRotate(rotate)); } //rotate=1 --> device on vertical/default position ; 2 --> device on horizontal position //tips by jmpessoa public void jAppOnConfigurationChanged() { pAppOnConfigurationChanged(); } public void jAppOnActivityResult(int requestCode, int resultCode, Intent data) { pAppOnActivityResult(requestCode,resultCode,data); } public void jAppOnCreateOptionsMenu(Menu m) {pAppOnCreateOptionsMenu(m);} public void jAppOnClickOptionMenuItem(MenuItem item,int itemID, String itemCaption, boolean checked){pAppOnClickOptionMenuItem(item,itemID,itemCaption,checked);} public boolean jAppOnPrepareOptionsMenu(Menu m, int size) { boolean r = pAppOnPrepareOptionsMenu(m, size); return r; } public boolean jAppOnPrepareOptionsItem(Menu m, MenuItem item, int index) { boolean r = pAppOnPrepareOptionsMenuItem(m, item, index); return r; } public void jAppOnCreateContextMenu(ContextMenu m) {pAppOnCreateContextMenu(m);} public void jAppOnClickContextMenuItem(MenuItem item,int itemID, String itemCaption, boolean checked) {pAppOnClickContextMenuItem(item,itemID,itemCaption,checked);} public void jAppOnViewClick(View view, int id){ pAppOnViewClick(view,id);} public void jAppOnListItemClick(AdapterView adapter, View view, int position, int id){ pAppOnListItemClick(adapter, view,position,id);} //public void jAppOnHomePressed() { pAppOnHomePressed(); } public boolean jAppOnKeyDown(char keyChar , int keyCode, String keyCodeString) {return pAppOnSpecialKeyDown(keyChar, keyCode, keyCodeString);}; //// ------------------------------------------------------------------------- // System, Class // ------------------------------------------------------------------------- public void systemGC() { System.gc(); } public void systemSetOrientation(int orientation) { this.activity.setRequestedOrientation(orientation); } //by jmpessoa public int systemGetOrientation() { return (this.activity.getResources().getConfiguration().orientation); } public void classSetNull (Class object) { object = null; } public void classChkNull (Class object) { if (object == null) { Log.i("JAVA","checkNull-Null"); }; if (object != null) { Log.i("JAVA","checkNull-Not Null"); }; } public Context GetContext() { return this.activity; } //by thierrydijoux public String getQuantityStringByName(String _resName, int _quantity) { int id = this.activity.getResources().getIdentifier(_resName, "plurals", this.activity.getPackageName()); String value = id == 0 ? "" : (String) this.activity.getResources().getQuantityString(id, _quantity, _quantity); return value; } //by thierrydijoux public String getStringResourceByName(String _resName) { int id = this.activity.getResources().getIdentifier(_resName, "string", this.activity.getPackageName()); String value = id == 0 ? "" : (String) this.activity.getResources().getText(id); return value; } // ------------------------------------------------------------------------- // App Related // ------------------------------------------------------------------------- // public void appFinish () { activity.finish(); System.exit(0); //<< ------- fix by jmpessoa } public void appKillProcess() { this.activity.finish(); } // ------------------------------------------------------------------------- // Asset Related // ------------------------------------------------------------------------- // src : codedata.txt // tgt : /data/data/com.kredix.control/data/codedata.txt public boolean assetSaveToFile(String src, String tgt) { InputStream is = null; FileOutputStream fos = null; String path = '/' + tgt.substring(1,tgt.lastIndexOf("/")); File outDir = new File(path); outDir.mkdirs(); try { is = this.activity.getAssets().open(src); int size = is.available(); byte[] buffer = new byte[size]; File outfile = new File(tgt); fos = new FileOutputStream(outfile); for (int c = is.read(buffer); c != -1; c = is.read(buffer)){ fos.write(buffer, 0, c); } is.close(); fos.close(); return(true); } catch (IOException e) { e.printStackTrace(); return(false); } } // ------------------------------------------------------------------------- // View Related - Generic! --> AndroidWidget.pas // ------------------------------------------------------------------------- public void view_SetVisible(View view, int state) { view.setVisibility(state); } public void view_SetBackGroundColor(View view, int color) { view.setBackgroundColor(color); } public void view_Invalidate(View view) { view.invalidate(); } // ------------------------------------------------------------------------- // Form Related // ------------------------------------------------------------------------- // public java.lang.Object jForm_Create(long pasobj ) { return (java.lang.Object)( new jForm(this,pasobj)); } // ------------------------------------------------------------------------- // System Info // ------------------------------------------------------------------------- // Result : Width(16bit) : Height (16bit) public int getScreenWH(android.content.Context context) { DisplayMetrics metrics = new DisplayMetrics(); int h = context.getResources().getDisplayMetrics().heightPixels; int w = context.getResources().getDisplayMetrics().widthPixels; // proposed by renabor /* float density = context.getResources().getDisplayMetrics().density; int dpHeight = Math.round ( h / density ); int dpWidth = Math.round ( w / density ); return ( dpWidth << 16 | dpHeight ); // dp screen size */ return ( (w << 16)| h ); } // LORDMAN - 2013-07-28 public int getStrLength(String Txt) { //fix by jmpessoa int len = 0; if(Txt != null) { len = Txt.length(); } return ( len ); } /*LORDMAN - 2013-07-30 public String getStrDateTime() { SimpleDateFormat formatter = new SimpleDateFormat ( "yyyy-MM-dd HH:mm:ss", Locale.KOREA ); return( formatter.format ( new Date () ) ); } */ //---------------------------------------------- //Controls Version Info //------------------------------------------- //GetControlsVersionFeatures ... //Controls.java version-revision info! [0.6-04] public String getStrDateTime() { //hacked by jmpessoa!! sorry, was for a good cause! please, use the jForm_GetDateTime!! String listVersionInfo = "7$0=GetControlsVersionInfo;" + //added ... etc.. "7$0=getLocale;"; //added ... etc.. return listVersionInfo; } //Fatih: Path = '' = Asset Root Folder //Path Example: gunlukler/2015/02/28/001 public String[] getAssetContentList(String Path) throws IOException { ArrayList<String> Folders = new ArrayList<String>(); Resources r = this.activity.getResources(); AssetManager am = r.getAssets(); String fileList[] = am.list(Path); if (fileList != null) { for (int i = 0; i < fileList.length; i++) { Folders.add(fileList[i]); } } String sFolders[] = Folders.toArray(new String[Folders.size()]); return sFolders; } //Fatih: gets system storage driver list public String[] getDriverList() { ArrayList<String> Drivers = new ArrayList<String>(); String sDriver; sDriver = System.getenv("EXTERNAL_STORAGE"); if(sDriver != null) { File fDriver = new File(sDriver); if (fDriver.exists() && fDriver.canWrite()) { Drivers.add(fDriver.getAbsolutePath()); } } sDriver = System.getenv("SECONDARY_STORAGE"); if(sDriver != null) { File fDriver = new File(sDriver); if (fDriver.exists() && fDriver.canWrite()) { Drivers.add(fDriver.getAbsolutePath()); } } String sDrivers[] = Drivers.toArray(new String[Drivers.size()]); return sDrivers; } //Fatih: get folders list //Path Example: /storage/emulated/legacy/ public String[] getFolderList(String Path) { ArrayList<String> Folders = new ArrayList<String>(); File f = new File(Path); File[] files = f.listFiles(); for (File fFile : files) { if (fFile.isDirectory()) { Folders.add(fFile.getName()); } } String sFolders[] = Folders.toArray(new String[Folders.size()]); return sFolders; } //Fatih: get files list //Path Example: /storage/emulated/legacy/ public String[] getFileList(String Path) { ArrayList<String> Folders = new ArrayList<String>(); File f = new File(Path); File[] files = f.listFiles(); for (File fFile : files) { if (fFile.isFile()) { Folders.add(fFile.getName()); } } String sFolders[] = Folders.toArray(new String[Folders.size()]); return sFolders; } //by jmpessoa: Class controls version info public String GetControlsVersionInfo() { return "7$0"; //version$revision [0.6$5] } public long getTick() { return ( System.currentTimeMillis() ); } // ------------------------------------------------------------------------- // Android path // ------------------------------------------------------------------------- // Result : /data/app/com.kredix-1.apk public String getPathApp (android.content.Context context,String pkgName) { String PathApp = ""; try { PathApp = context.getPackageManager().getApplicationInfo( pkgName, 0 ).sourceDir; } catch ( NameNotFoundException e ) {} return ( PathApp ); } // Result : /data/data/com/kredix/files public String getPathDat (android.content.Context context) { //String version = Build.VERSION.RELEASE; String PathDat = context.getFilesDir().getAbsolutePath(); return ( PathDat ); } // Result : /storage/emulated/0 public String getPathExt() { File FileExt = Environment.getExternalStorageDirectory(); return ( FileExt.getPath() ); } // Result : /storage/emulated/0/DCIM public String getPathDCIM() { File FileDCIM = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM); return ( FileDCIM.getPath() ); } //by jmpessoa public String getPathDataBase(android.content.Context context) { String destPath = context.getFilesDir().getAbsolutePath(); destPath = destPath.substring(0, destPath.lastIndexOf("/")) + "/databases"; return destPath; } // ------------------------------------------------------------------------- // Android Locale // ------------------------------------------------------------------------- // thierrydijoux - get locale info public String getLocale(int localeType) { Context context = this.activity; String value = ""; switch (localeType) { case 0: value = context.getResources().getConfiguration().locale.getCountry(); break; case 1: value = context.getResources().getConfiguration().locale.getDisplayCountry(); break; case 2: value = context.getResources().getConfiguration().locale.getDisplayLanguage(); break; case 3: value = context.getResources().getConfiguration().locale.getDisplayName(); break; case 4: value = context.getResources().getConfiguration().locale.getDisplayVariant(); break; case 5: value = context.getResources().getConfiguration().locale.getISO3Country(); break; case 6: value = context.getResources().getConfiguration().locale.getISO3Language(); break; case 7: value = context.getResources().getConfiguration().locale.getVariant(); break; } return value; } // ------------------------------------------------------------------------- // Android Device // ------------------------------------------------------------------------- // Result: Phone Number - LORDMAN public String getDevPhoneNumber() { TelephonyManager telephony = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); return ( telephony.getLine1Number() ); } // Result: Device ID - LORDMAN // Remarks : Nexus7 (no moblie device) -> Crash : fixed code - Simon public String getDevDeviceID() { TelephonyManager telephony = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); return ( telephony.getDeviceId() ); } // ------------------------------------------------------------------------- // Bitmap // ------------------------------------------------------------------------- // Get Image Width,Height without Decoding public int Image_getWH (String filename ) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(filename, options); return ( (options.outWidth << 16) | (options.outHeight) ); } // public Bitmap Image_resample(String infile,int size) { int iw,ih,im; // input image w,h, max int scale; // int ow,oh; // output image w,h // get input image w,h BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(infile, options); iw = options.outWidth; ih = options.outHeight; // im = Math.max(iw,ih); scale = 1; if (size <= (im/32)) { scale = 32; } if (((im/32) < size) && (size <= (im/16))) { scale = 16; } if (((im/16) < size) && (size <= (im/ 8))) { scale = 8; } if (((im/ 8) < size) && (size <= (im/ 4))) { scale = 4; } if (((im/ 4) < size) && (size <= (im/ 2))) { scale = 2; } // options.inJustDecodeBounds = false; options.inSampleSize = scale; Bitmap src = BitmapFactory.decodeFile(infile, options); // if (im == iw) { ow = size; oh = Math.round((float)ow*((float)ih/(float)iw)); } else { oh = size; ow = Math.round((float)oh*((float)iw/(float)ih)); } // return( Bitmap.createScaledBitmap(src, ow,oh, true) ); } public void Image_save(Bitmap bmp, String filename) { try { FileOutputStream out = new FileOutputStream(filename); bmp.compress(Bitmap.CompressFormat.PNG, 100, out); } catch (Exception e) { e.printStackTrace(); } } // ------------------------------------------------------------------------- // Toast // ------------------------------------------------------------------------- // public void jToast( String str ) { Toast.makeText(activity, str, Toast.LENGTH_SHORT).show(); } //by jmpessoa //you need a real android device (not emulator!) //http://www.androidaspect.com/2013/09/how-to-send-email-from-android.html public void jSend_Email( String to, String cc, String bcc, String subject, String message) { try { Intent email = new Intent(Intent.ACTION_SEND); email.putExtra(Intent.EXTRA_EMAIL, to); email.putExtra(Intent.EXTRA_CC, cc); email.putExtra(Intent.EXTRA_BCC, bcc); email.putExtra(Intent.EXTRA_SUBJECT, subject); email.putExtra(Intent.EXTRA_TEXT, message); // Use email client only email.setType("message/rfc822"); this.activity.startActivity(Intent.createChooser(email, "Choose an email client")); //rst = 1; //ok }catch (Exception e) { //Log.i("Java","Send Email Error"); e.printStackTrace(); } } //http://codetheory.in/android-sms/ //http://www.developerfeed.com/java/tutorial/sending-sms-using-android //http://www.techrepublic.com/blog/software-engineer/how-to-send-a-text-message-from-within-your-android-app/ public int jSend_SMS(String phoneNumber, String msg) { SmsManager sms = SmsManager.getDefault(); try { //SmsManager.getDefault().sendTextMessage(phoneNumber, null, msg, null, null); List<String> messages = sms.divideMessage(msg); for (String message : messages) { sms.sendTextMessage(phoneNumber, null, message, null, null); } //Log.i("Send_SMS",phoneNumber+": "+ msg); return 1; //ok }catch (Exception e) { //Log.i("Send_SMS Fail",e.toString()); return 0; //fail } } public int jSend_SMS(String phoneNumber, String msg, String packageDeliveredAction) { String SMS_DELIVERED = packageDeliveredAction; PendingIntent deliveredPendingIntent = PendingIntent.getBroadcast(this.GetContext(), 0, new Intent(SMS_DELIVERED), 0); SmsManager sms = SmsManager.getDefault(); try { //SmsManager.getDefault().sendTextMessage(phoneNumber, null, msg, null, deliveredPendingIntent); //Log.i("Send_SMS",phoneNumber+": "+ msg); List<String> messages = sms.divideMessage(msg); for (String message : messages) { sms.sendTextMessage(phoneNumber, null, message, null, deliveredPendingIntent); } return 1; //ok }catch (Exception e) { return 0; //fail } } public String jRead_SMS(Intent intent, String addressBodyDelimiter) { //---get the SMS message passed in--- SmsMessage[] msgs = null; String str = ""; if (intent.getAction().equals("android.provider.Telephony.SMS_RECEIVED")) { Bundle bundle = intent.getExtras(); if (bundle != null) { //---retrieve the SMS message received--- Object[] pdus = (Object[]) bundle.get("pdus"); msgs = new SmsMessage[pdus.length]; for (int i=0; i<msgs.length; i++){ msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]); str += msgs[i].getOriginatingAddress(); str += addressBodyDelimiter; str += msgs[i].getMessageBody().toString(); str += " "; } } } return str; } //by jmpessoa //http://eagle.phys.utk.edu/guidry/android/readContacts.html @SuppressLint("DefaultLocale") public String jContact_getMobileNumberByDisplayName(String contactName){ String matchNumber = ""; String username; username = contactName; username = username.toLowerCase(); Cursor phones = this.activity.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,null,null, null); while (phones.moveToNext()) { String name=phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME)); String phoneNumber = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)); String phoneType = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE)); name = name.toLowerCase(); if(name.equals(username)) { if ( phoneType.equals("2")) { //mobile matchNumber = phoneNumber; break; } } } phones.close(); return matchNumber; } //by jmpessoa //http://eagle.phys.utk.edu/guidry/android/readContacts.html public String jContact_getDisplayNameList(char delimiter){ String nameList = ""; Cursor phones = this.activity.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,null,null, null); while (phones.moveToNext()) { String name=phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME)); String phoneType = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE)); if ( phoneType.equals("2")) { //mobile nameList = nameList + delimiter + name; } } phones.close(); return nameList; } // ------------------------------------------------------------------------- // Bitmap // ------------------------------------------------------------------------- public int[] getBmpArray(String file) { Bitmap bmp = BitmapFactory.decodeFile(file); int length = bmp.getWidth()*bmp.getHeight(); int[] pixels = new int[length+2]; bmp.getPixels(pixels, 0, bmp.getWidth(), 0, 0, bmp.getWidth(), bmp.getHeight()); pixels[length+0] = bmp.getWidth (); pixels[length+1] = bmp.getHeight(); return ( pixels ); } // ------------------------------------------------------------------------- // Camera // ------------------------------------------------------------------------- public void takePhoto(String filename) { //HINT: filename = App.Path.DCIM + '/test.jpg Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Uri mImageCaptureUri = Uri.fromFile(new File("", filename)); intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri); intent.putExtra("return-data", true); activity.startActivityForResult(intent, 12345); } /* * NOTE: The DCIM folder on the microSD card in your Android device is where Android stores the photos and videos * you take with the device's built-in camera. When you open the Android Gallery app, * you are browsing the files saved in the DCIM folder.... */ //by jmpessoa public String jCamera_takePhoto(String path, String filename) { Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Uri mImageCaptureUri = Uri.fromFile(new File(path, '/'+filename)); // get Android.Uri from file intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri); intent.putExtra("return-data", true); this.activity.startActivityForResult(intent, 12345); //12345 = requestCode return (path+'/'+filename); } public String jCamera_takePhoto(String path, String filename, int requestCode) { Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); Uri mImageCaptureUri = Uri.fromFile(new File(path, '/'+filename)); // get Android.Uri from file intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri); intent.putExtra("return-data", true); this.activity.startActivityForResult(intent, requestCode); //12345 = requestCode return (path+'/'+filename); } //------------------------------------------------------------------------------------------------------- //SMART LAMW DESIGNER //------------------------------------------------------------------------------------------------------- public java.lang.Object jTextView_Create(long pasobj) { return (java.lang.Object)( new jTextView(this.activity,this,pasobj)); } public java.lang.Object jAutoTextView_jCreate(long _Self) { return (java.lang.Object)(new jAutoTextView(this,_Self)); } public native void pOnClickAutoDropDownItem(long pasobj, int itemIndex, String itemCaption); }
{'repo_name': 'jmpessoa/lazandroidmodulewizard', 'stars': '137', 'repo_language': 'Pascal', 'file_name': 'fcl_bridges_pack.pas', 'mime_type': 'text/plain', 'hash': 3290629444876786524, 'source_dataset': 'data'}
package de.metas.data.export.api.impl; /* * #%L * de.metas.swat.base * %% * Copyright (C) 2015 metas GmbH * %% * This program 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, either version 2 of the * License, or (at your option) any later version. * * This program 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 this program. If not, see * <http://www.gnu.org/licenses/gpl-2.0.html>. * #L% */ import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.util.ArrayList; import java.util.List; import org.adempiere.exceptions.AdempiereException; import org.adempiere.model.InterfaceWrapperHelper; import org.compiere.model.I_AD_PInstance; import org.compiere.util.Env; import org.slf4j.Logger; import de.metas.adempiere.form.IClientUIInstance; import de.metas.data.export.api.IExporter; import de.metas.data.export.api.IExporterMonitor; import de.metas.logging.LogManager; import de.metas.process.AdProcessId; import de.metas.process.IADPInstanceDAO; import de.metas.process.PInstanceId; import de.metas.process.ProcessInfoParameter; import de.metas.util.Services; import lombok.NonNull; /** * Helper monitor which logs the given parameters by using <code>adProcessId</code> when export started. When export finished, it logs the status. * * NOTE: this monitor is used when we don't have an actual ADempiere process but we would like to have the audit informations. * * @author tsa * */ public class ProcessLoggerExporterMonitor implements IExporterMonitor { private static final Logger logger = LogManager.getLogger(ProcessLoggerExporterMonitor.class); private final AdProcessId adProcessId; private final Object params; private final Class<?> paramsInterfaceClass; private I_AD_PInstance pinstance; private IClientUIInstance clientUIInstance; /** * * @param ctx * @param adProcessId which process shall be used when creating the {@link I_AD_PInstance} record * @param params object which contains the export parameters * @param paramsInterfaceClass interface class to be used when we are introspecting the export parameters */ public <T> ProcessLoggerExporterMonitor( @NonNull final AdProcessId adProcessId, @NonNull final T params, @NonNull final Class<T> paramsInterfaceClass) { this.adProcessId = adProcessId; this.params = params; this.paramsInterfaceClass = paramsInterfaceClass; } @Override public void exportStarted(IExporter exporter) { pinstance = createPInstance(); } @Override public void exportFinished(IExporter exporter) { final Throwable error = exporter.getError(); if (error != null) { // Log the error to console. This is useful if the exporter is running asynchronous and the threads executor service is not logging the exception logger.error(error.getLocalizedMessage(), error); if (clientUIInstance != null) { clientUIInstance.error(Env.WINDOW_MAIN, "Error", error.getLocalizedMessage()); } } if (pinstance != null) { pinstance.setResult(exporter.getExportedRowCount()); pinstance.setIsProcessing(false); if (error != null) { pinstance.setErrorMsg(error.getLocalizedMessage()); } InterfaceWrapperHelper.save(pinstance); } } private I_AD_PInstance createPInstance() { final I_AD_PInstance pinstance = Services.get(IADPInstanceDAO.class).createAD_PInstance(adProcessId); pinstance.setIsProcessing(true); InterfaceWrapperHelper.save(pinstance); final BeanInfo beanInfo; try { beanInfo = Introspector.getBeanInfo(paramsInterfaceClass); } catch (IntrospectionException e) { throw new AdempiereException(e.getLocalizedMessage(), e); } final List<ProcessInfoParameter> piParams = new ArrayList<>(); for (final PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) { final Object value; try { value = pd.getReadMethod().invoke(params); } catch (Exception e) { logger.info(e.getLocalizedMessage(), e); continue; } if (value == null) { continue; } piParams.add(ProcessInfoParameter.ofValueObject(pd.getName(), value)); } Services.get(IADPInstanceDAO.class).saveParameterToDB(PInstanceId.ofRepoId(pinstance.getAD_PInstance_ID()), piParams); return pinstance; } public void setClientUIInstance(IClientUIInstance clientUIInstance) { this.clientUIInstance = clientUIInstance; } }
{'repo_name': 'metasfresh/metasfresh', 'stars': '653', 'repo_language': 'TSQL', 'file_name': 'I_C_NonBusinessDay.java', 'mime_type': 'text/plain', 'hash': -3644880828460821705, 'source_dataset': 'data'}
set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) itk_wrap_include("itkMergeLabelMapFilter.h") itk_wrap_simple_class("itk::MergeLabelMapFilterEnums") itk_wrap_class("itk::MergeLabelMapFilter" POINTER) foreach(d ${ITK_WRAP_IMAGE_DIMS}) itk_wrap_template("${ITKM_LM${d}}" "${ITKT_LM${d}}") endforeach() itk_end_wrap_class()
{'repo_name': 'InsightSoftwareConsortium/ITK', 'stars': '698', 'repo_language': 'C++', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -5164579741721044967, 'source_dataset': 'data'}
<?php /** * Table Definition for resource * * PHP version 7 * * Copyright (C) Villanova University 2010. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * @category VuFind * @package Db_Table * @author Demian Katz <demian.katz@villanova.edu> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://vufind.org Main Site */ namespace VuFind\Db\Table; use Laminas\Db\Adapter\Adapter; use Laminas\Db\Sql\Expression; use Laminas\Db\Sql\Select; use VuFind\Date\Converter as DateConverter; use VuFind\Db\Row\RowGateway; use VuFind\Record\Loader; /** * Table Definition for resource * * @category VuFind * @package Db_Table * @author Demian Katz <demian.katz@villanova.edu> * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://vufind.org Main Site */ class Resource extends Gateway { /** * Date converter * * @var DateConverter */ protected $dateConverter; /** * Record loader * * @var Loader */ protected $recordLoader; /** * Constructor * * @param Adapter $adapter Database adapter * @param PluginManager $tm Table manager * @param array $cfg Laminas configuration * @param RowGateway $rowObj Row prototype object (null for default) * @param DateConverter $converter Date converter * @param Loader $loader Record loader * @param string $table Name of database table to interface with */ public function __construct(Adapter $adapter, PluginManager $tm, $cfg, ?RowGateway $rowObj, DateConverter $converter, Loader $loader, $table = 'resource' ) { $this->dateConverter = $converter; $this->recordLoader = $loader; parent::__construct($adapter, $tm, $cfg, $rowObj, $table); } /** * Look up a row for the specified resource. * * @param string $id Record ID to look up * @param string $source Source of record to look up * @param bool $create If true, create the row if it * does not yet exist. * @param \VuFind\RecordDriver\AbstractBase $driver A record driver for the * resource being created (optional -- improves efficiency if provided, but will * be auto-loaded as needed if left null). * * @return \VuFind\Db\Row\Resource|null Matching row if found or created, null * otherwise. */ public function findResource($id, $source = DEFAULT_SEARCH_BACKEND, $create = true, $driver = null ) { if (empty($id)) { throw new \Exception('Resource ID cannot be empty'); } $select = $this->select(['record_id' => $id, 'source' => $source]); $result = $select->current(); // Create row if it does not already exist and creation is enabled: if (empty($result) && $create) { $result = $this->createRow(); $result->record_id = $id; $result->source = $source; // Load record if it was not provided: if (null === $driver) { $driver = $this->recordLoader->load($id, $source); } // Load metadata into the database for sorting/failback purposes: $result->assignMetadata($driver, $this->dateConverter); // Save the new row. $result->save(); } return $result; } /** * Look up a rowset for a set of specified resources. * * @param array $ids Array of IDs * @param string $source Source of records to look up * * @return \Laminas\Db\ResultSet\AbstractResultSet */ public function findResources($ids, $source = DEFAULT_SEARCH_BACKEND) { $callback = function ($select) use ($ids, $source) { $select->where->in('record_id', $ids); $select->where->equalTo('source', $source); }; return $this->select($callback); } /** * Get a set of records from the requested favorite list. * * @param string $user ID of user owning favorite list * @param string $list ID of list to retrieve (null for all favorites) * @param array $tags Tags to use for limiting results * @param string $sort Resource table field to use for sorting (null for * no particular sort). * @param int $offset Offset for results * @param int $limit Limit for results (null for none) * * @return \Laminas\Db\ResultSet\AbstractResultSet */ public function getFavorites($user, $list = null, $tags = [], $sort = null, $offset = 0, $limit = null ) { // Set up base query: $obj = & $this; return $this->select( function ($s) use ($user, $list, $tags, $sort, $offset, $limit, $obj) { $s->columns( [ new Expression( 'DISTINCT(?)', ['resource.id'], [Expression::TYPE_IDENTIFIER] ), Select::SQL_STAR ] ); $s->join( ['ur' => 'user_resource'], 'resource.id = ur.resource_id', [] ); $s->where->equalTo('ur.user_id', $user); // Adjust for list if necessary: if (null !== $list) { $s->where->equalTo('ur.list_id', $list); } if ($offset > 0) { $s->offset($offset); } if (null !== $limit) { $s->limit($limit); } // Adjust for tags if necessary: if (!empty($tags)) { $linkingTable = $obj->getDbTable('ResourceTags'); foreach ($tags as $tag) { $matches = $linkingTable ->getResourcesForTag($tag, $user, $list)->toArray(); $getId = function ($i) { return $i['resource_id']; }; $s->where->in('resource.id', array_map($getId, $matches)); } } // Apply sorting, if necessary: if (!empty($sort)) { Resource::applySort($s, $sort); } } ); } /** * Get a set of records that do not have metadata stored in the resource * table. * * @return \Laminas\Db\ResultSet\AbstractResultSet */ public function findMissingMetadata() { $callback = function ($select) { $select->where->equalTo('title', '') ->OR->isNull('author') ->OR->isNull('year'); }; return $this->select($callback); } /** * Update the database to reflect a changed record identifier. * * @param string $oldId Original record ID * @param string $newId Revised record ID * @param string $source Record source * * @return void */ public function updateRecordId($oldId, $newId, $source = DEFAULT_SEARCH_BACKEND) { if ($oldId !== $newId && $resource = $this->findResource($oldId, $source) ) { // Do this as a transaction to prevent odd behavior: $connection = $this->getAdapter()->getDriver()->getConnection(); $connection->beginTransaction(); // Does the new ID already exist? if ($newResource = $this->findResource($newId, $source)) { // Special case: merge new ID and old ID: $tableObjects = []; foreach (['comments', 'userresource', 'resourcetags'] as $table) { $tableObjects[$table] = $this->getDbTable($table); $tableObjects[$table]->update( ['resource_id' => $newResource->id], ['resource_id' => $resource->id] ); } $resource->delete(); } else { // Default case: just update the record ID: $resource->record_id = $newId(); $resource->save(); } // Done -- commit the transaction: $connection->commit(); // Deduplicate rows where necessary (this can be safely done outside // of the transaction): if (isset($tableObjects['resourcetags'])) { $tableObjects['resourcetags']->deduplicate(); } if (isset($tableObjects['userresource'])) { $tableObjects['userresource']->deduplicate(); } } } /** * Apply a sort parameter to a query on the resource table. * * @param \Laminas\Db\Sql\Select $query Query to modify * @param string $sort Field to use for sorting (may include * 'desc' qualifier) * @param string $alias Alias to the resource table (defaults to * 'resource') * * @return void */ public static function applySort($query, $sort, $alias = 'resource') { // Apply sorting, if necessary: $legalSorts = [ 'title', 'title desc', 'author', 'author desc', 'year', 'year desc' ]; if (!empty($sort) && in_array(strtolower($sort), $legalSorts)) { // Strip off 'desc' to obtain the raw field name -- we'll need it // to sort null values to the bottom: $parts = explode(' ', $sort); $rawField = trim($parts[0]); // Start building the list of sort fields: $order = []; // The title field can't be null, so don't bother with the extra // isnull() sort in that case. if (strtolower($rawField) != 'title') { $order[] = new Expression( 'isnull(?)', [$alias . '.' . $rawField], [Expression::TYPE_IDENTIFIER] ); } // Apply the user-specified sort: $order[] = $alias . '.' . $sort; // Inject the sort preferences into the query object: $query->order($order); } } }
{'repo_name': 'vufind-org/vufind', 'stars': '187', 'repo_language': 'PHP', 'file_name': 'index.php', 'mime_type': 'text/x-php', 'hash': 783473860670687095, 'source_dataset': 'data'}
import java.util.*; class Solution{ public static void main(String[]args){ Scanner cin=new Scanner(System.in); int T=cin.nextInt(); for(;T>0;T--){ int a=cin.nextInt(),b=cin.nextInt(),n=cin.nextInt(); for(int i=0;i<n;i++){ System.out.print(a+b*((2<<i)-1)); System.out.print(i<n-1?" ":"\n"); } } } }
{'repo_name': 'cielavenir/procon', 'stars': '106', 'repo_language': 'C++', 'file_name': 'tyama_yukicoder725.rb', 'mime_type': 'text/x-ruby', 'hash': 7559567494456522189, '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>io.loganwright.$(PRODUCT_NAME:rfc1034identifier)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>BNDL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1</string> </dict> </plist>
{'repo_name': 'loganwright/Polymer', 'stars': '151', 'repo_language': 'Objective-C', 'file_name': 'Contents.json', 'mime_type': 'text/plain', 'hash': 5401134914392944725, 'source_dataset': 'data'}
/* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2092--2012 The R Core Team * * This program 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; either version 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, a copy is available at * https://www.R-project.org/Licenses/ * */ #include <Rinternals.h> #include "tools.h" extern int extR_HTTPDCreate(const char *ip, int port); extern void extR_HTTPDStop(void); SEXP startHTTPD(SEXP sIP, SEXP sPort) { const char *ip = 0; if (sIP != R_NilValue && (TYPEOF(sIP) != STRSXP || LENGTH(sIP) != 1)) error(_("invalid bind address specification")); if (sIP != R_NilValue) ip = CHAR(STRING_ELT(sIP, 0)); return ScalarInteger(extR_HTTPDCreate(ip, asInteger(sPort))); } SEXP stopHTTPD(void) { extR_HTTPDStop(); return R_NilValue; }
{'repo_name': 'microsoft/microsoft-r-open', 'stars': '167', 'repo_language': 'R', 'file_name': 'NLSstClosest.R', 'mime_type': 'text/plain', 'hash': -2424622248142155324, 'source_dataset': 'data'}
/* pinyon-script-400normal - latin */ @font-face { font-family: 'Pinyon Script'; font-style: normal; font-display: swap; font-weight: 400; src: local('Pinyon Script Regular '), local('Pinyon Script-Regular'), url('./files/pinyon-script-latin-400.woff2') format('woff2'), /* Super Modern Browsers */ url('./files/pinyon-script-latin-400.woff') format('woff'); /* Modern Browsers */ }
{'repo_name': 'KyleAMathews/typefaces', 'stars': '2352', 'repo_language': 'CSS', 'file_name': 'download-file.js', 'mime_type': 'text/plain', 'hash': -3953262043823233623, 'source_dataset': 'data'}
#include<stdio.h> #include"vgui_ControlConfigPanel.h" #include<VGUI_HeaderPanel.h> #include<VGUI_TablePanel.h> #include<VGUI_Label.h> #include<VGUI_ScrollPanel.h> #include<VGUI_Scheme.h> #include<VGUI_DataInputStream.h> #include<VGUI.h> #include<VGUI_TextEntry.h> using namespace vgui; namespace { class FooTablePanel : public TablePanel { private: Label* _label; TextEntry* _textEntry; ControlConfigPanel* _controlConfigPanel; public: FooTablePanel(ControlConfigPanel* controlConfigPanel,int x,int y,int wide,int tall,int columnCount) : TablePanel(x,y,wide,tall,columnCount) { _controlConfigPanel=controlConfigPanel; _label=new Label("You are a dumb monkey",0,0,100,20); _label->setBgColor(Scheme::sc_primary3); _label->setFgColor(Scheme::sc_primary1); _label->setFont(Scheme::sf_primary3); _textEntry=new TextEntry("",0,0,100,20); //_textEntry->setFont(Scheme::sf_primary3); } public: virtual int getRowCount() { return _controlConfigPanel->GetCVarCount(); } virtual int getCellTall(int row) { return 12; } virtual Panel* getCellRenderer(int column,int row,bool columnSelected,bool rowSelected,bool cellSelected) { char cvar[128],desc[128],bind[128],bindAlt[128]; _controlConfigPanel->GetCVar(row,cvar,128,desc,128); if(cellSelected) { _label->setBgColor(Scheme::sc_primary1); _label->setFgColor(Scheme::sc_primary3); } else if(rowSelected) { _label->setBgColor(Scheme::sc_primary2); _label->setFgColor(Scheme::sc_primary1); } else { _label->setBgColor(Scheme::sc_primary3); _label->setFgColor(Scheme::sc_primary1); } switch(column) { case 0: { _label->setText(desc); _label->setContentAlignment(Label::a_west); break; } case 1: { _controlConfigPanel->GetCVarBind(cvar,bind,128,bindAlt,128); _label->setText(bind); _label->setContentAlignment(Label::a_center); break; } case 2: { _controlConfigPanel->GetCVarBind(cvar,bind,128,bindAlt,128); _label->setText(bindAlt); _label->setContentAlignment(Label::a_center); break; } default: { _label->setText(""); break; } } return _label; } virtual Panel* startCellEditing(int column,int row) { _textEntry->setText("Goat",strlen("Goat")); _textEntry->requestFocus(); return _textEntry; } }; } ControlConfigPanel::ControlConfigPanel(int x,int y,int wide,int tall) : Panel(x,y,wide,tall) { setPaintBorderEnabled(false); setPaintBackgroundEnabled(false); setPaintEnabled(false); _actionLabel=new Label("Action"); _actionLabel->setBgColor(Scheme::sc_primary3); _actionLabel->setFgColor(Scheme::sc_primary3); _keyButtonLabel=new Label("Key / Button"); _keyButtonLabel->setBgColor(Scheme::sc_primary3); _keyButtonLabel->setFgColor(Scheme::sc_primary3); _alternateLabel=new Label("Alternate"); _alternateLabel->setBgColor(Scheme::sc_primary3); _alternateLabel->setFgColor(Scheme::sc_primary3); _headerPanel=new HeaderPanel(0,0,wide,20); _headerPanel->setParent(this); _headerPanel->addSectionPanel(_actionLabel); _headerPanel->addSectionPanel(_keyButtonLabel); _headerPanel->addSectionPanel(_alternateLabel); _headerPanel->setSliderPos( 0, wide/2 ); _headerPanel->setSliderPos( 1, (wide/2) + (wide/4) ); _headerPanel->setSliderPos( 2, wide ); _scrollPanel=new ScrollPanel(0,20,wide,tall-20); _scrollPanel->setParent(this); _scrollPanel->setPaintBorderEnabled(false); _scrollPanel->setPaintBackgroundEnabled(false); _scrollPanel->setPaintEnabled(false); _scrollPanel->getClient()->setPaintBorderEnabled(false); _scrollPanel->getClient()->setPaintBackgroundEnabled(false); _scrollPanel->getClient()->setPaintEnabled(false); _scrollPanel->setScrollBarVisible(false,true); _tablePanel=new FooTablePanel(this,0,0,_scrollPanel->getClient()->getWide(),800, 3); _tablePanel->setParent(_scrollPanel->getClient()); _tablePanel->setHeaderPanel(_headerPanel); _tablePanel->setBgColor(Color(200,0,0,255)); _tablePanel->setFgColor(Color(Scheme::sc_primary2)); _tablePanel->setGridVisible(true,true); _tablePanel->setGridSize(1,1); } void ControlConfigPanel::AddCVar(const char* cvar,const char* desc) { _cvarDar.addElement(vgui_strdup(cvar)); _descDar.addElement(vgui_strdup(desc)); } int ControlConfigPanel::GetCVarCount() { return _cvarDar.getCount(); } void ControlConfigPanel::GetCVar(int index,char* cvar,int cvarLen,char* desc,int descLen) { vgui_strcpy(cvar,cvarLen,_cvarDar[index]); vgui_strcpy(desc,descLen,_descDar[index]); } void ControlConfigPanel::AddCVarFromInputStream(InputStream* is) { if(is==null) { return; } DataInputStream dis(is); bool success; while(1) { char buf[256],cvar[128],desc[128]; dis.readLine(buf,256,success); if(!success) { break; } if(sscanf(buf,"\"%[^\"]\" \"%[^\"]\"",cvar,desc)==2) { AddCVar(cvar,desc); } } } void ControlConfigPanel::GetCVarBind(const char* cvar,char* bind,int bindLen,char* bindAlt,int bindAltLen) { sprintf(bind,"%s : Bind",cvar); sprintf(bindAlt,"%s : BindAlt",cvar); } void ControlConfigPanel::SetCVarBind(const char* cvar,const char* bind,const char* bindAlt) { }
{'repo_name': 'unknownworlds/NS', 'stars': '220', 'repo_language': 'C++', 'file_name': 'steam installer.iss', 'mime_type': 'text/plain', 'hash': -2233700028167577591, 'source_dataset': 'data'}
;;; ;;; xa_lba48.asm ;;; ;;; LBA48 support by Paul Bartholomew (oz_paulb) ;;; Copyright (c) 2003 - Released under GNU Public License ;;; ;;; Modified and adapted for nkpatcher by rmenhal ;;; Copyright 2004 rmenhal ;;; ;;; Licensed under GNU General Public License version 2. See the file COPYING ;;; for details. ;;; %include "diskcdromdef.inc" %include "lba48.inc" DEF_PARTMETHOD_ONLY_STANDARD_PARTITIONS equ 0 DEF_PARTMETHOD_PART6_REST_OF_DRIVE equ 1 DEF_PARTMETHOD_PART6_UNDER_137GB_PART7_REST_OF_DRIVE equ 2 DEF_PARTMETHOD_PART6_UNDER_137GB_NO_PART7 equ 3 XBOX_SWAPPART1_LBA_START equ 0x400 XBOX_SWAPPART_LBA_SIZE equ 0x177000 XBOX_SWAPPART2_LBA_START equ (XBOX_SWAPPART1_LBA_START + XBOX_SWAPPART_LBA_SIZE) XBOX_SWAPPART3_LBA_START equ (XBOX_SWAPPART2_LBA_START + XBOX_SWAPPART_LBA_SIZE) XBOX_SYSPART_LBA_START equ (XBOX_SWAPPART3_LBA_START + XBOX_SWAPPART_LBA_SIZE) XBOX_SYSPART_LBA_SIZE equ 0xfa000 XBOX_MUSICPART_LBA_START equ (XBOX_SYSPART_LBA_START + XBOX_SYSPART_LBA_SIZE) XBOX_MUSICPART_LBA_SIZE equ 0x9896b0 XBOX_STANDARD_MAX_LBA equ (XBOX_MUSICPART_LBA_START + XBOX_MUSICPART_LBA_SIZE) xa_lba48_partition_table: .hdr: db '****PARTINFO****' times 32 db 0 ; reserved PT_ENTRY 'XBOX MUSIC ', \ PE_PARTFLAGS_IN_USE, \ XBOX_MUSICPART_LBA_START, \ XBOX_MUSICPART_LBA_SIZE, \ 0 PT_ENTRY 'XBOX SYSTEM ', \ PE_PARTFLAGS_IN_USE, \ XBOX_SYSPART_LBA_START, \ XBOX_SYSPART_LBA_SIZE, \ 0 PT_ENTRY 'XBOX GAME SWAP 1', \ PE_PARTFLAGS_IN_USE, \ XBOX_SWAPPART1_LBA_START, \ XBOX_SWAPPART_LBA_SIZE, \ 0 PT_ENTRY 'XBOX GAME SWAP 2', \ PE_PARTFLAGS_IN_USE, \ XBOX_SWAPPART2_LBA_START, \ XBOX_SWAPPART_LBA_SIZE, \ 0 PT_ENTRY 'XBOX GAME SWAP 3', \ PE_PARTFLAGS_IN_USE, \ XBOX_SWAPPART3_LBA_START, \ XBOX_SWAPPART_LBA_SIZE, \ 0 xa_lba48_partition_table_first_available: PT_ENTRY ' ',0,0,0,0 PT_ENTRY ' ',0,0,0,0 PT_ENTRY ' ',0,0,0,0 PT_ENTRY ' ',0,0,0,0 PT_ENTRY ' ',0,0,0,0 PT_ENTRY ' ',0,0,0,0 PT_ENTRY ' ',0,0,0,0 PT_ENTRY ' ',0,0,0,0 PT_ENTRY ' ',0,0,0,0 %if ($-xa_lba48_partition_table) != PARTITION_TABLE_SIZE %error Partition table is bad. %endif times (512-PARTITION_TABLE_SIZE) db 0 xa_lba48_def_partition_method: db PARTITION_METHOD xa_lba48_ignore_HD_part_table: %ifdef IGNORE_HD_PARTITION_TABLE db 1 %else db 0 %endif align 4 xa_lba48_identify_data: times 512 db 0 xa_lba48_fill_parameters: .io_status equ 0 - 8 .ata_pass equ .io_status - ATA_PASS_THROUGH_size .part_buf equ .ata_pass - 512 .local_var_size equ -.part_buf ;; [esp+4] = Address to FEATURE_PARAMETERS for filling LBA48 parameters push ebp mov ebp,esp sub esp,.local_var_size push ebx push esi push edi lea esi,[ebp + .io_status] ; IO status block push eax mov ebx,esp push byte 40h push .part0_ansistr push byte 0 mov edx,esp ; Object attributes push byte 20h ; FILE_SYNCHRONOUS_IO_NONALERT push byte 3 ; FILE_SHARE_READ | FILE_SHARE_WRITE push esi push edx push 80100000h ; GENERIC_READ | SYNCHRONIZE push ebx call dword [NtOpenFile] add esp,byte 12 pop ebx test eax,eax jl near .exit xor eax,eax lea edi,[ebp + .ata_pass] mov [edi + ATA_PASS_THROUGH.IdeReg],eax mov [edi + ATA_PASS_THROUGH.IdeReg+4],eax mov byte [edi + ATA_PASS_THROUGH.IdeReg + IDEREGS.bCommandReg],0ECh ; ATA Identify Device command mov dword [edi + ATA_PASS_THROUGH.DataBufferSize],512 mov dword [edi + ATA_PASS_THROUGH.DataBuffer],xa_lba48_identify_data push byte ATA_PASS_THROUGH_size push edi push byte ATA_PASS_THROUGH_size push edi push IOCTL_IDE_PASS_THROUGH push esi push eax push eax push eax push ebx call dword [NtDeviceIoControlFile] test eax,eax jl .exit_close call .get_drive_total_sectors mov edx,[ebp+8] mov [edx + FEATURE_PARAMETERS.lba48_total_sectors],eax mov dword [edx + FEATURE_PARAMETERS.lba48_partition_table],xa_lba48_partition_table cmp byte [xa_lba48_ignore_HD_part_table],0 jne .usual_parts lea edi,[ebp + .part_buf] xor eax,eax push eax push eax push esp push 512 push edi push esi push eax push eax push eax push ebx call dword [NtReadFile] pop ecx pop edx test eax,eax jl .usual_parts mov esi,edi mov edi,xa_lba48_partition_table.hdr push byte (PARTITION_MAGIC_LEN/4) pop ecx repe cmpsd jne .usual_parts mov ecx,PARTITION_TABLE_SIZE-PARTITION_MAGIC_LEN rep movsb jmp short .exit_close .usual_parts: mov ecx,[ebp+8] mov ecx,[ecx + FEATURE_PARAMETERS.lba48_total_sectors] call .setup_usual_partition_table .exit_close: push ebx call dword [NtClose] .exit: pop edi pop esi pop ebx leave ret .part0_strz db '\Device\Harddisk0\Partition0',0 .part0_ansistr dw $-.part0_strz-1, $-.part0_strz dd .part0_strz .ID_OFS__CMD_SET_SUPPORTED equ (83*2) .BITMASK__CMD_SET_HAS_LBA48 equ (1<<10) .ID_OFS__TOTAL_USER_SECTORS_LBA28 equ (60*2) .ID_OFS__TOTAL_USER_SECTORS_LBA48_LOW equ (100*2) .ID_OFS__TOTAL_USER_SECTORS_LBA48_HIGH equ (102*2) .get_drive_total_sectors: mov edx,xa_lba48_identify_data mov eax,[edx + .ID_OFS__CMD_SET_SUPPORTED] test eax,.BITMASK__CMD_SET_HAS_LBA48 jnz short .drive_supports_lba48 .no_lba48_support: mov eax,[edx + .ID_OFS__TOTAL_USER_SECTORS_LBA28] jmp short .have_total_sectors .drive_supports_lba48: cmp dword [edx + .ID_OFS__TOTAL_USER_SECTORS_LBA48_HIGH],byte 0 ja short .drive_is_huge__limit_to_32bits mov eax,[edx + .ID_OFS__TOTAL_USER_SECTORS_LBA48_LOW] jmp short .have_total_sectors .drive_is_huge__limit_to_32bits: or eax,byte -1 .have_total_sectors: ret .setup_usual_partition_table: push ebx push esi push edi mov eax,ecx mov edx,ecx cmp eax,XBOX_STANDARD_MAX_LBA ja .try_extra_partitions .j_skip_extra_partitions: jmp .skip_extra_partitions .try_extra_partitions: cmp byte [xa_lba48_def_partition_method],DEF_PARTMETHOD_ONLY_STANDARD_PARTITIONS jz short .j_skip_extra_partitions sub eax,XBOX_STANDARD_MAX_LBA ;; eax now free space at end of drive mov ebx,eax xor ecx,ecx ;; ebx holds part6 size (default to all free space) ;; ecx holds part7 size (default to zero) ;; if drive isn't > 137gb, just create part6 cmp edx,0x0fffffff jbe .create_partitions .drive_larger_than_137gb: cmp byte [xa_lba48_def_partition_method],DEF_PARTMETHOD_PART6_REST_OF_DRIVE jz .create_partitions mov ebx,0x0fffffff - XBOX_STANDARD_MAX_LBA ;; ebx holds part6 size (rest of space before 137gb) cmp byte [xa_lba48_def_partition_method],DEF_PARTMETHOD_PART6_UNDER_137GB_NO_PART7 jz .create_partitions mov ecx,edx ;edx holds total drive sectors sub ecx,XBOX_STANDARD_MAX_LBA ;ecx now free space at end of ;drive sub ecx,ebx ;subtract space used for part6 ;; ecx holds part7 size .create_partitions: .drive_less_or_equal_to_137gb: ;; ebx = part6 size ;; ecx = part7 size ;; edx = total drive sectors mov eax,xa_lba48_partition_table_first_available mov esi,.drive_f_str lea edi,[eax + _PE_OFS__part_name] times 4 movsd mov dword [eax + _PE_OFS__part_lba_start],XBOX_STANDARD_MAX_LBA mov dword [eax + _PE_OFS__part_lba_size],ebx mov dword [eax + _PE_OFS__part_flags],PE_PARTFLAGS_IN_USE test ecx,ecx jz .partitions_created add eax,byte _PE_SIZ__part_entry mov esi,.drive_g_str lea edi,[eax + _PE_OFS__part_name] times 4 movsd mov dword [eax + _PE_OFS__part_lba_start],XBOX_STANDARD_MAX_LBA add dword [eax + _PE_OFS__part_lba_start],ebx mov dword [eax + _PE_OFS__part_lba_size],ecx mov dword [eax + _PE_OFS__part_flags],PE_PARTFLAGS_IN_USE .partitions_created: .skip_extra_partitions: .partitions_done: pop edi pop esi pop ebx ret align 4 .drive_f_str db 'DRIVE F: ' .drive_g_str db 'DRIVE P: '
{'repo_name': 'Rocky5/Xbox-Softmodding-Tool', 'stars': '245', 'repo_language': 'C', 'file_name': 'lang.xml', 'mime_type': 'text/xml', 'hash': 4926792859338070406, 'source_dataset': 'data'}
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res/com.example.wechat01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <com.example.wechat01.widght.swipe.SwipeLayout android:id="@+id/swipe" app:drag_edge="right" android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:id="@+id/layout_back" android:background="@color/red" android:gravity="center" android:layout_width="80dp" android:layout_height="65.0dip"> <TextView android:id="@+id/txt_del" style="@style/MMFontTitleInList" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="删除" android:textColor="@color/white" android:textSize="18sp" android:singleLine="true" /> </LinearLayout> <LinearLayout android:id="@+id/contactitem_layout" style="@style/MMListItem" android:layout_height="65.0dip" android:background="@color/white" android:paddingLeft="12dip"> <RelativeLayout android:id="@+id/avatar_container" android:layout_width="59dp" android:layout_marginTop="4dp" android:layout_height="match_parent" android:layout_alignParentLeft="true"> <ImageView android:id="@+id/contactitem_avatar_iv" android:layout_width="50.0dip" android:layout_height="50.0dip" android:src="@drawable/head" /> <TextView android:id="@+id/unread_msg_number" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:background="@drawable/aii" android:gravity="center" android:text="2" android:textColor="@android:color/white" android:textSize="12sp" /> </RelativeLayout> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1.0" android:orientation="vertical" android:paddingLeft="5dip"> <TextView android:text="老婆" android:id="@+id/txt_name" style="@style/MMFontTitleInList" android:textColor="@color/black" android:singleLine="true" /> <TextView android:text="吃饭了吗?" android:id="@+id/txt_content" style="@style/MMFontTitleInList" android:layout_below="@+id/txt_name" android:layout_toRightOf="@+id/txt_state" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:textSize="14sp" android:textColor="@color/black1" android:singleLine="true" /> </RelativeLayout> <TextView android:id="@+id/txt_time" android:text="下午 2.10" style="@style/MMFontTitleInList" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginTop="10dp" android:layout_marginRight="10dp" android:gravity="top" android:textSize="12sp" android:singleLine="true" /> </LinearLayout> </com.example.wechat01.widght.swipe.SwipeLayout> <View android:layout_width="match_parent" android:layout_height="1dp" android:background="@color/black2" /> </LinearLayout>
{'repo_name': 'motianhuo/VCameraDemo', 'stars': '1421', 'repo_language': 'Java', 'file_name': 'org.eclipse.core.resources.prefs', 'mime_type': 'text/plain', 'hash': 3714016708906639099, 'source_dataset': 'data'}
var proto = require('./native'), ldap = require('ldapjs'); function LDAP(options) { this.options = options; this._ldapClient = ldap.createClient(options.server); } LDAP.prototype = proto.prototype; /* * Remote HTTP Basic Auth */ LDAP.prototype.test = function(username, password, opts, next) { var self = this, dao = this.dao, filter = {}, options = this.options; if ('admin' === username || opts.asOwner) { this.__proto__._test.apply(this, arguments); } else if (!username || !password) { next(self.MSG_NOT_AUTHORIZED, null); } else { var client = this._ldapClient, base = options.base, search = app._.clone(options.search), bind = true; if (search.filter) { search.filter = search.filter.replace(/{{username}}/, username); } client.search(base, search, function(err, res) { if (err) { next(err); } else { var foundMatch = false, notFoundMsg = 'Not Found'; res.on('end', function() { if (!foundMatch) { next(notFoundMsg, null); } }); res.on('searchEntry', function(entry) { foundMatch = true; client.compare(entry.dn, 'userPassword', password, function(err, pass ) { if (err) { next(err); } else if (!pass) { next('Not Authorized') } else { // auth continue dao.find( 'account', { username : username }, function(err, acctResult) { if (!err && (null != acctResult)) { var filter = { 'owner_id' : acctResult.id, 'type' : 'token' } dao.find('account_auth', filter, function(isErr, authResult) { var resultModel = null; if (!isErr && null != authResult) { self.acctBind(acctResult, authResult, options, function(err, accountInfo) { next(false, accountInfo); }); } else { next(self.MSG_NOT_AUTHORIZED, resultModel); } }); // if user auths off and option set, auto create // local account } else if (!acctResult && options.auto_sync && options.auto_sync.mail_field) { var emailAddress; // if no email address found, create a local dummy if ('none' === options.auto_sync.mail_field) { emailAddress = 'noreply@' + username + '.' + CFG.domain; } else { for (var i = 0; i < entry.attributes.length; i++) { if (options.auto_sync.mail_field === entry.attributes[i].type) { emailAddress = entry.attributes[i].vals.pop(); break; } } } if (emailAddress) { dao.createUser(username, emailAddress, null, function(err, authResult) { authResult.username = username; authResult.name = username authResult.account_level = GLOBAL.DEFS.ACCOUNT_LEVEL.USER; self.acctBind(authResult, authResult, options, function(err, accountInfo) { next(false, accountInfo); }); }); } else { next(self.MSG_NOT_AUTHORIZED, null); } } else { app.logmessage('No Email field found to sync for ' + username + ', skipping auth', 'error'); next(self.MSG_NOT_AUTHORIZED, null); } } ); } }); }); } }); } } module.exports = LDAP;
{'repo_name': 'bipio-server/bipio', 'stars': '875', 'repo_language': 'JavaScript', 'file_name': 'index.js', 'mime_type': 'text/plain', 'hash': 1392144483450170183, 'source_dataset': 'data'}
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * The MV of DecimalDigit ::: 3 or of HexDigit ::: 3 is 3 * * @path ch09/9.3/9.3.1/S9.3.1_A19.js * @description Compare Number('0x3') and Number('0X3') with 3 */ // CHECK#1 if (Number("3") !== 3) { $ERROR('#1: Number("3") === 3. Actual: ' + (Number("3"))); } // CHECK#2 if (+("0x3") !== 3) { $ERROR('#2: +("0x3") === 3. Actual: ' + (+("0x3"))); } // CHECK#3 if (Number("0X3") !== 3) { $ERROR('#3: Number("0X3") === 3. Actual: ' + (Number("0X3"))); }
{'repo_name': 'wizzard0/js2lua', 'stars': '181', 'repo_language': 'JavaScript', 'file_name': 'shortcuts.js', 'mime_type': 'text/plain', 'hash': -424840682282020740, 'source_dataset': 'data'}
/******************************************************************************* * Copyright (c) 2015 hangum. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Contributors: * hangum - initial API and implementation ******************************************************************************/ package com.hangum.tadpole.engine.sql.parser.define; import java.util.regex.Pattern; /** * parser deifne * * @author hangum * */ public class ParserDefine { /** REGEXP pattern flag */ public final static int PATTERN_FLAG = Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL; }
{'repo_name': 'hangum/TadpoleForDBTools', 'stars': '512', 'repo_language': 'Java', 'file_name': 'MANIFEST.MF', 'mime_type': 'text/plain', 'hash': -8634139450201159930, 'source_dataset': 'data'}
/* shc.c */ /** * This software contains an ad hoc version of the 'Alleged RC4' algorithm, * which was anonymously posted on sci.crypt news by cypherpunks on Sep 1994. * * My implementation is a complete rewrite of the one found in * an unknown-copyright (283 characters) version picked up from: * From: allen@gateway.grumman.com (John L. Allen) * Newsgroups: comp.lang.c * Subject: Shrink this C code for fame and fun * Date: 21 May 1996 10:49:37 -0400 * And it is licensed also under GPL. * *That's where I got it, now I am going to do some work on it *It will reside here: http://github.com/neurobin/shc */ static const char my_name[] = "shc"; static const char version[] = "Version 4.0.3"; static const char subject[] = "Generic Shell Script Compiler"; static const char cpright[] = "GNU GPL Version 3"; static const struct { const char * f, * s, * e; } provider = { "Md Jahidul", "Hamid", "<jahidulhamid@yahoo.com>" }; /* static const struct { const char * f, * s, * e; } author = { "Francisco", "Garcia", "<frosal@fi.upm.es>" }; */ /*This is the original author who first came up with this*/ static const char * copying[] = { "Copying:", "", " This program 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; either version 3 of the License, or", " (at your option) any later version.", "", " This program 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 this program; if not, write to the Free Software", " @Neurobin, Dhaka, Bangladesh", "", " Report problems and questions to:http://github.com/neurobin/shc", "", 0}; static const char * abstract[] = { "Abstract:", "", " This tool generates a stripped binary executable version", " of the script specified at command line.", "", " Binary version will be saved with a .x extension by default.", " You can specify output file name too with [-o filname] option.", "", " You can specify expiration date [-e] too, after which binary will", " refuse to be executed, displaying \"[-m]\" instead.", "", " You can compile whatever interpreted script, but valid [-i], [-x]", " and [-l] options must be given.", "", 0}; static const char usage[] = "Usage: shc [-e date] [-m addr] [-i iopt] [-x cmnd] [-l lopt] [-o outfile] [-rvDSUHCABh] -f script"; static const char * help[] = { "", " -e %s Expiration date in dd/mm/yyyy format [none]", " -m %s Message to display upon expiration [\"Please contact your provider\"]", " -f %s File name of the script to compile", " -i %s Inline option for the shell interpreter i.e: -e", " -x %s eXec command, as a printf format i.e: exec('%s',@ARGV);", " -l %s Last shell option i.e: --", " -o %s output filename", " -r Relax security. Make a redistributable binary", " -v Verbose compilation", " -S Switch ON setuid for root callable programs [OFF]", " -D Switch ON debug exec calls [OFF]", " -U Make binary untraceable [no]", " -H Hardening : extra security protection [no]", " Require bourne shell (sh) and parameters are not supported", " -C Display license and exit", " -A Display abstract and exit", " -B Compile for busybox", " -h Display help and exit", "", " Environment variables used:", " Name Default Usage", " CC cc C compiler command", " CFLAGS <none> C compiler flags", " LDFLAGS <none> Linker flags", "", " Please consult the shc man page.", "", 0}; #include <sys/types.h> #include <sys/stat.h> #include <assert.h> #include <ctype.h> #include <errno.h> #include <fcntl.h> #include <signal.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #define SIZE 4096 static char * file; static char * file2; static char date[21]; static char * mail = "Please contact your provider jahidulhamid@yahoo.com"; static char rlax[1]; static char * shll; static char * inlo; static char * xecc; static char * lsto; static char * opts; static char * text; static int verbose; static const char SETUID_line[] = "#define SETUID %d /* Define as 1 to call setuid(0) at start of script */\n"; static int SETUID_flag = 0; static const char DEBUGEXEC_line[] = "#define DEBUGEXEC %d /* Define as 1 to debug execvp calls */\n"; static int DEBUGEXEC_flag = 0; static const char TRACEABLE_line[] = "#define TRACEABLE %d /* Define as 1 to enable ptrace the executable */\n"; static int TRACEABLE_flag = 1; static const char HARDENING_line[] = "#define HARDENING %d /* Define as 1 to disable ptrace/dump the executable */\n"; static int HARDENING_flag = 0; static const char BUSYBOXON_line[] = "#define BUSYBOXON %d /* Define as 1 to enable work with busybox */\n"; static int BUSYBOXON_flag = 0; static const char * RTC[] = { "", "#if HARDENING", "static const char * shc_x[] = {", "\"/*\",", "\" * Copyright 2019 - Intika <intika@librefox.org>\",", "\" * Replace ******** with secret read from fd 21\",", "\" * Also change arguments location of sub commands (sh script commands)\",", "\" * gcc -Wall -fpic -shared -o shc_secret.so shc_secret.c -ldl\",", "\" */\",", "\"\",", "\"#define _GNU_SOURCE /* needed to get RTLD_NEXT defined in dlfcn.h */\",", "\"#define PLACEHOLDER \\\"********\\\"\",", "\"#include <dlfcn.h>\",", "\"#include <stdlib.h>\",", "\"#include <string.h>\",", "\"#include <unistd.h>\",", "\"#include <stdio.h>\",", "\"#include <signal.h>\",", "\"\",", "\"static char secret[128000]; //max size\",", "\"typedef int (*pfi)(int, char **, char **);\",", "\"static pfi real_main;\",", "\"\",", "\"// copy argv to new location\",", "\"char **copyargs(int argc, char** argv){\",", "\" char **newargv = malloc((argc+1)*sizeof(*argv));\",", "\" char *from,*to;\",", "\" int i,len;\",", "\"\",", "\" for(i = 0; i<argc; i++){\",", "\" from = argv[i];\",", "\" len = strlen(from)+1;\",", "\" to = malloc(len);\",", "\" memcpy(to,from,len);\",", "\" // zap old argv space\",", "\" memset(from,'\\\\0',len);\",", "\" newargv[i] = to;\",", "\" argv[i] = 0;\",", "\" }\",", "\" newargv[argc] = 0;\",", "\" return newargv;\",", "\"}\",", "\"\",", "\"static int mymain(int argc, char** argv, char** env) {\",", "\" //fprintf(stderr, \\\"Inject main argc = %d\\\\n\\\", argc);\",", "\" return real_main(argc, copyargs(argc,argv), env);\",", "\"}\",", "\"\",", "\"int __libc_start_main(int (*main) (int, char**, char**),\",", "\" int argc,\",", "\" char **argv,\",", "\" void (*init) (void),\",", "\" void (*fini)(void),\",", "\" void (*rtld_fini)(void),\",", "\" void (*stack_end)){\",", "\" static int (*real___libc_start_main)() = NULL;\",", "\" int n;\",", "\"\",", "\" if (!real___libc_start_main) {\",", "\" real___libc_start_main = dlsym(RTLD_NEXT, \\\"__libc_start_main\\\");\",", "\" if (!real___libc_start_main) abort();\",", "\" }\",", "\"\",", "\" n = read(21, secret, sizeof(secret));\",", "\" if (n > 0) {\",", "\" int i;\",", "\"\",", "\" if (secret[n - 1] == '\\\\n') secret[--n] = '\\\\0';\",", "\" for (i = 1; i < argc; i++)\",", "\" if (strcmp(argv[i], PLACEHOLDER) == 0)\",", "\" argv[i] = secret;\",", "\" }\",", "\"\",", "\" real_main = main;\",", "\"\",", "\" return real___libc_start_main(mymain, argc, argv, init, fini, rtld_fini, stack_end);\",", "\"}\",", "\"\",", "0};", "#endif /* HARDENING */", "", "/* rtc.c */", "", "#include <sys/stat.h>", "#include <sys/types.h>", "", "#include <errno.h>", "#include <stdio.h>", "#include <stdlib.h>", "#include <string.h>", "#include <time.h>", "#include <unistd.h>", "", "/* 'Alleged RC4' */", "", "static unsigned char stte[256], indx, jndx, kndx;", "", "/*", " * Reset arc4 stte. ", " */", "void stte_0(void)", "{", " indx = jndx = kndx = 0;", " do {", " stte[indx] = indx;", " } while (++indx);", "}", "", "/*", " * Set key. Can be used more than once. ", " */", "void key(void * str, int len)", "{", " unsigned char tmp, * ptr = (unsigned char *)str;", " while (len > 0) {", " do {", " tmp = stte[indx];", " kndx += tmp;", " kndx += ptr[(int)indx % len];", " stte[indx] = stte[kndx];", " stte[kndx] = tmp;", " } while (++indx);", " ptr += 256;", " len -= 256;", " }", "}", "", "/*", " * Crypt data. ", " */", "void arc4(void * str, int len)", "{", " unsigned char tmp, * ptr = (unsigned char *)str;", " while (len > 0) {", " indx++;", " tmp = stte[indx];", " jndx += tmp;", " stte[indx] = stte[jndx];", " stte[jndx] = tmp;", " tmp += stte[indx];", " *ptr ^= stte[tmp];", " ptr++;", " len--;", " }", "}", "", "/* End of ARC4 */", "", "#if HARDENING", "", "#include <sys/ptrace.h>", "#include <sys/wait.h>", "#include <signal.h>", "#include <sys/prctl.h>", "#define PR_SET_PTRACER 0x59616d61", "", "/* Seccomp Sandboxing Init */", "#include <stdlib.h>", "#include <stdio.h>", "#include <stddef.h>", "#include <string.h>", "#include <unistd.h>", "#include <errno.h>", "", "#include <sys/types.h>", "#include <sys/prctl.h>", "#include <sys/syscall.h>", "#include <sys/socket.h>", "", "#include <linux/filter.h>", "#include <linux/seccomp.h>", "#include <linux/audit.h>", "", "#define ArchField offsetof(struct seccomp_data, arch)", "", "#define Allow(syscall) \\", " BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, SYS_##syscall, 0, 1), \\", " BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW)", "", "struct sock_filter filter[] = {", " /* validate arch */", " BPF_STMT(BPF_LD+BPF_W+BPF_ABS, ArchField),", " BPF_JUMP( BPF_JMP+BPF_JEQ+BPF_K, AUDIT_ARCH_X86_64, 1, 0),", " BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL),", "", " /* load syscall */", " BPF_STMT(BPF_LD+BPF_W+BPF_ABS, offsetof(struct seccomp_data, nr)),", "", " /* list of allowed syscalls */", " Allow(exit_group), /* exits a process */", " Allow(brk), /* for malloc(), inside libc */", " Allow(mmap), /* also for malloc() */", " Allow(munmap), /* for free(), inside libc */", "", " /* and if we don't match above, die */", " BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_KILL),", "};", "struct sock_fprog filterprog = {", " .len = sizeof(filter)/sizeof(filter[0]),", " .filter = filter", "};", "", "/* Seccomp Sandboxing - Set up the restricted environment */", "void seccomp_hardening() {", " if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {", " perror(\"Could not start seccomp:\");", " exit(1);", " }", " if (prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &filterprog) == -1) {", " perror(\"Could not start seccomp:\");", " exit(1);", " }", "} ", "/* End Seccomp Sandboxing Init */", "", "void shc_x_file() {", " FILE *fp;", " int line = 0;", "", " if ((fp = fopen(\"/tmp/shc_x.c\", \"w\")) == NULL ) {exit(1); exit(1);}", " for (line = 0; shc_x[line]; line++) fprintf(fp, \"%s\\n\", shc_x[line]);", " fflush(fp);fclose(fp);", "}", "", "int make() {", " char * cc, * cflags, * ldflags;", " char cmd[4096];", "", " cc = getenv(\"CC\");", " if (!cc) cc = \"cc\";", "", " sprintf(cmd, \"%s %s -o %s %s\", cc, \"-Wall -fpic -shared\", \"/tmp/shc_x.so\", \"/tmp/shc_x.c -ldl\");", " if (system(cmd)) {remove(\"/tmp/shc_x.c\"); return -1;}", " remove(\"/tmp/shc_x.c\"); return 0;", "}", "", "void arc4_hardrun(void * str, int len) {", " //Decode locally", " char tmp2[len];", " char tmp3[len+1024];", " memcpy(tmp2, str, len);", "", " unsigned char tmp, * ptr = (unsigned char *)tmp2;", " int lentmp = len;", " int pid, status;", " pid = fork();", "", " shc_x_file();", " if (make()) {exit(1);}", "", " setenv(\"LD_PRELOAD\",\"/tmp/shc_x.so\",1);", "", " if(pid==0) {", "", " //Start tracing to protect from dump & trace", " if (ptrace(PTRACE_TRACEME, 0, 0, 0) < 0) {", " kill(getpid(), SIGKILL);", " _exit(1);", " }", "", " //Decode Bash", " while (len > 0) {", " indx++;", " tmp = stte[indx];", " jndx += tmp;", " stte[indx] = stte[jndx];", " stte[jndx] = tmp;", " tmp += stte[indx];", " *ptr ^= stte[tmp];", " ptr++;", " len--;", " }", "", " //Do the magic", " sprintf(tmp3, \"%s %s\", \"'********' 21<<<\", tmp2);", "", " //Exec bash script //fork execl with 'sh -c'", " system(tmp2);", "", " //Empty script variable", " memcpy(tmp2, str, lentmp);", "", " //Clean temp", " remove(\"/tmp/shc_x.so\");", "", " //Sinal to detach ptrace", " ptrace(PTRACE_DETACH, 0, 0, 0);", " exit(0);", " }", " else {wait(&status);}", "", " /* Seccomp Sandboxing - Start */", " seccomp_hardening();", "", " exit(0);", "}", "#endif /* HARDENING */", "", "/*", " * Key with file invariants. ", " */", "int key_with_file(char * file)", "{", " struct stat statf[1];", " struct stat control[1];", "", " if (stat(file, statf) < 0)", " return -1;", "", " /* Turn on stable fields */", " memset(control, 0, sizeof(control));", " control->st_ino = statf->st_ino;", " control->st_dev = statf->st_dev;", " control->st_rdev = statf->st_rdev;", " control->st_uid = statf->st_uid;", " control->st_gid = statf->st_gid;", " control->st_size = statf->st_size;", " control->st_mtime = statf->st_mtime;", " control->st_ctime = statf->st_ctime;", " key(control, sizeof(control));", " return 0;", "}", "", "#if DEBUGEXEC", "void debugexec(char * sh11, int argc, char ** argv)", "{", " int i;", " fprintf(stderr, \"shll=%s\\n\", sh11 ? sh11 : \"<null>\");", " fprintf(stderr, \"argc=%d\\n\", argc);", " if (!argv) {", " fprintf(stderr, \"argv=<null>\\n\");", " } else { ", " for (i = 0; i <= argc ; i++)", " fprintf(stderr, \"argv[%d]=%.60s\\n\", i, argv[i] ? argv[i] : \"<null>\");", " }", "}", "#endif /* DEBUGEXEC */", "", "void rmarg(char ** argv, char * arg)", "{", " for (; argv && *argv && *argv != arg; argv++);", " for (; argv && *argv; argv++)", " *argv = argv[1];", "}", "", "void chkenv_end(void);", "", "int chkenv(int argc)", "{", " char buff[512];", " unsigned long mask, m;", " int l, a, c;", " char * string;", " extern char ** environ;", "", " mask = (unsigned long)getpid();", " stte_0();", " key(&chkenv, (void*)&chkenv_end - (void*)&chkenv);", " key(&data, sizeof(data));", " key(&mask, sizeof(mask));", " arc4(&mask, sizeof(mask));", " sprintf(buff, \"x%lx\", mask);", " string = getenv(buff);", "#if DEBUGEXEC", " fprintf(stderr, \"getenv(%s)=%s\\n\", buff, string ? string : \"<null>\");", "#endif", " l = strlen(buff);", " if (!string) {", " /* 1st */", " sprintf(&buff[l], \"=%lu %d\", mask, argc);", " putenv(strdup(buff));", " return 0;", " }", " c = sscanf(string, \"%lu %d%c\", &m, &a, buff);", " if (c == 2 && m == mask) {", " /* 3rd */", " rmarg(environ, &string[-l - 1]);", " return 1 + (argc - a);", " }", " return -1;", "}", "", "void chkenv_end(void){}", "", "#if HARDENING", "", "static void gets_process_name(const pid_t pid, char * name) {", " char procfile[BUFSIZ];", " sprintf(procfile, \"/proc/%d/cmdline\", pid);", " FILE* f = fopen(procfile, \"r\");", " if (f) {", " size_t size;", " size = fread(name, sizeof (char), sizeof (procfile), f);", " if (size > 0) {", " if ('\\n' == name[size - 1])", " name[size - 1] = '\\0';", " }", " fclose(f);", " }", "}", "", "void hardening() {", " prctl(PR_SET_DUMPABLE, 0);", " prctl(PR_SET_PTRACER, -1);", "", " int pid = getppid();", " char name[256] = {0};", " gets_process_name(pid, name);", "", " if ( (strcmp(name, \"bash\") != 0) ", " && (strcmp(name, \"/bin/bash\") != 0) ", " && (strcmp(name, \"sh\") != 0) ", " && (strcmp(name, \"/bin/sh\") != 0) ", " && (strcmp(name, \"sudo\") != 0) ", " && (strcmp(name, \"/bin/sudo\") != 0) ", " && (strcmp(name, \"/usr/bin/sudo\") != 0)", " && (strcmp(name, \"gksudo\") != 0) ", " && (strcmp(name, \"/bin/gksudo\") != 0) ", " && (strcmp(name, \"/usr/bin/gksudo\") != 0) ", " && (strcmp(name, \"kdesu\") != 0) ", " && (strcmp(name, \"/bin/kdesu\") != 0) ", " && (strcmp(name, \"/usr/bin/kdesu\") != 0) ", " )", " {", " printf(\"Operation not permitted\\n\");", " kill(getpid(), SIGKILL);", " exit(1);", " }", "}", "", "#endif /* HARDENING */", "", "#if !TRACEABLE", "", "#define _LINUX_SOURCE_COMPAT", "#include <sys/ptrace.h>", "#include <sys/types.h>", "#include <sys/wait.h>", "#include <fcntl.h>", "#include <signal.h>", "#include <stdio.h>", "#include <unistd.h>", "", "#if !defined(PT_ATTACHEXC) /* New replacement for PT_ATTACH */", " #if !defined(PTRACE_ATTACH) && defined(PT_ATTACH)", " #define PT_ATTACHEXC PT_ATTACH", " #elif defined(PTRACE_ATTACH)", " #define PT_ATTACHEXC PTRACE_ATTACH", " #endif", "#endif", "", "void untraceable(char * argv0)", "{", " char proc[80];", " int pid, mine;", "", " switch(pid = fork()) {", " case 0:", " pid = getppid();", " /* For problematic SunOS ptrace */", "#if defined(__FreeBSD__)", " sprintf(proc, \"/proc/%d/mem\", (int)pid);", "#else", " sprintf(proc, \"/proc/%d/as\", (int)pid);", "#endif", " close(0);", " mine = !open(proc, O_RDWR|O_EXCL);", " if (!mine && errno != EBUSY)", " mine = !ptrace(PT_ATTACHEXC, pid, 0, 0);", " if (mine) {", " kill(pid, SIGCONT);", " } else {", /*" fprintf(stderr, \"%s is being traced!\\n\", argv0);",*/ " perror(argv0);", " kill(pid, SIGKILL);", " }", " _exit(mine);", " case -1:", " break;", " default:", " if (pid == waitpid(pid, 0, 0))", " return;", " }", " perror(argv0);", " _exit(1);", "}", "#endif /* !TRACEABLE */", "", "char * xsh(int argc, char ** argv)", "{", " char * scrpt;", " int ret, i, j;", " char ** varg;", " char * me = argv[0];", " if (me == NULL) { me = getenv(\"_\"); }", " if (me == 0) { fprintf(stderr, \"E: neither argv[0] nor $_ works.\"); exit(1); }", "", " ret = chkenv(argc);", " stte_0();", " key(pswd, pswd_z);", " arc4(msg1, msg1_z);", " arc4(date, date_z);", " if (date[0] && (atoll(date)<time(NULL)))", " return msg1;", " arc4(shll, shll_z);", " arc4(inlo, inlo_z);", " arc4(xecc, xecc_z);", " arc4(lsto, lsto_z);", " arc4(tst1, tst1_z);", " key(tst1, tst1_z);", " arc4(chk1, chk1_z);", " if ((chk1_z != tst1_z) || memcmp(tst1, chk1, tst1_z))", " return tst1;", " arc4(msg2, msg2_z);", " if (ret < 0)", " return msg2;", " varg = (char **)calloc(argc + 10, sizeof(char *));", " if (!varg)", " return 0;", " if (ret) {", " arc4(rlax, rlax_z);", " if (!rlax[0] && key_with_file(shll))", " return shll;", " arc4(opts, opts_z);", "#if HARDENING", " arc4_hardrun(text, text_z);", " exit(0);", " /* Seccomp Sandboxing - Start */", " seccomp_hardening();", "#endif", " arc4(text, text_z);", " arc4(tst2, tst2_z);", " key(tst2, tst2_z);", " arc4(chk2, chk2_z);", " if ((chk2_z != tst2_z) || memcmp(tst2, chk2, tst2_z))", " return tst2;", " /* Prepend hide_z spaces to script text to hide it. */", " scrpt = malloc(hide_z + text_z);", " if (!scrpt)", " return 0;", " memset(scrpt, (int) ' ', hide_z);", " memcpy(&scrpt[hide_z], text, text_z);", " } else { /* Reexecute */", " if (*xecc) {", " scrpt = malloc(512);", " if (!scrpt)", " return 0;", " sprintf(scrpt, xecc, me);", " } else {", " scrpt = me;", " }", " }", " j = 0;", "#if BUSYBOXON", " varg[j++] = \"busybox\";", " varg[j++] = \"sh\";", "#else", " varg[j++] = argv[0]; /* My own name at execution */", "#endif", " if (ret && *opts)", " varg[j++] = opts; /* Options on 1st line of code */", " if (*inlo)", " varg[j++] = inlo; /* Option introducing inline code */", " varg[j++] = scrpt; /* The script itself */", " if (*lsto)", " varg[j++] = lsto; /* Option meaning last option */", " i = (ret > 1) ? ret : 0; /* Args numbering correction */", " while (i < argc)", " varg[j++] = argv[i++]; /* Main run-time arguments */", " varg[j] = 0; /* NULL terminated array */", "#if DEBUGEXEC", " debugexec(shll, j, varg);", "#endif", " execvp(shll, varg);", " return shll;", "}", "", "int main(int argc, char ** argv)", "{", "#if SETUID", " setuid(0);", "#endif", "#if DEBUGEXEC", " debugexec(\"main\", argc, argv);", "#endif", "#if HARDENING", " hardening();", "#endif", "#if !TRACEABLE", " untraceable(argv[0]);", "#endif", " argv[1] = xsh(argc, argv);", " fprintf(stderr, \"%s%s%s: %s\\n\", argv[0],", " errno ? \": \" : \"\",", " errno ? strerror(errno) : \"\",", " argv[1] ? argv[1] : \"<null>\"", " );", " return 1;", "}", 0}; static int parse_an_arg(int argc, char * argv[]) { extern char * optarg; const char * opts = "e:m:f:i:x:l:o:rvDSUHCABh"; struct tm tmp[1]; time_t expdate; int cnt, l; char ctrl; switch (getopt(argc, argv, opts)) { case 'e': memset(tmp, 0, sizeof(tmp)); cnt = sscanf(optarg, "%2d/%2d/%4d%c", &tmp->tm_mday, &tmp->tm_mon, &tmp->tm_year, &ctrl); if (cnt == 3) { tmp->tm_mon--; tmp->tm_year -= 1900; expdate = mktime(tmp); } if (cnt != 3 || expdate <= 0) { fprintf(stderr, "%s parse(-e %s): Not a valid value\n", my_name, optarg); return -1; } sprintf(date, "%lld", (long long)expdate); if (verbose) fprintf(stderr, "%s -e %s", my_name, ctime(&expdate)); expdate = atoll(date); if (verbose) fprintf(stderr, "%s -e %s", my_name, ctime(&expdate)); break; case 'm': mail = optarg; break; case 'f': if (file) { fprintf(stderr, "%s parse(-f): Specified more than once\n", my_name); return -1; } file = optarg; break; case 'i': inlo = optarg; break; case 'x': xecc = optarg; break; case 'l': lsto = optarg; break; case 'o': file2 = optarg; break; case 'r': rlax[0]++; break; case 'v': verbose++; break; case 'S': SETUID_flag = 1; break; case 'D': DEBUGEXEC_flag = 1; break; case 'U': TRACEABLE_flag = 0; break; case 'H': HARDENING_flag = 1; break; case 'C': fprintf(stderr, "%s %s, %s\n", my_name, version, subject); fprintf(stderr, "%s %s %s %s %s\n", my_name, cpright, provider.f, provider.s, provider.e); fprintf(stderr, "%s ", my_name); for (l = 0; copying[l]; l++) fprintf(stderr, "%s\n", copying[l]); fprintf(stderr, " %s %s %s\n\n", provider.f, provider.s, provider.e); exit(0); break; case 'A': fprintf(stderr, "%s %s, %s\n", my_name, version, subject); fprintf(stderr, "%s %s %s %s %s\n", my_name, cpright, provider.f, provider.s, provider.e); fprintf(stderr, "%s ", my_name); for (l = 0; abstract[l]; l++) fprintf(stderr, "%s\n", abstract[l]); exit(0); break; case 'h': fprintf(stderr, "%s %s, %s\n", my_name, version, subject); fprintf(stderr, "%s %s %s %s %s\n", my_name, cpright, provider.f, provider.s, provider.e); fprintf(stderr, "%s %s\n", my_name, usage); for (l = 0; help[l]; l++) fprintf(stderr, "%s\n", help[l]); exit(0); break; case -1: if (!file) { fprintf(stderr, "%s parse(-f): No source file specified\n", my_name); file = ""; return -1; } return 0; case 'B': BUSYBOXON_flag = 1; break; case ':': fprintf(stderr, "%s parse: Missing parameter\n", my_name); return -1; case '?': fprintf(stderr, "%s parse: Unknown option\n", my_name); return -1; default: fprintf(stderr, "%s parse: Unknown return\n", my_name); return -1; } return 1; } static void parse_args(int argc, char * argv[]) { int err = 0; int ret; #if 0 my_name = strrchr(argv[0], '/'); if (my_name) my_name++; else my_name = argv[0]; #endif do { ret = parse_an_arg(argc, argv); if (ret == -1) err++; } while (ret); if (err) { fprintf(stderr, "\n%s %s\n\n", my_name, usage); exit(1); } } /* 'Alleged RC4' */ static unsigned char stte[256], indx, jndx, kndx; /* * Reset arc4 stte. */ void stte_0(void) { indx = jndx = kndx = 0; do { stte[indx] = indx; } while (++indx); } /* * Set key. Can be used more than once. */ void key(void * str, int len) { unsigned char tmp, * ptr = (unsigned char *)str; while (len > 0) { do { tmp = stte[indx]; kndx += tmp; kndx += ptr[(int)indx % len]; stte[indx] = stte[kndx]; stte[kndx] = tmp; } while (++indx); ptr += 256; len -= 256; } } /* * Crypt data. */ void arc4(void * str, int len) { unsigned char tmp, * ptr = (unsigned char *)str; while (len > 0) { indx++; tmp = stte[indx]; jndx += tmp; stte[indx] = stte[jndx]; stte[jndx] = tmp; tmp += stte[indx]; *ptr ^= stte[tmp]; ptr++; len--; } } /* End of ARC4 */ /* * Key with file invariants. */ int key_with_file(char * file) { struct stat statf[1]; struct stat control[1]; if (stat(file, statf) < 0) return -1; /* Turn on stable fields */ memset(control, 0, sizeof(control)); control->st_ino = statf->st_ino; control->st_dev = statf->st_dev; control->st_rdev = statf->st_rdev; control->st_uid = statf->st_uid; control->st_gid = statf->st_gid; control->st_size = statf->st_size; control->st_mtime = statf->st_mtime; control->st_ctime = statf->st_ctime; key(control, sizeof(control)); return 0; } /* * NVI stands for Shells that complaint "Not Valid Identifier" on * environment variables with characters as "=|#:*?$ ". */ struct { char * shll; char * inlo; char * lsto; char * xecc; } shellsDB[] = { { "perl", "-e", "--", "exec('%s',@ARGV);" }, { "rc", "-c", "", "builtin exec %s $*" }, { "sh", "-c", "", "exec '%s' \"$@\"" }, /* IRIX_nvi */ { "dash", "-c", "", "exec '%s' \"$@\"" }, { "bash", "-c", "", "exec '%s' \"$@\"" }, { "zsh", "-c", "", "exec '%s' \"$@\"" }, { "bsh", "-c", "", "exec '%s' \"$@\"" }, /* AIX_nvi */ { "Rsh", "-c", "", "exec '%s' \"$@\"" }, /* AIX_nvi */ { "ksh", "-c", "", "exec '%s' \"$@\"" }, /* OK on Solaris, AIX and Linux (THX <bryan.hogan@dstintl.com>) */ { "tsh", "-c", "--", "exec '%s' \"$@\"" }, /* AIX */ { "ash", "-c", "--", "exec '%s' \"$@\"" }, /* Linux */ { "csh", "-c", "-b", "exec '%s' $argv" }, /* AIX: No file for $0 */ { "tcsh", "-c", "-b", "exec '%s' $argv" }, { NULL, NULL, NULL, NULL }, }; int eval_shell(char * text) { int i; char * ptr; ptr = strchr(text, (int)'\n'); if (!ptr) i = strlen(text); else i = ptr - text; ptr = malloc(i + 1); shll = malloc(i + 1); opts = malloc(i + 1); if (!ptr || !shll || !opts) return -1; strncpy(ptr, text, i); ptr[i] = '\0'; *opts = '\0'; i = sscanf(ptr, " #!%s%s %c", shll, opts, opts); if (i < 1 || i > 2) { fprintf(stderr, "%s: invalid first line in script: %s\n", my_name, ptr); return -1; } free(ptr); shll = realloc(shll, strlen(shll) + 1); ptr = strrchr(shll, (int)'/'); if (!ptr) { fprintf(stderr, "%s: invalid shll\n", my_name); return -1; } if (*ptr == '/') ptr++; if (verbose) fprintf(stderr, "%s shll=%s\n", my_name, ptr); for(i=0; shellsDB[i].shll; i++) { if(!strcmp(ptr, shellsDB[i].shll)) { if (!inlo) inlo = strdup(shellsDB[i].inlo); if (!xecc) xecc = strdup(shellsDB[i].xecc); if (!lsto) lsto = strdup(shellsDB[i].lsto); } } if (!inlo || !xecc || !lsto) { fprintf(stderr, "%s Unknown shell (%s): specify [-i][-x][-l]\n", my_name, ptr); return -1; } if (verbose) fprintf(stderr, "%s [-i]=%s\n", my_name, inlo); if (verbose) fprintf(stderr, "%s [-x]=%s\n", my_name, xecc); if (verbose) fprintf(stderr, "%s [-l]=%s\n", my_name, lsto); opts = realloc(opts, strlen(opts) + 1); if (*opts && !strcmp(opts, lsto)) { fprintf(stderr, "%s opts=%s : Is equal to [-l]. Removing opts\n", my_name, opts); *opts = '\0'; } else if (!strcmp(opts, "-")) { fprintf(stderr, "%s opts=%s : No real one. Removing opts\n", my_name, opts); *opts = '\0'; } if (verbose) fprintf(stderr, "%s opts=%s\n", my_name, opts); return 0; } char * read_script(char * file) { FILE * i; char * text; int cnt, l; text = malloc(SIZE); if (!text) return NULL; i = fopen(file, "r"); if (!i) return NULL; for (l = 0;;) { text = realloc(text, l + SIZE); if (!text) return NULL; cnt = fread(&text[l], 1, SIZE, i); if (!cnt) break; l += cnt; } fclose(i); text = realloc(text, l + 1); if (!text) return NULL; text[l] = '\0'; /* Check current System ARG_MAX limit. */ if (l > 0.80 * (cnt = sysconf(_SC_ARG_MAX))) { fprintf(stderr, "%s: WARNING!!\n" " Scripts of length near to (or higher than) the current System limit on\n" " \"maximum size of arguments to EXEC\", could comprise its binary execution.\n" " In the current System the call sysconf(_SC_ARG_MAX) returns %d bytes\n" " and your script \"%s\" is %d bytes length.\n", my_name, cnt, file, l); } return text; } unsigned rand_mod(unsigned mod) { /* Without skew */ unsigned rnd, top = RAND_MAX; top -= top % mod; while (top <= (rnd = rand())) continue; /* Using high-order bits. */ rnd = 1.0*mod*rnd/(1.0+top); return rnd; } char rand_chr(void) { return (char)rand_mod(1<<(sizeof(char)<<3)); } int noise(char * ptr, unsigned min, unsigned xtra, int str) { if (xtra) xtra = rand_mod(xtra); xtra += min; for (min = 0; min < xtra; min++, ptr++) do *ptr = rand_chr(); while (str && !isalnum((int)*ptr)); if (str) *ptr = '\0'; return xtra; } static int offset; void prnt_bytes(FILE * o, char * ptr, int m, int l, int n) { int i; l += m; n += l; for (i = 0; i < n; i++) { if ((i & 0xf) == 0) fprintf(o, "\n\t\""); fprintf(o, "\\%03o", (unsigned char)((i>=m) && (i<l) ? ptr[i-m] : rand_chr())); if ((i & 0xf) == 0xf) fprintf(o, "\""); } if ((i & 0xf) != 0) fprintf(o, "\""); offset += n; } void prnt_array(FILE * o, void * ptr, char * name, int l, char * cast) { int m = rand_mod(1+l/4); /* Random amount of random pre padding (offset) */ int n = rand_mod(1+l/4); /* Random amount of random post padding (tail) */ int a = (offset+m)%l; if (cast && a) m += l - a; /* Type alignement. */ fprintf(o, "\n"); fprintf(o, "#define %s_z %d", name, l); fprintf(o, "\n"); fprintf(o, "#define %s (%s(&data[%d]))", name, cast?cast:"", offset+m); prnt_bytes(o, ptr, m, l, n); } void dump_array(FILE * o, void * ptr, char * name, int l, char * cast) { arc4(ptr, l); prnt_array(o, ptr, name, l, cast); } int write_C(char * file, char * argv[]) { char pswd[256]; int pswd_z = sizeof(pswd); char* msg1 = strdup("has expired!\n"); int msg1_z = strlen(msg1) + 1; int date_z = strlen(date) + 1; char* kwsh = strdup(shll); int shll_z = strlen(shll) + 1; int inlo_z = strlen(inlo) + 1; int xecc_z = strlen(xecc) + 1; int lsto_z = strlen(lsto) + 1; char* tst1 = strdup("location has changed!"); int tst1_z = strlen(tst1) + 1; char* chk1 = strdup(tst1); int chk1_z = tst1_z; char* msg2 = strdup("abnormal behavior!"); int msg2_z = strlen(msg2) + 1; int rlax_z = sizeof(rlax); int opts_z = strlen(opts) + 1; int text_z = strlen(text) + 1; char* tst2 = strdup("shell has changed!"); int tst2_z = strlen(tst2) + 1; char* chk2 = strdup(tst2); int chk2_z = tst2_z; char* name = strdup(file); FILE * o; int indx; int numd = 0; int done = 0; /* Encrypt */ srand((unsigned)time(NULL)^(unsigned)getpid()); pswd_z = noise(pswd, pswd_z, 0, 0); numd++; stte_0(); key(pswd, pswd_z); msg1_z += strlen(mail); msg1 = strcat(realloc(msg1, msg1_z), mail); arc4(msg1, msg1_z); numd++; arc4(date, date_z); numd++; arc4(shll, shll_z); numd++; arc4(inlo, inlo_z); numd++; arc4(xecc, xecc_z); numd++; arc4(lsto, lsto_z); numd++; arc4(tst1, tst1_z); numd++; key(chk1, chk1_z); arc4(chk1, chk1_z); numd++; arc4(msg2, msg2_z); numd++; indx = !rlax[0]; arc4(rlax, rlax_z); numd++; if (indx && key_with_file(kwsh)) { fprintf(stderr, "%s: invalid file name: %s ", my_name, kwsh); perror(""); exit(1); } arc4(opts, opts_z); numd++; arc4(text, text_z); numd++; arc4(tst2, tst2_z); numd++; key(chk2, chk2_z); arc4(chk2, chk2_z); numd++; /* Output */ name = strcat(realloc(name, strlen(name)+5), ".x.c"); o = fopen(name, "w"); if (!o) { fprintf(stderr, "%s: creating output file: %s ", my_name, name); perror(""); exit(1); } fprintf(o, "#if 0\n"); fprintf(o, "\t%s %s, %s\n", my_name, version, subject); fprintf(o, "\t%s %s %s %s\n\n\t", cpright, provider.f, provider.s, provider.e); for (indx = 0; argv[indx]; indx++) fprintf(o, "%s ", argv[indx]); fprintf(o, "\n#endif\n\n"); fprintf(o, "static char data [] = "); do { done = 0; indx = rand_mod(15); do { switch (indx) { case 0: if (pswd_z>=0) {prnt_array(o, pswd, "pswd", pswd_z, 0); pswd_z=done=-1; break;} case 1: if (msg1_z>=0) {prnt_array(o, msg1, "msg1", msg1_z, 0); msg1_z=done=-1; break;} case 2: if (date_z>=0) {prnt_array(o, date, "date", date_z, 0); date_z=done=-1; break;} case 3: if (shll_z>=0) {prnt_array(o, shll, "shll", shll_z, 0); shll_z=done=-1; break;} case 4: if (inlo_z>=0) {prnt_array(o, inlo, "inlo", inlo_z, 0); inlo_z=done=-1; break;} case 5: if (xecc_z>=0) {prnt_array(o, xecc, "xecc", xecc_z, 0); xecc_z=done=-1; break;} case 6: if (lsto_z>=0) {prnt_array(o, lsto, "lsto", lsto_z, 0); lsto_z=done=-1; break;} case 7: if (tst1_z>=0) {prnt_array(o, tst1, "tst1", tst1_z, 0); tst1_z=done=-1; break;} case 8: if (chk1_z>=0) {prnt_array(o, chk1, "chk1", chk1_z, 0); chk1_z=done=-1; break;} case 9: if (msg2_z>=0) {prnt_array(o, msg2, "msg2", msg2_z, 0); msg2_z=done=-1; break;} case 10: if (rlax_z>=0) {prnt_array(o, rlax, "rlax", rlax_z, 0); rlax_z=done=-1; break;} case 11: if (opts_z>=0) {prnt_array(o, opts, "opts", opts_z, 0); opts_z=done=-1; break;} case 12: if (text_z>=0) {prnt_array(o, text, "text", text_z, 0); text_z=done=-1; break;} case 13: if (tst2_z>=0) {prnt_array(o, tst2, "tst2", tst2_z, 0); tst2_z=done=-1; break;} case 14: if (chk2_z>=0) {prnt_array(o, chk2, "chk2", chk2_z, 0); chk2_z=done=-1; break;} } indx = 0; } while (!done); } while (numd+=done); fprintf(o, "/* End of data[] */;\n"); fprintf(o, "#define %s_z %d\n", "hide", 1<<12); fprintf(o, SETUID_line, SETUID_flag); fprintf(o, DEBUGEXEC_line, DEBUGEXEC_flag); fprintf(o, TRACEABLE_line, TRACEABLE_flag); fprintf(o, HARDENING_line, HARDENING_flag); fprintf(o, BUSYBOXON_line, BUSYBOXON_flag); for (indx = 0; RTC[indx]; indx++) fprintf(o, "%s\n", RTC[indx]); fflush(o); fclose(o); return 0; } int make(void) { char * cc, * cflags, * ldflags; char cmd[SIZE]; cc = getenv("CC"); if (!cc) cc = "cc"; cflags = getenv("CFLAGS"); if (!cflags) cflags = ""; ldflags = getenv("LDFLAGS"); if (!ldflags) ldflags = ""; if(!file2){ file2=(char*)realloc(file2,strlen(file)+3); strcpy(file2,file); file2=strcat(file2,".x"); } sprintf(cmd, "%s %s %s %s.x.c -o %s", cc, cflags, ldflags, file, file2); if (verbose) fprintf(stderr, "%s: %s\n", my_name, cmd); if (system(cmd)) return -1; sprintf(cmd, "strip %s", file2); if (verbose) fprintf(stderr, "%s: %s\n", my_name, cmd); if (system(cmd)) fprintf(stderr, "%s: never mind\n", my_name); sprintf(cmd, "chmod ug=rwx,o=rx %s", file2); if (verbose) fprintf(stderr, "%s: %s\n", my_name, cmd); if (system(cmd)) fprintf(stderr, "%s: remove read permission\n", my_name); return 0; } void do_all(int argc, char * argv[]) { parse_args(argc, argv); text = read_script(file); if (!text) return; if (eval_shell(text)) return; if (write_C(file, argv)) return; if (make()) return; exit(0); } int main(int argc, char * argv[]) { putenv("LANG="); do_all(argc, argv); /* Return on error */ perror(argv[0]); exit(1); return 1; }
{'repo_name': 'neurobin/shc', 'stars': '899', 'repo_language': 'C', 'file_name': 'ttest.sh', 'mime_type': 'text/x-shellscript', 'hash': 4822697023351527575, 'source_dataset': 'data'}
/** * ScriptDev2 is an extension for mangos providing enhanced features for * area triggers, creatures, game objects, instances, items, and spells beyond * the default database scripting in mangos. * * Copyright (C) 2006-2013 ScriptDev2 <http://www.scriptdev2.com/> * * This program 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; either version 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * World of Warcraft, and all World of Warcraft or Warcraft art, images, * and lore are copyrighted by Blizzard Entertainment, Inc. */ /** * ScriptData * SDName: Durotar * SD%Complete: 100 * SDComment: Quest support: 5441. * SDCategory: Durotar * EndScriptData */ /** * ContentData * npc_lazy_peon * EndContentData */ #include "precompiled.h" /*###### ## npc_lazy_peon ######*/ enum { SAY_PEON_AWAKE_1 = -1000795, SAY_PEON_AWAKE_2 = -1000796, SPELL_PEON_SLEEP = 17743, SPELL_AWAKEN_PEON = 19938, NPC_SLEEPING_PEON = 10556, GO_LUMBERPILE = 175784, }; struct MANGOS_DLL_DECL npc_lazy_peonAI : public ScriptedAI { npc_lazy_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); m_uiStopSleepingTimer = urand(30000, 120000); // Set on spawn to a potential small timer, to get nice results for initial case } uint32 m_uiResetSleepTimer; // Time, until the npc stops harvesting lumber uint32 m_uiStopSleepingTimer; // Time, until the npcs (re)starts working on its own void Reset() override { m_uiResetSleepTimer = 0; m_uiStopSleepingTimer = urand(90000, 120000); // Sleeping aura has only 2min duration } // Can also be self invoked for random working void StartLumbering(Unit* pInvoker) { m_uiStopSleepingTimer = 0; if (GameObject* pLumber = GetClosestGameObjectWithEntry(m_creature, GO_LUMBERPILE, 15.0f)) { m_creature->RemoveAurasDueToSpell(SPELL_PEON_SLEEP); float fX, fY, fZ; m_creature->SetWalk(false); pLumber->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); if (pInvoker->GetTypeId() == TYPEID_PLAYER) { DoScriptText(SAY_PEON_AWAKE_1, m_creature); ((Player*)pInvoker)->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ); } else { m_creature->GetMotionMaster()->MovePoint(2, fX, fY, fZ); } } else { script_error_log("No GameObject of entry %u was found in range or something really bad happened.", GO_LUMBERPILE); } } void MovementInform(uint32 uiMotionType, uint32 uiPointId) override { if (uiMotionType != POINT_MOTION_TYPE || !uiPointId) { return; } m_creature->HandleEmote(EMOTE_STATE_WORK_CHOPWOOD); // TODO - random bevahior for self-invoked awakening guesswork m_uiResetSleepTimer = uiPointId == 1 ? 80000 : urand(30000, 60000); } void UpdateAI(const uint32 uiDiff) override { if (m_uiResetSleepTimer) { if (m_uiResetSleepTimer <= uiDiff) { DoScriptText(SAY_PEON_AWAKE_2, m_creature); m_creature->HandleEmote(EMOTE_STATE_NONE); EnterEvadeMode(); m_uiResetSleepTimer = 0; } else { m_uiResetSleepTimer -= uiDiff; } } if (m_uiStopSleepingTimer) { if (m_uiStopSleepingTimer <= uiDiff) { StartLumbering(m_creature); } else { m_uiStopSleepingTimer -= uiDiff; } } } }; CreatureAI* GetAI_npc_lazy_peon(Creature* pCreature) { return new npc_lazy_peonAI(pCreature); } bool EffectDummyCreature_lazy_peon_awake(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget, ObjectGuid /*originalCasterGuid*/) { // always check spellid and effectindex if (uiSpellId == SPELL_AWAKEN_PEON && uiEffIndex == EFFECT_INDEX_0) { if (!pCreatureTarget->HasAura(SPELL_PEON_SLEEP) || pCaster->GetTypeId() != TYPEID_PLAYER || pCreatureTarget->GetEntry() != NPC_SLEEPING_PEON) { return true; } if (npc_lazy_peonAI* pPeonAI = dynamic_cast<npc_lazy_peonAI*>(pCreatureTarget->AI())) { pPeonAI->StartLumbering(pCaster); } // always return true when we are handling this spell and effect return true; } return false; } void AddSC_durotar() { Script* pNewScript; pNewScript = new Script; pNewScript->Name = "npc_lazy_peon"; pNewScript->GetAI = &GetAI_npc_lazy_peon; pNewScript->pEffectDummyNPC = &EffectDummyCreature_lazy_peon_awake; pNewScript->RegisterSelf(); }
{'repo_name': 'mangosArchives/serverZero_Rel19', 'stars': '113', 'repo_language': 'C++', 'file_name': 'Vector2int16.h', 'mime_type': 'text/x-c++', 'hash': -4862835567865875272, 'source_dataset': 'data'}
/**************************************************************************** ** ** Copyright (c) 2012 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator ** ** ** GNU Free Documentation License ** ** Alternatively, this file may be used under the terms of the GNU Free ** Documentation License version 1.3 as published by the Free Software ** Foundation and appearing in the file included in the packaging of this ** file. ** ** ****************************************************************************/ // ********************************************************************** // NOTE: the sections are not ordered by their logical order to avoid // reshuffling the file each time the index order changes (i.e., often). // Run the fixnavi.pl script to adjust the links to the index order. // ********************************************************************** /*! \contentspage index.html \previouspage creator-using-qt-quick-designer.html \page quick-components.html \nextpage quick-buttons.html \title Creating Components A \l{glossary-component}{component} provides a way of defining a new type that you can re-use in other QML files. A component is like a black box; it interacts with the outside world through properties, signals, and slots, and is generally defined in its own QML file. You can import components to screens and applications. You can use the following QML elements to create components: \list \o \l{http://qt-project.org/doc/qt-4.8/qml-borderimage.html} {Border Image} uses an image as a border or background. \o \l{http://qt-project.org/doc/qt-4.8/qml-image.html}{Image} adds a bitmap to the scene. You can stretch and tile images. \o \l{http://qt-project.org/doc/qt-4.8/qml-item.html}{Item} is the most basic of all visual items in QML. Even though it has no visual appearance, it defines all the properties that are common across visual items, such as the x and y position, width and height, anchoring, and key handling. \o \l{http://qt-project.org/doc/qt-4.8/qml-rectangle.html}{Rectangle} adds a rectangle that is painted with a solid fill color and an optional border. You can also use the radius property to create rounded rectangles. \o \l{http://qt-project.org/doc/qt-4.8/qml-text.html}{Text} adds formatted read-only text. \o \l{http://qt-project.org/doc/qt-4.8/qml-textedit.html}{Text Edit} adds a single line of editable formatted text that can be validated. \o \l{http://qt-project.org/doc/qt-4.8/qml-textinput.html}{Text Input} adds a single line of editable plain text that can be validated. \o \l{http://qt-project.org/doc/qt-4.8/qml-webview.html}{Web View} adds web content to a canvas. \endlist QML elements allow you to write cross-platform applications with custom look and feel. You can also use ready-made Qt Quick Components that enable you to create applications with a native look and feel for a particular target platform. You can install the components as part of \QSDK. When you use the \QC project wizard to create Qt Quick applications, you can select which component set to use in your application. Even if you use the Qt Quick Components, you can still write cross-platform applications, by using different sets of QML files for each platform. \section1 Creating Components in Qt Quick Designer \list 1 \o Select \gui {File > New File or Project > Files and Classes > QML > Choose} to create a new .qml file. \note Components are listed in the \gui {QML Components} section of the \gui Library pane only if the filename begins with a capital letter. \o Click \gui Design to open the .qml file in \QMLD. \o Drag and drop an item from the \gui Library pane to the editor. \o Edit item properties in the \gui Properties pane. The available properties depend on the item. \endlist \if defined(qcmanual) The following sections contain examples of how to create some common components: \list \o \l{Creating Buttons} \o \l{Creating Scalable Buttons and Borders} \endlist \section1 Moving Within Components Components can consist of several other components. To view the component hierarchy as a bread crumb path when you edit a component on the canvas, select \gui {Go into Component} or press \key F2. Click the component names in the path to navigate to them. You can easily navigate back to the top level when you are done editing the component. \image qmldesigner-breadcrumbs.png "Go into Component command" \endif */
{'repo_name': 'forio/julia-studio', 'stars': '216', 'repo_language': 'C++', 'file_name': 'to-title-case.html', 'mime_type': 'text/html', 'hash': -2273805421245786965, '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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>name.abuchen.portfolio</groupId> <artifactId>portfolio-app</artifactId> <version>0.48.2-SNAPSHOT</version> <relativePath>../portfolio-app</relativePath> </parent> <artifactId>name.abuchen.portfolio.feature</artifactId> <packaging>eclipse-feature</packaging> <properties> <sonar.skip>true</sonar.skip> </properties> <build> <plugins> <plugin> <artifactId>maven-enforcer-plugin</artifactId> <executions> <execution> <id>enforce-versions</id> <phase>none</phase> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jarsigner-plugin</artifactId> </plugin> </plugins> </build> </project>
{'repo_name': 'buchen/portfolio', 'stars': '823', 'repo_language': 'Java', 'file_name': 'x86-distro.product', 'mime_type': 'text/xml', 'hash': -8160054697661716, 'source_dataset': 'data'}
// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2002 * Sysgo Real-Time Solutions, GmbH <www.elinos.com> * Marius Groeger <mgroeger@sysgo.de> * * (C) Copyright 2002 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> */ /* * CPU specific code */ #include <common.h> #include <command.h> #include <cpu_func.h> #include <irq_func.h> #include <asm/cache.h> #include <asm/system.h> static void cache_flush(void); int cleanup_before_linux (void) { /* * this function is called just before we call linux * it prepares the processor for linux * * we turn off caches etc ... */ disable_interrupts(); /* turn off I/D-cache */ icache_disable(); dcache_disable(); l2_cache_disable(); /* flush I/D-cache */ cache_flush(); return 0; } /* flush I/D-cache */ static void cache_flush (void) { #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) unsigned long i = 0; asm ("mcr p15, 0, %0, c7, c7, 0": :"r" (i)); #endif }
{'repo_name': 'u-boot/u-boot', 'stars': '1164', 'repo_language': 'C', 'file_name': 'Makefile', 'mime_type': 'text/plain', 'hash': -3276747543334361702, 'source_dataset': 'data'}
# # Copyright (C) 2020 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas 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 Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. class AddRootAccountIdToSubmissions < ActiveRecord::Migration[5.2] include MigrationHelpers::AddColumnAndFk tag :predeploy def up add_column_and_fk :submissions, :root_account_id, :accounts, if_not_exists: true end def down remove_column :submissions, :root_account_id end end
{'repo_name': 'instructure/canvas-lms', 'stars': '3425', 'repo_language': 'Ruby', 'file_name': 'entry_point.sh', 'mime_type': 'text/x-shellscript', 'hash': 4629609512503576217, 'source_dataset': 'data'}
/* $Id$ */ %#define PUBHASHSIZE 20 %#define OKAUTHTOKSIZE 20 typedef opaque xpub3_hash_t[PUBHASHSIZE]; typedef opaque okauthtok_t[OKAUTHTOKSIZE]; enum oksig_t { OK_SIG_NONE = 0, OK_SIG_HARDKILL = 1, OK_SIG_SOFTKILL = 2, OK_SIG_KILL = 3, OK_SIG_ABORT = 4 }; enum xpub_version_t { XPUB_V1 = 1, XPUB_V2 = 2, XPUB_V3 = 3 }; struct ok_killsig_t { oksig_t sig; okauthtok_t authtok; }; typedef string xpub_var_t <>; typedef string xpub_str_t <>; typedef string xpub_key_t <>; typedef string xpub_fn_t <>; typedef unsigned hyper ok_xtime_t; struct xpub3_identifier_list_t { xpub_str_t params<>; xpub_str_t opt_params<>; }; struct xpub3_fstat_t { xpub_fn_t fn; u_int32_t ctime; xpub3_hash_t hash; }; %struct xpub3_expr_t; %struct xpub3_zone_t; struct xpub3_zstr_t { opaque s<>; opaque zs<>; int clev; }; enum xpub3_expr_typ_t { XPUB3_EXPR_NULL, XPUB3_EXPR_NOT, XPUB3_EXPR_CALL, XPUB3_EXPR_RELATION, XPUB3_EXPR_DICT, XPUB3_EXPR_EQ, XPUB3_EXPR_DICTREF, XPUB3_EXPR_VECREF, XPUB3_EXPR_REF, XPUB3_EXPR_SHELL_STR, XPUB3_EXPR_STR, XPUB3_EXPR_INT, XPUB3_EXPR_UINT, XPUB3_EXPR_DOUBLE, XPUB3_EXPR_LIST, XPUB3_EXPR_REGEX, XPUB3_EXPR_MATHOP, XPUB3_EXPR_ASSIGNMENT, XPUB3_EXPR_BOOL, XPUB3_EXPR_PUBNULL, XPUB3_EXPR_LAMBDA, XPUB3_EXPR_HEREDOC, XPUB3_EXPR_SCOPED_REF }; enum xpub3_relop_t { XPUB3_REL_LT, XPUB3_REL_GT, XPUB3_REL_LTE, XPUB3_REL_GTE }; enum xpub3_mathop_opcode_t { XPUB3_MATHOP_NONE = 0, XPUB3_MATHOP_ADD = 1, XPUB3_MATHOP_SUBTRACT = 2, XPUB3_MATHOP_MULT = 4, XPUB3_MATHOP_MOD = 5, XPUB3_MATHOP_AND = 6, XPUB3_MATHOP_OR = 7, XPUB3_MATHOP_DIV = 8 }; struct xpub3_mathop_t { int lineno; xpub3_mathop_opcode_t opcode; xpub3_expr_t *o1; xpub3_expr_t *o2; }; struct xpub3_not_t { int lineno; xpub3_expr_t *e; }; struct xpub3_expr_list_t { int lineno; xpub3_expr_t list<>; }; struct xpub3_call_t { int lineno; xpub3_expr_t *fn; xpub3_expr_list_t args; bool blocking; }; struct xpub3_eq_t { int lineno; xpub3_expr_t *o1; xpub3_expr_t *o2; bool pos; }; struct xpub3_relation_t { int lineno; xpub3_relop_t relop; xpub3_expr_t *left; xpub3_expr_t *right; }; struct xpub3_dictref_t { int lineno; xpub3_expr_t *dict; string key<>; }; struct xpub3_vecref_t { int lineno; xpub3_expr_t *vec; xpub3_expr_t *index; }; struct xpub3_ref_t { int lineno; string key<>; }; enum xpub3_ref_scope_t { XPUB3_REF_SCOPE_GLOBALS = 1, XPUB3_REF_SCOPE_UNIVERSALS = 2 }; struct xpub3_scoped_ref_t { int lineno; string key<>; xpub3_ref_scope_t scope; }; struct xpub3_shell_str_t { int lineno; xpub3_expr_list_t elements; }; struct xpub3_str_t { string val<>; }; struct xpub3_int_t { hyper val; }; struct xpub3_bool_t { int i; }; struct xpub3_uint_t { unsigned hyper val; }; struct xpub3_double_t { string val<>; }; struct xpub3_binding_t { xpub_key_t key; xpub3_expr_t *val; }; typedef xpub3_binding_t xpub3_bindings_t<>; struct xpub3_dict_t { int lineno; xpub3_bindings_t entries; }; struct xpub3_regex_t { int lineno; string body<>; string opts<>; }; struct xpub3_assignment_t { int lineno; xpub3_expr_t *lhs; xpub3_expr_t *rhs; }; struct xpub3_lambda_t { int lineno; xpub3_str_t filename; xpub_fn_t name; xpub3_identifier_list_t params; xpub3_zone_t *body; }; struct xpub3_heredoc_t { int lineno; xpub3_zone_t *body; }; union xpub3_expr_t switch (xpub3_expr_typ_t typ) { case XPUB3_EXPR_NULL: void; case XPUB3_EXPR_PUBNULL: void; case XPUB3_EXPR_NOT: xpub3_not_t xnot; case XPUB3_EXPR_MATHOP: xpub3_mathop_t mathop; case XPUB3_EXPR_CALL: xpub3_call_t call; case XPUB3_EXPR_RELATION: xpub3_relation_t relation; case XPUB3_EXPR_DICT: xpub3_dict_t dict; case XPUB3_EXPR_LIST: xpub3_expr_list_t list; case XPUB3_EXPR_EQ: xpub3_eq_t eq; case XPUB3_EXPR_DICTREF: xpub3_dictref_t dictref; case XPUB3_EXPR_VECREF: xpub3_vecref_t vecref; case XPUB3_EXPR_REF: xpub3_ref_t xref; case XPUB3_EXPR_SCOPED_REF: xpub3_scoped_ref_t scoped_xref; case XPUB3_EXPR_SHELL_STR: xpub3_shell_str_t shell_str; case XPUB3_EXPR_STR: xpub3_str_t xstr; case XPUB3_EXPR_INT: xpub3_int_t xint; case XPUB3_EXPR_UINT: xpub3_uint_t xuint; case XPUB3_EXPR_DOUBLE: xpub3_double_t xdouble; case XPUB3_EXPR_REGEX: xpub3_regex_t regex; case XPUB3_EXPR_ASSIGNMENT: xpub3_assignment_t assignment; case XPUB3_EXPR_BOOL: xpub3_int_t xbool; case XPUB3_EXPR_LAMBDA: xpub3_lambda_t lambda; case XPUB3_EXPR_HEREDOC: xpub3_heredoc_t heredoc; }; /* ======================================================================= */ /* PUB3 Zones */ %struct xpub3_statement_t; struct xpub3_zone_html_t { int lineno; xpub3_zone_t zones<>; }; struct xpub3_zone_text_t { int lineno; xpub3_zstr_t original_text; xpub3_zstr_t wss_text; }; struct xpub3_zone_raw_t { int lineno; xpub3_zstr_t data; }; struct xpub3_zone_pub_t { int lineno; xpub3_statement_t statements<>; }; struct xpub3_zone_wss_boundary_t { int lineno; bool on; string tag<>; }; struct xpub3_zone_inline_expr_t { int lineno; xpub3_expr_t expr; }; enum xpub3_zone_typ_t { XPUB3_ZONE_NONE = 0, XPUB3_ZONE_HTML = 1, XPUB3_ZONE_TEXT = 2, XPUB3_ZONE_INLINE_EXPR = 3, XPUB3_ZONE_PUB = 4, XPUB3_ZONE_RAW = 5, XPUB3_ZONE_WSS_BOUNDARY = 6 }; union xpub3_zone_t switch (xpub3_zone_typ_t typ) { case XPUB3_ZONE_HTML: xpub3_zone_html_t html; case XPUB3_ZONE_TEXT: xpub3_zone_text_t text; case XPUB3_ZONE_INLINE_EXPR: xpub3_zone_inline_expr_t zone_inline; case XPUB3_ZONE_PUB: xpub3_zone_pub_t zone_pub; case XPUB3_ZONE_RAW: xpub3_zone_raw_t zone_raw; case XPUB3_ZONE_WSS_BOUNDARY: xpub3_zone_wss_boundary_t zone_wss_boundary; default: void; }; /* ======================================================================= */ /* Pub3 File Structures */ struct xpub3_metadata_t { xpub_fn_t jailed_filename; xpub_fn_t real_filename; xpub3_hash_t hash; // The hash of the **raw unparsed file** on the disk ok_xtime_t ctime; }; struct xpub3_file_t { xpub3_metadata_t metadata; xpub3_zone_t *root; unsigned opts; }; /* ======================================================================= */ /* PUB3 statements */ struct xpub3_for_t { int lineno; xpub_var_t iter; xpub3_expr_t arr; xpub3_zone_t body; xpub3_zone_t *empty; }; struct xpub3_while_t { int lineno; xpub3_expr_t cond; xpub3_zone_t body; }; struct xpub3_include_t { int lineno; xpub3_expr_t file; xpub3_expr_t dict; }; struct xpub3_if_clause_t { int lineno; xpub3_expr_t expr; xpub3_zone_t body; }; struct xpub3_if_t { int lineno; xpub3_if_clause_t clauses<>; }; struct xpub3_case_t { int lineno; xpub3_expr_t *key; xpub3_zone_t body; }; typedef xpub3_case_t xpub3_cases_t<>; struct xpub3_switch_t { int lineno; xpub3_expr_t key; xpub3_cases_t cases; xpub3_case_t *defcase; }; struct xpub3_return_t { int lineno; xpub3_expr_t retval; }; struct xpub3_break_t { int lineno; }; struct xpub3_fndef_t { int lineno; string name<>; xpub3_lambda_t lambda; }; struct xpub3_continue_t { int lineno; }; struct xpub3_exit_t { int lineno; }; struct xpub3_decls_t { int lineno; xpub3_dict_t decls; }; struct xpub3_print_t { int lineno; xpub3_expr_list_t args; }; struct xpub3_expr_statement_t { int lineno; xpub3_expr_t *expr; }; struct xpub3_statement_zone_t { int lineno; xpub3_zone_t zone; }; enum xpub3_statement_typ_t { XPUB3_STATEMENT_NONE = 0, XPUB3_STATEMENT_INCLUDE = 1, XPUB3_STATEMENT_LOAD = 2, XPUB3_STATEMENT_ZONE = 3, XPUB3_STATEMENT_FOR = 4, XPUB3_STATEMENT_LOCALS = 5, XPUB3_STATEMENT_UNIVERSALS = 6, XPUB3_STATEMENT_IF = 7, XPUB3_STATEMENT_PRINT = 8, XPUB3_STATEMENT_EXPR = 9, XPUB3_STATEMENT_FNDEF = 10, XPUB3_STATEMENT_SWITCH = 11, XPUB3_STATEMENT_BREAK = 12, XPUB3_STATEMENT_RETURN = 13, XPUB3_STATEMENT_CONTINUE = 14, XPUB3_STATEMENT_GLOBALS = 15, XPUB3_STATEMENT_WHILE = 16, XPUB3_STATEMENT_EXIT = 17 }; %struct xpub3_zone_t; union xpub3_statement_t switch (xpub3_statement_typ_t typ) { case XPUB3_STATEMENT_NONE: void; case XPUB3_STATEMENT_INCLUDE: case XPUB3_STATEMENT_LOAD: xpub3_include_t include; case XPUB3_STATEMENT_ZONE: xpub3_statement_zone_t zone; case XPUB3_STATEMENT_FOR: xpub3_for_t for_statement; case XPUB3_STATEMENT_WHILE: xpub3_while_t while_statement; case XPUB3_STATEMENT_LOCALS: case XPUB3_STATEMENT_GLOBALS: case XPUB3_STATEMENT_UNIVERSALS: xpub3_decls_t decls; case XPUB3_STATEMENT_IF: xpub3_if_t if_statement; case XPUB3_STATEMENT_PRINT: xpub3_print_t print; case XPUB3_STATEMENT_EXPR: xpub3_expr_statement_t expr_statement; case XPUB3_STATEMENT_SWITCH: xpub3_switch_t switch_statement; case XPUB3_STATEMENT_BREAK: xpub3_break_t break_statement; case XPUB3_STATEMENT_CONTINUE: xpub3_continue_t continue_statement; case XPUB3_STATEMENT_RETURN: xpub3_return_t return_statement; case XPUB3_STATEMENT_FNDEF: xpub3_fndef_t fndef; case XPUB3_STATEMENT_EXIT: xpub3_exit_t exit_statement; }; /* ====================================================================== */ /* pure JSON */ enum xpub3_json_typ_t { XPUB3_JSON_ERROR, XPUB3_JSON_BOOL, XPUB3_JSON_INT32, XPUB3_JSON_UINT32, XPUB3_JSON_INT64, XPUB3_JSON_UINT64, XPUB3_JSON_DOUBLE, XPUB3_JSON_STRING, XPUB3_JSON_DICT, XPUB3_JSON_LIST, XPUB3_JSON_NULL }; %struct xpub3_json_t; typedef opaque xpub3_json_str_t<>; struct xpub3_json_list_t { xpub3_json_t entries<>; }; struct xpub3_json_pair_t { xpub3_json_str_t key; xpub3_json_t *value; }; typedef xpub3_json_pair_t xpub3_json_pairs_t<>; struct xpub3_json_dict_t { xpub3_json_pairs_t entries; }; union xpub3_json_t switch (xpub3_json_typ_t typ) { case XPUB3_JSON_BOOL: bool json_bool; case XPUB3_JSON_INT32: int json_int32; case XPUB3_JSON_UINT32: unsigned json_uint32; case XPUB3_JSON_INT64: hyper json_int64; case XPUB3_JSON_UINT64: unsigned hyper json_uint64; case XPUB3_JSON_STRING: xpub3_json_str_t json_string; case XPUB3_JSON_DICT: xpub3_json_dict_t json_dict; case XPUB3_JSON_LIST: xpub3_json_list_t json_list; case XPUB3_JSON_DOUBLE: xpub3_double_t json_double; default: void; }; /* ----------------------------------------------------------------------- */ /* XDR descriptions of constants -- poor man's reflection! */ struct rpc_int_constant_t { string name<>; int value; }; typedef rpc_int_constant_t rpc_int_constants_t<>; struct rpc_constant_set_t { rpc_int_constants_t progs; rpc_int_constants_t vers; rpc_int_constants_t procs; rpc_int_constants_t enums; rpc_int_constants_t pound_defs; }; namespace rpc { program JSON_INTROSPECTION_PROG { version JSON_INTROSPECTION_V1 { rpc_constant_set_t JSON_INTROSPECTION_FETCH_CONSTANTS(void) = 0; } = 1; } = 79921; }; /* ----------------------------------------------------------------------- */ /* ======================================================================= */ enum xpub_status_typ_t { XPUB_STATUS_OK = 0, XPUB_STATUS_ERR = 1, XPUB_STATUS_NOCHANGE = 2, XPUB_STATUS_NOENT = 3, XPUB_STATUS_OOB = 4, /* out of bounds */ XPUB_STATUS_NOT_IMPLEMENTED = 5, XPUB_STATUS_RPC_ERR = 6, XPUB_UNAVAILABLE = 7, /* disabled at runtime */ XPUB_STATUS_CORRUPTION = 8, XPUB_STATUS_EPARSE = 9, XPUB_STATUS_EIO = 10 }; enum xpub3_xfer_mode_t { XPUB_XFER_WHOLE = 0, XPUB_XFER_CHUNKED = 1 }; typedef string xpub3_errstr_t<>; typedef xpub3_errstr_t xpub3_errstrs_t<>; union xpub_status_t switch (xpub_status_typ_t status) { case XPUB_STATUS_OK: void; case XPUB_STATUS_RPC_ERR: u_int32_t rpc_err; case XPUB_STATUS_NOENT: case XPUB_STATUS_EPARSE: case XPUB_STATUS_EIO: xpub3_errstrs_t errors; default: xpub3_errstr_t error; }; union xpub3_lookup_res_t switch (xpub_status_typ_t status) { case XPUB_STATUS_OK: xpub3_fstat_t stat; case XPUB_STATUS_ERR: string error<>; default: void; }; struct xpub3_chunk_t { unsigned offset; opaque data<>; }; struct xpub3_chunkshdr_t { xpub3_hash_t xdrhash; /* a hash of the file's XDR repr */ int leasetime; /* time until flush possibility from cache*/ unsigned datasize; /* size of the XDR repr */ xpub3_hash_t dathash; /* hash of the file's data */ }; union xpub3_xfered_file_t switch (xpub3_xfer_mode_t mode) { case XPUB_XFER_WHOLE: xpub3_file_t whole; case XPUB_XFER_CHUNKED: xpub3_chunkshdr_t chunked; }; enum xpub3_freshness_typ_t { XPUB3_FRESH_NONE = 0, XPUB3_FRESH_CTIME = 1, XPUB3_FRESH_HASH = 2 }; union xpub3_file_freshcheck_t switch (xpub3_freshness_typ_t mode) { case XPUB3_FRESH_NONE: void; case XPUB3_FRESH_CTIME: u_int32_t ctime; case XPUB3_FRESH_HASH: xpub3_hash_t hash; }; struct xpub3_getfile_arg_t { xpub_fn_t filename; unsigned options; xpub3_file_freshcheck_t fresh; unsigned maxsz; }; struct xpub3_getchunk_arg_t { xpub3_hash_t hash; unsigned opts; unsigned offset; unsigned size; }; union xpub3_getchunk_res_t switch (xpub_status_typ_t status) { case XPUB_STATUS_OK: xpub3_chunk_t chunk; case XPUB_STATUS_ERR: string error<>; default: void; }; union xpub3_getfile_res_t switch (xpub_status_typ_t code) { case XPUB_STATUS_OK: xpub3_xfered_file_t file; default: xpub_status_t error_status; }; union xpub3_get_root_config_res_t switch (xpub_status_typ_t status) { case XPUB_STATUS_OK: xpub_fn_t fn; case XPUB_STATUS_ERR: string error<>; default: void; }; struct xpub3_fstat_set_t { unsigned timestamp; xpub3_fstat_t fstats<>; xpub_fn_t misses<>; }; /* * All files in the delta set should be removed from the service's * cache, either because the disappered, or because they were updated. */ struct xpub3_delta_set_t { hyper serial; unsigned start; unsigned stop; xpub_fn_t files<>; }; union xpub3_get_fstats_res_t switch (xpub_status_typ_t status) { case XPUB_STATUS_OK: xpub3_fstat_set_t stats; case XPUB_STATUS_ERR: string error<>; default: void; }; namespace rpc { program PUB_PROG { /* * Version 2 of Pub. Simplified protocol, and a simplified * server, too. */ version PUB_VERS3 { void PUB3_NULL (void) = 0; xpub3_get_root_config_res_t PUB3_GET_ROOT_CONFIG (void) = 1; xpub3_getfile_res_t PUB3_GETFILE (xpub3_getfile_arg_t) = 2; /* * Input an mtime, and get all changes since that * mtime (or perhaps all fstat's if there was a mod * since the given mtime). */ xpub3_get_fstats_res_t PUB3_GET_FSTATS (u_int32_t) = 3; /* * If the file is too big to be returned all at once, * we need to get it by chunks. */ xpub3_getchunk_res_t PUB3_GETCHUNK(xpub3_getchunk_arg_t) = 8; /* * for each service, pubd needs to send a socket pair * end over a pipe. */ int PUB3_CLONE (int) = 4; bool PUB3_PUSH_DELTAS(xpub3_delta_set_t) = 5; bool PUB3_GET_PUSHES (void) = 6; /* * Get a file hash, and ctime, but bypass NFS * so go from pubd<->pubd. */ xpub3_lookup_res_t PUB3_LOOKUP (xpub_fn_t) = 7; void PUB3_KILL (ok_killsig_t) = 99; } = 3; } = 11277; };
{'repo_name': 'OkCupid/okws', 'stars': '235', 'repo_language': 'C++', 'file_name': 'pubserv.T', 'mime_type': 'text/x-c', 'hash': 4598962071967046584, 'source_dataset': 'data'}
// The package f is a go/doc test for functions and factory ... PACKAGE f IMPORTPATH testdata/f FILENAMES testdata/f.go FUNCTIONS // Exported must always be visible. Was issue 2824. func Exported() private
{'repo_name': 'riscv/riscv-gcc', 'stars': '155', 'repo_language': 'C', 'file_name': 'visium-protos.h', 'mime_type': 'text/x-c', 'hash': 6905321743860665172, 'source_dataset': 'data'}
<?xml version="1.0" encoding="UTF-8"?> <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02"> <data> <int key="IBDocument.SystemTarget">1050</int> <string key="IBDocument.SystemVersion">9C31</string> <string key="IBDocument.InterfaceBuilderVersion">644</string> <string key="IBDocument.AppKitVersion">949.26</string> <string key="IBDocument.HIToolboxVersion">352.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> <integer value="5"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> <string>com.apple.WebKitIBPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> </object> <object class="NSMutableArray" key="IBDocument.RootObjects" id="625423742"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSCustomObject" id="272387934"> <string key="NSClassName">FRAPreviewController</string> </object> <object class="NSCustomObject" id="602813496"> <string key="NSClassName">FirstResponder</string> </object> <object class="NSCustomObject" id="27047093"> <string key="NSClassName">NSApplication</string> </object> <object class="NSWindowTemplate" id="212784435"> <int key="NSWindowStyleMask">15</int> <int key="NSWindowBacking">2</int> <string key="NSWindowRect">{{288, 476}, {572, 375}}</string> <int key="NSWTFlags">1886912512</int> <string type="base64-UTF8" key="NSWindowTitle">UHJldmlldyAtIFNtdWx0cm9uIDxkbyBub3QgbG9jYWxpc2U+A</string> <string key="NSWindowClass">NSPanel</string> <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{572, 375}</string> <object class="NSView" key="NSWindowView" id="794293269"> <reference key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSTextField" id="97755258"> <reference key="NSNextResponder" ref="794293269"/> <int key="NSvFlags">270</int> <string key="NSFrame">{{87, 348}, {269, 22}}</string> <reference key="NSSuperview" ref="794293269"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="837639802"> <int key="NSCellFlags">-1804468671</int> <int key="NSCellFlags2">272630784</int> <string key="NSContents"/> <object class="NSFont" key="NSSupport" id="1025863700"> <string key="NSName">LucidaGrande</string> <double key="NSSize">1.300000e+01</double> <int key="NSfFlags">1044</int> </object> <reference key="NSControlView" ref="97755258"/> <bool key="NSDrawsBackground">YES</bool> <object class="NSColor" key="NSBackgroundColor" id="424515593"> <int key="NSColorSpace">6</int> <string key="NSCatalogName">System</string> <string key="NSColorName">textBackgroundColor</string> <object class="NSColor" key="NSColor"> <int key="NSColorSpace">3</int> <bytes key="NSWhite">MQA</bytes> </object> </object> <object class="NSColor" key="NSTextColor"> <int key="NSColorSpace">6</int> <string key="NSCatalogName">System</string> <string key="NSColorName">textColor</string> <object class="NSColor" key="NSColor" id="784309873"> <int key="NSColorSpace">3</int> <bytes key="NSWhite">MAA</bytes> </object> </object> </object> </object> <object class="NSTextField" id="537844613"> <reference key="NSNextResponder" ref="794293269"/> <int key="NSvFlags">268</int> <string key="NSFrame">{{10, 350}, {72, 17}}</string> <reference key="NSSuperview" ref="794293269"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="585393940"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">272629760</int> <string type="base64-UTF8" key="NSContents">44OZ44O844K5VVJMOg</string> <reference key="NSSupport" ref="1025863700"/> <reference key="NSControlView" ref="537844613"/> <object class="NSColor" key="NSBackgroundColor"> <int key="NSColorSpace">6</int> <string key="NSCatalogName">System</string> <string key="NSColorName">controlColor</string> <object class="NSColor" key="NSColor"> <int key="NSColorSpace">3</int> <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes> </object> </object> <object class="NSColor" key="NSTextColor"> <int key="NSColorSpace">6</int> <string key="NSCatalogName">System</string> <string key="NSColorName">controlTextColor</string> <reference key="NSColor" ref="784309873"/> </object> </object> </object> <object class="NSButton" id="150085716"> <reference key="NSNextResponder" ref="794293269"/> <int key="NSvFlags">265</int> <string key="NSFrame">{{379, 350}, {96, 18}}</string> <reference key="NSSuperview" ref="794293269"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="299526322"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">0</int> <string type="base64-UTF8" key="NSContents">6Ieq5YuV5pu05pawA</string> <reference key="NSSupport" ref="1025863700"/> <reference key="NSControlView" ref="150085716"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">2</int> <object class="NSButtonImageSource" key="NSAlternateImage"> <string key="NSImageName">NSSwitch</string> </object> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> <int key="NSPeriodicDelay">200</int> <int key="NSPeriodicInterval">25</int> </object> </object> <object class="NSButton" id="94341811"> <reference key="NSNextResponder" ref="794293269"/> <int key="NSvFlags">265</int> <string key="NSFrame">{{470, 341}, {92, 32}}</string> <reference key="NSSuperview" ref="794293269"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="604858827"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">134217728</int> <string type="base64-UTF8" key="NSContents">44Oq44Ot44O844OJA</string> <reference key="NSSupport" ref="1025863700"/> <reference key="NSControlView" ref="94341811"/> <int key="NSButtonFlags">-2038284033</int> <int key="NSButtonFlags2">1</int> <reference key="NSAlternateImage" ref="1025863700"/> <string key="NSAlternateContents"/> <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string> <int key="NSPeriodicDelay">200</int> <int key="NSPeriodicInterval">25</int> </object> </object> <object class="NSBox" id="618947053"> <reference key="NSNextResponder" ref="794293269"/> <int key="NSvFlags">266</int> <string key="NSFrame">{{0, 339}, {572, 5}}</string> <reference key="NSSuperview" ref="794293269"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">0</int> <string key="NSContents">Box</string> <reference key="NSSupport" ref="1025863700"/> <reference key="NSBackgroundColor" ref="424515593"/> <object class="NSColor" key="NSTextColor"> <int key="NSColorSpace">3</int> <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes> </object> </object> <int key="NSBorderType">3</int> <int key="NSBoxType">2</int> <int key="NSTitlePosition">0</int> <bool key="NSTransparent">NO</bool> </object> <object class="WebView" id="222877261"> <reference key="NSNextResponder" ref="794293269"/> <int key="NSvFlags">274</int> <object class="NSMutableSet" key="NSDragTypes"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSMutableArray" key="set.sortedObjects"> <bool key="EncodedWithXMLCoder">YES</bool> <string>Apple HTML pasteboard type</string> <string>Apple PICT pasteboard type</string> <string>Apple URL pasteboard type</string> <string>Apple Web Archive pasteboard type</string> <string>NSColor pasteboard type</string> <string>NSFilenamesPboardType</string> <string>NSStringPboardType</string> <string>NeXT RTFD pasteboard type</string> <string>NeXT Rich Text Format v1.0 pasteboard type</string> <string>NeXT TIFF v4.0 pasteboard type</string> <string>WebURLsWithTitlesPboardType</string> <string>public.url</string> <string>public.url-name</string> </object> </object> <string key="NSFrameSize">{572, 341}</string> <reference key="NSSuperview" ref="794293269"/> <reference key="NSNextKeyView"/> <string key="FrameName"/> <string key="GroupName"/> <object class="WebPreferences" key="Preferences"> <string key="Identifier"/> <object class="NSMutableDictionary" key="Values"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>WebKitDefaultFixedFontSize</string> <string>WebKitDefaultFontSize</string> <string>WebKitMinimumFontSize</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <integer value="12" id="453210809"/> <reference ref="453210809"/> <integer value="1"/> </object> </object> </object> <bool key="UseBackForwardList">YES</bool> <bool key="AllowsUndo">YES</bool> </object> </object> <string key="NSFrameSize">{572, 375}</string> <reference key="NSSuperview"/> </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> <string key="NSMinSize">{572, 397}</string> <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSFrameAutosaveName">PreviewWindow</string> </object> <object class="NSUserDefaultsController" id="698086975"> <bool key="NSSharedInstance">YES</bool> </object> </object> <object class="IBObjectContainer" key="IBDocument.Objects"> <object class="NSMutableArray" key="connectionRecords"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBConnectionRecord"> <object class="IBBindingConnection" key="connection"> <string key="label">value: values.LiveUpdatePreview</string> <reference key="source" ref="150085716"/> <reference key="destination" ref="698086975"/> <object class="NSNibBindingConnector" key="connector"> <reference key="NSSource" ref="150085716"/> <reference key="NSDestination" ref="698086975"/> <string key="NSLabel">value: values.LiveUpdatePreview</string> <string key="NSBinding">value</string> <string key="NSKeyPath">values.LiveUpdatePreview</string> <int key="NSNibBindingConnectorVersion">2</int> </object> </object> <int key="connectionID">15</int> </object> <object class="IBConnectionRecord"> <object class="IBBindingConnection" key="connection"> <string key="label">value: values.BaseURL</string> <reference key="source" ref="97755258"/> <reference key="destination" ref="698086975"/> <object class="NSNibBindingConnector" key="connector"> <reference key="NSSource" ref="97755258"/> <reference key="NSDestination" ref="698086975"/> <string key="NSLabel">value: values.BaseURL</string> <string key="NSBinding">value</string> <string key="NSKeyPath">values.BaseURL</string> <int key="NSNibBindingConnectorVersion">2</int> </object> </object> <int key="connectionID">16</int> </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> <string key="label">webView</string> <reference key="source" ref="272387934"/> <reference key="destination" ref="222877261"/> </object> <int key="connectionID">17</int> </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> <string key="label">previewWindow</string> <reference key="source" ref="272387934"/> <reference key="destination" ref="212784435"/> </object> <int key="connectionID">18</int> </object> <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> <string key="label">reloadAction:</string> <reference key="source" ref="272387934"/> <reference key="destination" ref="94341811"/> </object> <int key="connectionID">19</int> </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBObjectRecord"> <int key="objectID">0</int> <object class="NSArray" key="object" id="0"> <bool key="EncodedWithXMLCoder">YES</bool> </object> <reference key="children" ref="625423742"/> <nil key="parent"/> </object> <object class="IBObjectRecord"> <int key="objectID">-2</int> <reference key="object" ref="272387934"/> <reference key="parent" ref="0"/> <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string> </object> <object class="IBObjectRecord"> <int key="objectID">-1</int> <reference key="object" ref="602813496"/> <reference key="parent" ref="0"/> <string key="objectName">First Responder</string> </object> <object class="IBObjectRecord"> <int key="objectID">5</int> <reference key="object" ref="212784435"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="794293269"/> </object> <reference key="parent" ref="0"/> <string key="objectName">Window</string> </object> <object class="IBObjectRecord"> <int key="objectID">6</int> <reference key="object" ref="794293269"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="97755258"/> <reference ref="537844613"/> <reference ref="150085716"/> <reference ref="94341811"/> <reference ref="618947053"/> <reference ref="222877261"/> </object> <reference key="parent" ref="212784435"/> </object> <object class="IBObjectRecord"> <int key="objectID">7</int> <reference key="object" ref="97755258"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="837639802"/> </object> <reference key="parent" ref="794293269"/> </object> <object class="IBObjectRecord"> <int key="objectID">8</int> <reference key="object" ref="537844613"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="585393940"/> </object> <reference key="parent" ref="794293269"/> </object> <object class="IBObjectRecord"> <int key="objectID">9</int> <reference key="object" ref="150085716"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="299526322"/> </object> <reference key="parent" ref="794293269"/> </object> <object class="IBObjectRecord"> <int key="objectID">10</int> <reference key="object" ref="94341811"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="604858827"/> </object> <reference key="parent" ref="794293269"/> </object> <object class="IBObjectRecord"> <int key="objectID">11</int> <reference key="object" ref="618947053"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSView" id="273189716"> <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> <string key="NSFrame">{{2, 2}, {125, 1}}</string> </object> </object> <reference key="parent" ref="794293269"/> </object> <object class="IBObjectRecord"> <int key="objectID">12</int> <reference key="object" ref="273189716"/> <reference key="parent" ref="618947053"/> </object> <object class="IBObjectRecord"> <int key="objectID">13</int> <reference key="object" ref="222877261"/> <reference key="parent" ref="794293269"/> </object> <object class="IBObjectRecord"> <int key="objectID">14</int> <reference key="object" ref="698086975"/> <reference key="parent" ref="0"/> <string key="objectName">Shared Defaults</string> </object> <object class="IBObjectRecord"> <int key="objectID">21</int> <reference key="object" ref="837639802"/> <reference key="parent" ref="97755258"/> </object> <object class="IBObjectRecord"> <int key="objectID">22</int> <reference key="object" ref="585393940"/> <reference key="parent" ref="537844613"/> </object> <object class="IBObjectRecord"> <int key="objectID">23</int> <reference key="object" ref="299526322"/> <reference key="parent" ref="150085716"/> </object> <object class="IBObjectRecord"> <int key="objectID">24</int> <reference key="object" ref="604858827"/> <reference key="parent" ref="94341811"/> </object> <object class="IBObjectRecord"> <int key="objectID">-3</int> <reference key="object" ref="27047093"/> <reference key="parent" ref="0"/> <string key="objectName">Application</string> </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>-1.IBPluginDependency</string> <string>-2.IBPluginDependency</string> <string>10.IBPluginDependency</string> <string>10.ImportedFromIB2</string> <string>11.IBPluginDependency</string> <string>11.ImportedFromIB2</string> <string>12.IBPluginDependency</string> <string>12.ImportedFromIB2</string> <string>13.IBPluginDependency</string> <string>13.ImportedFromIB2</string> <string>14.IBPluginDependency</string> <string>14.ImportedFromIB2</string> <string>5.IBEditorWindowLastContentRect</string> <string>5.IBPluginDependency</string> <string>5.IBWindowTemplateEditedContentRect</string> <string>5.ImportedFromIB2</string> <string>5.lastResizeAction</string> <string>5.windowTemplate.hasMaxSize</string> <string>5.windowTemplate.hasMinSize</string> <string>5.windowTemplate.maxSize</string> <string>5.windowTemplate.minSize</string> <string>6.IBPluginDependency</string> <string>6.ImportedFromIB2</string> <string>7.IBPluginDependency</string> <string>7.ImportedFromIB2</string> <string>8.IBPluginDependency</string> <string>8.ImportedFromIB2</string> <string>9.IBPluginDependency</string> <string>9.ImportedFromIB2</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1" id="5"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="5"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="5"/> <string>com.apple.WebKitIBPlugin</string> <reference ref="5"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="5"/> <string>{{222, 476}, {572, 375}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>{{222, 476}, {572, 375}}</string> <reference ref="5"/> <object class="NSDictionary"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>IBResizeActionFinalFrame</string> <string>IBResizeActionInitialFrame</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>{{222, 476}, {572, 375}}</string> <string>{{222, 476}, {572, 375}}</string> </object> </object> <reference ref="5"/> <reference ref="5"/> <string>{3.40282e+38, 3.40282e+38}</string> <string>{572, 375}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="5"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="5"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="5"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="5"/> </object> </object> <object class="NSMutableDictionary" key="unlocalizedProperties"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> </object> </object> <nil key="activeLocalization"/> <object class="NSMutableDictionary" key="localizations"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> </object> </object> <nil key="sourceID"/> <int key="maxID">24</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBPartialClassDescription"> <string key="className">FirstResponder</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBUserSource</string> <string key="minorKey"/> </object> </object> <object class="IBPartialClassDescription"> <string key="className">FRAPreviewController</string> <string key="superclassName">NSObject</string> <object class="NSMutableDictionary" key="actions"> <string key="NS.key.0">reloadAction:</string> <string key="NS.object.0">id</string> </object> <object class="NSMutableDictionary" key="outlets"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>previewWindow</string> <string>webView</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>NSWindow</string> <string>WebView</string> </object> </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBUserSource</string> <string key="minorKey"/> </object> </object> </object> </object> <int key="IBDocument.localizationMode">0</int> <nil key="IBDocument.LastKnownRelativeProjectPath"/> <int key="IBDocument.defaultPropertyAccessControl">3</int> </data> </archive>
{'repo_name': 'jfmoy/Fraise', 'stars': '274', 'repo_language': 'Objective-C', 'file_name': 'info.nib', 'mime_type': 'text/xml', 'hash': 367874223099417880, 'source_dataset': 'data'}
#!/bin/bash SCRIPTDIR=`pwd` mkdir -p ../data/word2vec/raw cd ../data/word2vec/raw if [ ! -e 1-billion-word-language-modeling-benchmark-r13output.tar.gz ]; then echo "Downloading" wget http://www.statmt.org/lm-benchmark/1-billion-word-language-modeling-benchmark-r13output.tar.gz fi if [ ! -d 1-billion-word-language-modeling-benchmark-r13output ]; then echo "Uncompressing" tar xvzf 1-billion-word-language-modeling-benchmark-r13output.tar.gz # fix the misplaced first news item mv 1-billion-word-language-modeling-benchmark-r13output/heldout-monolingual.tokenized.shuffled/news.en-00000-of-00100 \ 1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled fi cd 1-billion-word-language-modeling-benchmark-r13output/training-monolingual.tokenized.shuffled FILES=`echo news.en*00100 | sed 's/ /,/g'` mkdir -p ${SCRIPTDIR}/../data/word2vec/tokenized mkdir -p ${SCRIPTDIR}/../data/word2vec/tokenized2 mkdir -p ${SCRIPTDIR}/../data/word2vec/data ${SCRIPTDIR}/../cbin/tparse2.exe -i "${FILES}" -f ../../fmt.txt -o ${SCRIPTDIR}/../data/word2vec/tokenized/ -c cd ${SCRIPTDIR}/../data/word2vec/raw/1-billion-word-language-modeling-benchmark-r13output/heldout-monolingual.tokenized.shuffled/ FILES=`echo news.en*00050 | sed 's/ /,/g'` ${SCRIPTDIR}/../cbin/tparse2.exe -i "${FILES}" -f ../../fmt.txt -o ${SCRIPTDIR}/../data/word2vec/tokenized2/ -c cd ${SCRIPTDIR} bidmach getw2vdata.ssc
{'repo_name': 'BIDData/BIDMach', 'stars': '909', 'repo_language': 'Scala', 'file_name': 'factorSet.txt', 'mime_type': 'text/plain', 'hash': -5422093720103100905, 'source_dataset': 'data'}
# Copyright Hugh Perkins 2016 """ 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. """ import subprocess import pyopencl as cl import pytest import os from os import path from test import test_common @pytest.fixture(scope='module') def dotdotdot_cl(): # lets check it's compileable ll first, using llvm ll_filepath = 'test/dotdotdot.ll' with open(ll_filepath, 'r') as f: ll_sourcecode = f.read() kernelName = test_common.mangle('test_si', ['float *']) cl_sourcecode = test_common.ll_to_cl(ll_sourcecode, kernelName, num_clmems=1) print('cl_sourcecode', cl_sourcecode) return cl_sourcecode @pytest.fixture(scope='module') def dotdotdot(context, dotdotdot_cl): kernelName = test_common.mangle('test_si', ['float *']) kernel = test_common.build_kernel(context, dotdotdot_cl, kernelName) return kernel def test_program_compiles(dotdotdot): pass # def test_copy_float(extract_value, q, float_data, float_data_gpu): # extract_value.__getattr__(test_common.mangle('test_floats', ['float *']))(q, (32,), (32,), float_data_gpu) # cl.enqueue_copy(q, float_data, float_data_gpu) # q.finish() # assert float_data[0] == float_data[1]
{'repo_name': 'hughperkins/coriander', 'stars': '607', 'repo_language': 'LLVM', 'file_name': 'gtest.h', 'mime_type': 'text/x-c', 'hash': 6835111748089058014, 'source_dataset': 'data'}
var convert = require('./convert'), func = convert('uniqueId', require('../uniqueId')); func.placeholder = require('./placeholder'); module.exports = func;
{'repo_name': 'SwiftPackageIndex/SwiftPackageIndex-Server', 'stars': '149', 'repo_language': 'Swift', 'file_name': 'AppShell+mock.swift', 'mime_type': 'text/plain', 'hash': 8321864149167653266, 'source_dataset': 'data'}
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // <fstream> // template <class charT, class traits = char_traits<charT> > // class basic_fstream // void close(); #include <fstream> #include <cassert> #include "test_macros.h" #include "platform_support.h" int main(int, char**) { std::string temp = get_temp_file_name(); { std::fstream fs; assert(!fs.is_open()); fs.open(temp.c_str(), std::ios_base::out); assert(fs.is_open()); fs.close(); assert(!fs.is_open()); } std::remove(temp.c_str()); { std::wfstream fs; assert(!fs.is_open()); fs.open(temp.c_str(), std::ios_base::out); assert(fs.is_open()); fs.close(); assert(!fs.is_open()); } std::remove(temp.c_str()); return 0; }
{'repo_name': 'intel/llvm', 'stars': '317', 'repo_language': 'C++', 'file_name': 'is_error_code_enum_io_errc.pass.cpp', 'mime_type': 'text/x-c', 'hash': -7460613594072345614, 'source_dataset': 'data'}
#!/bin/bash set -e ~/.nuget/packages/grpc.tools/1.16.0/tools/linux_x64/protoc \ --proto_path=. \ --csharp_out=.. \ user.proto
{'repo_name': 'confluentinc/confluent-kafka-dotnet', 'stars': '1595', 'repo_language': 'C#', 'file_name': 'navbar.tmpl.partial', 'mime_type': 'text/plain', 'hash': 8277825007127721818, 'source_dataset': 'data'}
// // detail/config.hpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef NET_TS_DETAIL_CONFIG_HPP #define NET_TS_DETAIL_CONFIG_HPP #define NET_TS_STANDALONE 1 #if defined(NET_TS_STANDALONE) # define NET_TS_DISABLE_BOOST_ARRAY 1 # define NET_TS_DISABLE_BOOST_ASSERT 1 # define NET_TS_DISABLE_BOOST_BIND 1 # define NET_TS_DISABLE_BOOST_CHRONO 1 # define NET_TS_DISABLE_BOOST_DATE_TIME 1 # define NET_TS_DISABLE_BOOST_LIMITS 1 # define NET_TS_DISABLE_BOOST_REGEX 1 # define NET_TS_DISABLE_BOOST_STATIC_CONSTANT 1 # define NET_TS_DISABLE_BOOST_THROW_EXCEPTION 1 # define NET_TS_DISABLE_BOOST_WORKAROUND 1 #else // defined(NET_TS_STANDALONE) # include <boost/config.hpp> # include <boost/version.hpp> # define NET_TS_HAS_BOOST_CONFIG 1 #endif // defined(NET_TS_STANDALONE) // Default to a header-only implementation. The user must specifically request // separate compilation by defining either NET_TS_SEPARATE_COMPILATION or // NET_TS_DYN_LINK (as a DLL/shared library implies separate compilation). #if !defined(NET_TS_HEADER_ONLY) # if !defined(NET_TS_SEPARATE_COMPILATION) # if !defined(NET_TS_DYN_LINK) # define NET_TS_HEADER_ONLY 1 # endif // !defined(NET_TS_DYN_LINK) # endif // !defined(NET_TS_SEPARATE_COMPILATION) #endif // !defined(NET_TS_HEADER_ONLY) #if defined(NET_TS_HEADER_ONLY) # define NET_TS_DECL inline #else // defined(NET_TS_HEADER_ONLY) # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__) // We need to import/export our code only if the user has specifically asked // for it by defining NET_TS_DYN_LINK. # if defined(NET_TS_DYN_LINK) // Export if this is our own source, otherwise import. # if defined(NET_TS_SOURCE) # define NET_TS_DECL __declspec(dllexport) # else // defined(NET_TS_SOURCE) # define NET_TS_DECL __declspec(dllimport) # endif // defined(NET_TS_SOURCE) # endif // defined(NET_TS_DYN_LINK) # endif // defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__) #endif // defined(NET_TS_HEADER_ONLY) // If NET_TS_DECL isn't defined yet define it now. #if !defined(NET_TS_DECL) # define NET_TS_DECL #endif // !defined(NET_TS_DECL) // Microsoft Visual C++ detection. #if !defined(NET_TS_MSVC) # if defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_MSVC) # define NET_TS_MSVC BOOST_MSVC # elif defined(_MSC_VER) && (defined(__INTELLISENSE__) \ || (!defined(__MWERKS__) && !defined(__EDG_VERSION__))) # define NET_TS_MSVC _MSC_VER # endif // defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_MSVC) #endif // !defined(NET_TS_MSVC) // Clang / libc++ detection. #if defined(__clang__) # if (__cplusplus >= 201103) # if __has_include(<__config>) # include <__config> # if defined(_LIBCPP_VERSION) # define NET_TS_HAS_CLANG_LIBCXX 1 # endif // defined(_LIBCPP_VERSION) # endif // __has_include(<__config>) # endif // (__cplusplus >= 201103) #endif // defined(__clang__) // Android platform detection. #if defined(__ANDROID__) # include <android/api-level.h> #endif // defined(__ANDROID__) // Support move construction and assignment on compilers known to allow it. #if !defined(NET_TS_HAS_MOVE) # if !defined(NET_TS_DISABLE_MOVE) # if defined(__clang__) # if __has_feature(__cxx_rvalue_references__) # define NET_TS_HAS_MOVE 1 # endif // __has_feature(__cxx_rvalue_references__) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_MOVE 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_MOVE 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # if defined(__INTEL_CXX11_MODE__) # if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) # define BOOST_NET_TS_HAS_MOVE 1 # endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) # if defined(__ICL) && (__ICL >= 1500) # define BOOST_NET_TS_HAS_MOVE 1 # endif // defined(__ICL) && (__ICL >= 1500) # endif // defined(__INTEL_CXX11_MODE__) # endif // !defined(NET_TS_DISABLE_MOVE) #endif // !defined(NET_TS_HAS_MOVE) // If NET_TS_MOVE_CAST isn't defined, and move support is available, define // NET_TS_MOVE_ARG and NET_TS_MOVE_CAST to take advantage of rvalue // references and perfect forwarding. #if defined(NET_TS_HAS_MOVE) && !defined(NET_TS_MOVE_CAST) # define NET_TS_MOVE_ARG(type) type&& # define NET_TS_MOVE_ARG2(type1, type2) type1, type2&& # define NET_TS_MOVE_CAST(type) static_cast<type&&> # define NET_TS_MOVE_CAST2(type1, type2) static_cast<type1, type2&&> #endif // defined(NET_TS_HAS_MOVE) && !defined(NET_TS_MOVE_CAST) // If NET_TS_MOVE_CAST still isn't defined, default to a C++03-compatible // implementation. Note that older g++ and MSVC versions don't like it when you // pass a non-member function through a const reference, so for most compilers // we'll play it safe and stick with the old approach of passing the handler by // value. #if !defined(NET_TS_MOVE_CAST) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4) # define NET_TS_MOVE_ARG(type) const type& # else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4) # define NET_TS_MOVE_ARG(type) type # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4) # elif defined(NET_TS_MSVC) # if (_MSC_VER >= 1400) # define NET_TS_MOVE_ARG(type) const type& # else // (_MSC_VER >= 1400) # define NET_TS_MOVE_ARG(type) type # endif // (_MSC_VER >= 1400) # else # define NET_TS_MOVE_ARG(type) type # endif # define NET_TS_MOVE_CAST(type) static_cast<const type&> # define NET_TS_MOVE_CAST2(type1, type2) static_cast<const type1, type2&> #endif // !defined(NET_TS_MOVE_CAST) // Support variadic templates on compilers known to allow it. #if !defined(NET_TS_HAS_VARIADIC_TEMPLATES) # if !defined(NET_TS_DISABLE_VARIADIC_TEMPLATES) # if defined(__clang__) # if __has_feature(__cxx_variadic_templates__) # define NET_TS_HAS_VARIADIC_TEMPLATES 1 # endif // __has_feature(__cxx_variadic_templates__) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_VARIADIC_TEMPLATES 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1900) # define NET_TS_HAS_VARIADIC_TEMPLATES 1 # endif // (_MSC_VER >= 1900) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_VARIADIC_TEMPLATES) #endif // !defined(NET_TS_HAS_VARIADIC_TEMPLATES) // Support deleted functions on compilers known to allow it. #if !defined(NET_TS_DELETED) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_DELETED = delete # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(__clang__) # if __has_feature(__cxx_deleted_functions__) # define NET_TS_DELETED = delete # endif // __has_feature(__cxx_deleted_functions__) # endif // defined(__clang__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1900) # define NET_TS_DELETED = delete # endif // (_MSC_VER >= 1900) # endif // defined(NET_TS_MSVC) # if !defined(NET_TS_DELETED) # define NET_TS_DELETED # endif // !defined(NET_TS_DELETED) #endif // !defined(NET_TS_DELETED) // Support constexpr on compilers known to allow it. #if !defined(NET_TS_HAS_CONSTEXPR) # if !defined(NET_TS_DISABLE_CONSTEXPR) # if defined(__clang__) # if __has_feature(__cxx_constexpr__) # define NET_TS_HAS_CONSTEXPR 1 # endif // __has_feature(__cxx_constexr__) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_CONSTEXPR 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1900) # define NET_TS_HAS_CONSTEXPR 1 # endif // (_MSC_VER >= 1900) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_CONSTEXPR) #endif // !defined(NET_TS_HAS_CONSTEXPR) #if !defined(NET_TS_CONSTEXPR) # if defined(NET_TS_HAS_CONSTEXPR) # define NET_TS_CONSTEXPR constexpr # else // defined(NET_TS_HAS_CONSTEXPR) # define NET_TS_CONSTEXPR # endif // defined(NET_TS_HAS_CONSTEXPR) #endif // !defined(NET_TS_CONSTEXPR) // Support noexcept on compilers known to allow it. #if !defined(NET_TS_NOEXCEPT) # if !defined(NET_TS_DISABLE_NOEXCEPT) # if defined(NET_TS_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105300) # define NET_TS_NOEXCEPT BOOST_NOEXCEPT # define NET_TS_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW # elif defined(__clang__) # if __has_feature(__cxx_noexcept__) # define NET_TS_NOEXCEPT noexcept(true) # define NET_TS_NOEXCEPT_OR_NOTHROW noexcept(true) # endif // __has_feature(__cxx_noexcept__) # elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_NOEXCEPT noexcept(true) # define NET_TS_NOEXCEPT_OR_NOTHROW noexcept(true) # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # elif defined(NET_TS_MSVC) # if (_MSC_VER >= 1900) # define NET_TS_NOEXCEPT noexcept(true) # define NET_TS_NOEXCEPT_OR_NOTHROW noexcept(true) # endif // (_MSC_VER >= 1900) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_NOEXCEPT) # if !defined(NET_TS_NOEXCEPT) # define NET_TS_NOEXCEPT # endif // !defined(NET_TS_NOEXCEPT) # if !defined(NET_TS_NOEXCEPT_OR_NOTHROW) # define NET_TS_NOEXCEPT_OR_NOTHROW throw() # endif // !defined(NET_TS_NOEXCEPT_OR_NOTHROW) #endif // !defined(NET_TS_NOEXCEPT) // Support automatic type deduction on compilers known to support it. #if !defined(NET_TS_HAS_DECLTYPE) # if !defined(NET_TS_DISABLE_DECLTYPE) # if defined(__clang__) # if __has_feature(__cxx_decltype__) # define NET_TS_HAS_DECLTYPE 1 # endif // __has_feature(__cxx_decltype__) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_DECLTYPE 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_DECLTYPE 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_DECLTYPE) #endif // !defined(NET_TS_HAS_DECLTYPE) // Support alias templates on compilers known to allow it. #if !defined(NET_TS_HAS_ALIAS_TEMPLATES) # if !defined(NET_TS_DISABLE_ALIAS_TEMPLATES) # if defined(__clang__) # if __has_feature(__cxx_alias_templates__) # define NET_TS_HAS_ALIAS_TEMPLATES 1 # endif // __has_feature(__cxx_alias_templates__) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_ALIAS_TEMPLATES 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1900) # define NET_TS_HAS_ALIAS_TEMPLATES 1 # endif // (_MSC_VER >= 1900) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_ALIAS_TEMPLATES) #endif // !defined(NET_TS_HAS_ALIAS_TEMPLATES) // Standard library support for system errors. #if !defined(NET_TS_HAS_STD_SYSTEM_ERROR) # if !defined(NET_TS_DISABLE_STD_SYSTEM_ERROR) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_SYSTEM_ERROR 1 # elif (__cplusplus >= 201103) # if __has_include(<system_error>) # define NET_TS_HAS_STD_SYSTEM_ERROR 1 # endif // __has_include(<system_error>) # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_SYSTEM_ERROR 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_SYSTEM_ERROR 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_SYSTEM_ERROR) #endif // !defined(NET_TS_HAS_STD_SYSTEM_ERROR) // Compliant C++11 compilers put noexcept specifiers on error_category members. #if !defined(NET_TS_ERROR_CATEGORY_NOEXCEPT) # if (BOOST_VERSION >= 105300) # define NET_TS_ERROR_CATEGORY_NOEXCEPT BOOST_NOEXCEPT # elif defined(__clang__) # if __has_feature(__cxx_noexcept__) # define NET_TS_ERROR_CATEGORY_NOEXCEPT noexcept(true) # endif // __has_feature(__cxx_noexcept__) # elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_ERROR_CATEGORY_NOEXCEPT noexcept(true) # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # elif defined(NET_TS_MSVC) # if (_MSC_VER >= 1900) # define NET_TS_ERROR_CATEGORY_NOEXCEPT noexcept(true) # endif // (_MSC_VER >= 1900) # endif // defined(NET_TS_MSVC) # if !defined(NET_TS_ERROR_CATEGORY_NOEXCEPT) # define NET_TS_ERROR_CATEGORY_NOEXCEPT # endif // !defined(NET_TS_ERROR_CATEGORY_NOEXCEPT) #endif // !defined(NET_TS_ERROR_CATEGORY_NOEXCEPT) // Standard library support for arrays. #if !defined(NET_TS_HAS_STD_ARRAY) # if !defined(NET_TS_DISABLE_STD_ARRAY) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_ARRAY 1 # elif (__cplusplus >= 201103) # if __has_include(<array>) # define NET_TS_HAS_STD_ARRAY 1 # endif // __has_include(<array>) # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_ARRAY 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1600) # define NET_TS_HAS_STD_ARRAY 1 # endif // (_MSC_VER >= 1600) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_ARRAY) #endif // !defined(NET_TS_HAS_STD_ARRAY) // Standard library support for shared_ptr and weak_ptr. #if !defined(NET_TS_HAS_STD_SHARED_PTR) # if !defined(NET_TS_DISABLE_STD_SHARED_PTR) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_SHARED_PTR 1 # elif (__cplusplus >= 201103) # define NET_TS_HAS_STD_SHARED_PTR 1 # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_SHARED_PTR 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1600) # define NET_TS_HAS_STD_SHARED_PTR 1 # endif // (_MSC_VER >= 1600) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_SHARED_PTR) #endif // !defined(NET_TS_HAS_STD_SHARED_PTR) // Standard library support for allocator_arg_t. #if !defined(NET_TS_HAS_STD_ALLOCATOR_ARG) # if !defined(NET_TS_DISABLE_STD_ALLOCATOR_ARG) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_ALLOCATOR_ARG 1 # elif (__cplusplus >= 201103) # define NET_TS_HAS_STD_ALLOCATOR_ARG 1 # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_ALLOCATOR_ARG 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1600) # define NET_TS_HAS_STD_ALLOCATOR_ARG 1 # endif // (_MSC_VER >= 1600) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_ALLOCATOR_ARG) #endif // !defined(NET_TS_HAS_STD_ALLOCATOR_ARG) // Standard library support for atomic operations. #if !defined(NET_TS_HAS_STD_ATOMIC) # if !defined(NET_TS_DISABLE_STD_ATOMIC) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_ATOMIC 1 # elif (__cplusplus >= 201103) # if __has_include(<atomic>) # define NET_TS_HAS_STD_ATOMIC 1 # endif // __has_include(<atomic>) # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_ATOMIC 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_ATOMIC 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_ATOMIC) #endif // !defined(NET_TS_HAS_STD_ATOMIC) // Standard library support for chrono. Some standard libraries (such as the // libstdc++ shipped with gcc 4.6) provide monotonic_clock as per early C++0x // drafts, rather than the eventually standardised name of steady_clock. #if !defined(NET_TS_HAS_STD_CHRONO) # if !defined(NET_TS_DISABLE_STD_CHRONO) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_CHRONO 1 # elif (__cplusplus >= 201103) # if __has_include(<chrono>) # define NET_TS_HAS_STD_CHRONO 1 # endif // __has_include(<chrono>) # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_CHRONO 1 # if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6)) # define NET_TS_HAS_STD_CHRONO_MONOTONIC_CLOCK 1 # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6)) # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_CHRONO 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_CHRONO) #endif // !defined(NET_TS_HAS_STD_CHRONO) // Boost support for chrono. #if !defined(NET_TS_HAS_BOOST_CHRONO) # if !defined(NET_TS_DISABLE_BOOST_CHRONO) # if (BOOST_VERSION >= 104700) # define NET_TS_HAS_BOOST_CHRONO 1 # endif // (BOOST_VERSION >= 104700) # endif // !defined(NET_TS_DISABLE_BOOST_CHRONO) #endif // !defined(NET_TS_HAS_BOOST_CHRONO) // Some form of chrono library is available. #if !defined(NET_TS_HAS_CHRONO) # if defined(NET_TS_HAS_STD_CHRONO) \ || defined(NET_TS_HAS_BOOST_CHRONO) # define NET_TS_HAS_CHRONO 1 # endif // defined(NET_TS_HAS_STD_CHRONO) // || defined(NET_TS_HAS_BOOST_CHRONO) #endif // !defined(NET_TS_HAS_CHRONO) // Boost support for the DateTime library. #if !defined(NET_TS_HAS_BOOST_DATE_TIME) # if !defined(NET_TS_DISABLE_BOOST_DATE_TIME) # define NET_TS_HAS_BOOST_DATE_TIME 1 # endif // !defined(NET_TS_DISABLE_BOOST_DATE_TIME) #endif // !defined(NET_TS_HAS_BOOST_DATE_TIME) // Standard library support for addressof. #if !defined(NET_TS_HAS_STD_ADDRESSOF) # if !defined(NET_TS_DISABLE_STD_ADDRESSOF) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_ADDRESSOF 1 # elif (__cplusplus >= 201103) # define NET_TS_HAS_STD_ADDRESSOF 1 # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_ADDRESSOF 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_ADDRESSOF 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_ADDRESSOF) #endif // !defined(NET_TS_HAS_STD_ADDRESSOF) // Standard library support for the function class. #if !defined(NET_TS_HAS_STD_FUNCTION) # if !defined(NET_TS_DISABLE_STD_FUNCTION) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_FUNCTION 1 # elif (__cplusplus >= 201103) # define NET_TS_HAS_STD_FUNCTION 1 # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_FUNCTION 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_FUNCTION 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_FUNCTION) #endif // !defined(NET_TS_HAS_STD_FUNCTION) // Standard library support for type traits. #if !defined(NET_TS_HAS_STD_TYPE_TRAITS) # if !defined(NET_TS_DISABLE_STD_TYPE_TRAITS) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_TYPE_TRAITS 1 # elif (__cplusplus >= 201103) # if __has_include(<type_traits>) # define NET_TS_HAS_STD_TYPE_TRAITS 1 # endif // __has_include(<type_traits>) # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_TYPE_TRAITS 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_TYPE_TRAITS 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_TYPE_TRAITS) #endif // !defined(NET_TS_HAS_STD_TYPE_TRAITS) // Standard library support for the nullptr_t type. #if !defined(NET_TS_HAS_NULLPTR) # if !defined(NET_TS_DISABLE_NULLPTR) # if defined(__clang__) # if __has_feature(__cxx_nullptr__) # define NET_TS_HAS_NULLPTR 1 # endif // __has_feature(__cxx_rvalue_references__) # elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_NULLPTR 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_NULLPTR 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_NULLPTR) #endif // !defined(NET_TS_HAS_NULLPTR) // Standard library support for the C++11 allocator additions. #if !defined(NET_TS_HAS_CXX11_ALLOCATORS) # if !defined(NET_TS_DISABLE_CXX11_ALLOCATORS) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_CXX11_ALLOCATORS 1 # elif (__cplusplus >= 201103) # define NET_TS_HAS_CXX11_ALLOCATORS 1 # endif // (__cplusplus >= 201103) # elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_CXX11_ALLOCATORS 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1800) # define NET_TS_HAS_CXX11_ALLOCATORS 1 # endif // (_MSC_VER >= 1800) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_CXX11_ALLOCATORS) #endif // !defined(NET_TS_HAS_CXX11_ALLOCATORS) // Standard library support for the cstdint header. #if !defined(NET_TS_HAS_CSTDINT) # if !defined(NET_TS_DISABLE_CSTDINT) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_CSTDINT 1 # elif (__cplusplus >= 201103) # define NET_TS_HAS_CSTDINT 1 # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_CSTDINT 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_CSTDINT 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_CSTDINT) #endif // !defined(NET_TS_HAS_CSTDINT) // Standard library support for the thread class. #if !defined(NET_TS_HAS_STD_THREAD) # if !defined(NET_TS_DISABLE_STD_THREAD) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_THREAD 1 # elif (__cplusplus >= 201103) # if __has_include(<thread>) # define NET_TS_HAS_STD_THREAD 1 # endif // __has_include(<thread>) # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_THREAD 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_THREAD 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_THREAD) #endif // !defined(NET_TS_HAS_STD_THREAD) // Standard library support for the mutex and condition variable classes. #if !defined(NET_TS_HAS_STD_MUTEX_AND_CONDVAR) # if !defined(NET_TS_DISABLE_STD_MUTEX_AND_CONDVAR) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_MUTEX_AND_CONDVAR 1 # elif (__cplusplus >= 201103) # if __has_include(<mutex>) # define NET_TS_HAS_STD_MUTEX_AND_CONDVAR 1 # endif // __has_include(<mutex>) # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_MUTEX_AND_CONDVAR 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_MUTEX_AND_CONDVAR 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_MUTEX_AND_CONDVAR) #endif // !defined(NET_TS_HAS_STD_MUTEX_AND_CONDVAR) // Standard library support for the call_once function. #if !defined(NET_TS_HAS_STD_CALL_ONCE) # if !defined(NET_TS_DISABLE_STD_CALL_ONCE) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_CALL_ONCE 1 # elif (__cplusplus >= 201103) # if __has_include(<mutex>) # define NET_TS_HAS_STD_CALL_ONCE 1 # endif // __has_include(<mutex>) # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_CALL_ONCE 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_CALL_ONCE 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_CALL_ONCE) #endif // !defined(NET_TS_HAS_STD_CALL_ONCE) // Standard library support for futures. #if !defined(NET_TS_HAS_STD_FUTURE) # if !defined(NET_TS_DISABLE_STD_FUTURE) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # define NET_TS_HAS_STD_FUTURE 1 # elif (__cplusplus >= 201103) # if __has_include(<future>) # define NET_TS_HAS_STD_FUTURE 1 # endif // __has_include(<mutex>) # endif // (__cplusplus >= 201103) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_FUTURE 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_FUTURE 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_FUTURE) #endif // !defined(NET_TS_HAS_STD_FUTURE) // Standard library support for std::string_view. #if !defined(NET_TS_HAS_STD_STRING_VIEW) # if !defined(NET_TS_DISABLE_STD_STRING_VIEW) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # if (__cplusplus >= 201402) # if __has_include(<string_view>) # define NET_TS_HAS_STD_STRING_VIEW 1 # endif // __has_include(<string_view>) # endif // (__cplusplus >= 201402) # else // defined(NET_TS_HAS_CLANG_LIBCXX) # if (__cplusplus >= 201703) # if __has_include(<string_view>) # define NET_TS_HAS_STD_STRING_VIEW 1 # endif // __has_include(<string_view>) # endif // (__cplusplus >= 201703) # endif // defined(NET_TS_HAS_CLANG_LIBCXX) # elif defined(__GNUC__) # if (__GNUC__ >= 7) # if (__cplusplus >= 201703) # define NET_TS_HAS_STD_STRING_VIEW 1 # endif // (__cplusplus >= 201703) # endif // (__GNUC__ >= 7) # elif defined(NET_TS_MSVC) # if (_MSC_VER >= 1910 && _MSVC_LANG >= 201703) # define NET_TS_HAS_STD_STRING_VIEW 1 # endif // (_MSC_VER >= 1910 && _MSVC_LANG >= 201703) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_STRING_VIEW) #endif // !defined(NET_TS_HAS_STD_STRING_VIEW) // Standard library support for std::experimental::string_view. #if !defined(NET_TS_HAS_STD_EXPERIMENTAL_STRING_VIEW) # if !defined(NET_TS_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) # if defined(__clang__) # if defined(NET_TS_HAS_CLANG_LIBCXX) # if (_LIBCPP_VERSION < 7000) # if (__cplusplus >= 201402) # if __has_include(<experimental/string_view>) # define NET_TS_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 # endif // __has_include(<experimental/string_view>) # endif // (__cplusplus >= 201402) # endif // (_LIBCPP_VERSION < 7000) # else // defined(NET_TS_HAS_CLANG_LIBCXX) # if (__cplusplus >= 201402) # if __has_include(<experimental/string_view>) # define NET_TS_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 # endif // __has_include(<experimental/string_view>) # endif // (__cplusplus >= 201402) # endif // // defined(NET_TS_HAS_CLANG_LIBCXX) # endif // defined(__clang__) # if defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) # if (__cplusplus >= 201402) # define NET_TS_HAS_STD_EXPERIMENTAL_STRING_VIEW 1 # endif // (__cplusplus >= 201402) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4) # endif // defined(__GNUC__) # endif // !defined(NET_TS_DISABLE_STD_EXPERIMENTAL_STRING_VIEW) #endif // !defined(NET_TS_HAS_STD_EXPERIMENTAL_STRING_VIEW) // Standard library has a string_view that we can use. #if !defined(NET_TS_HAS_STRING_VIEW) # if !defined(NET_TS_DISABLE_STRING_VIEW) # if defined(NET_TS_HAS_STD_STRING_VIEW) # define NET_TS_HAS_STRING_VIEW 1 # elif defined(NET_TS_HAS_STD_EXPERIMENTAL_STRING_VIEW) # define NET_TS_HAS_STRING_VIEW 1 # endif // defined(NET_TS_HAS_STD_EXPERIMENTAL_STRING_VIEW) # endif // !defined(NET_TS_DISABLE_STRING_VIEW) #endif // !defined(NET_TS_HAS_STRING_VIEW) // Standard library support for iostream move construction and assignment. #if !defined(NET_TS_HAS_STD_IOSTREAM_MOVE) # if !defined(NET_TS_DISABLE_STD_IOSTREAM_MOVE) # if defined(__GNUC__) # if (__GNUC__ > 4) # if defined(__GXX_EXPERIMENTAL_CXX0X__) # define NET_TS_HAS_STD_IOSTREAM_MOVE 1 # endif // defined(__GXX_EXPERIMENTAL_CXX0X__) # endif // (__GNUC__ > 4) # endif // defined(__GNUC__) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1700) # define NET_TS_HAS_STD_IOSTREAM_MOVE 1 # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_IOSTREAM_MOVE) #endif // !defined(NET_TS_HAS_STD_IOSTREAM_MOVE) // Standard library has invoke_result (which supersedes result_of). #if !defined(NET_TS_HAS_STD_INVOKE_RESULT) # if !defined(NET_TS_DISABLE_STD_INVOKE_RESULT) # if defined(NET_TS_MSVC) # if (_MSC_VER >= 1911 && _MSVC_LANG >= 201703) # define NET_TS_HAS_STD_INVOKE_RESULT 1 # endif // (_MSC_VER >= 1911 && _MSVC_LANG >= 201703) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_STD_INVOKE_RESULT) #endif // !defined(NET_TS_HAS_STD_INVOKE_RESULT) // Windows App target. Windows but with a limited API. #if !defined(NET_TS_WINDOWS_APP) # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603) # include <winapifamily.h> # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \ && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # define NET_TS_WINDOWS_APP 1 # endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603) #endif // !defined(NET_TS_WINDOWS_APP) // Legacy WinRT target. Windows App is preferred. #if !defined(NET_TS_WINDOWS_RUNTIME) # if !defined(NET_TS_WINDOWS_APP) # if defined(__cplusplus_winrt) # include <winapifamily.h> # if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \ && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # define NET_TS_WINDOWS_RUNTIME 1 # endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) # endif // defined(__cplusplus_winrt) # endif // !defined(NET_TS_WINDOWS_APP) #endif // !defined(NET_TS_WINDOWS_RUNTIME) // Windows target. Excludes WinRT but includes Windows App targets. #if !defined(NET_TS_WINDOWS) # if !defined(NET_TS_WINDOWS_RUNTIME) # if defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS) # define NET_TS_WINDOWS 1 # elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) # define NET_TS_WINDOWS 1 # elif defined(NET_TS_WINDOWS_APP) # define NET_TS_WINDOWS 1 # endif // defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS) # endif // !defined(NET_TS_WINDOWS_RUNTIME) #endif // !defined(NET_TS_WINDOWS) // Windows: target OS version. #if defined(NET_TS_WINDOWS) || defined(__CYGWIN__) # if !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS) # if defined(_MSC_VER) || defined(__BORLANDC__) # pragma message( \ "Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:\n"\ "- add -D_WIN32_WINNT=0x0501 to the compiler command line; or\n"\ "- add _WIN32_WINNT=0x0501 to your project's Preprocessor Definitions.\n"\ "Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).") # else // defined(_MSC_VER) || defined(__BORLANDC__) # warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. # warning For example, add -D_WIN32_WINNT=0x0501 to the compiler command line. # warning Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target). # endif // defined(_MSC_VER) || defined(__BORLANDC__) # define _WIN32_WINNT 0x0501 # endif // !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS) # if defined(_MSC_VER) # if defined(_WIN32) && !defined(WIN32) # if !defined(_WINSOCK2API_) # define WIN32 // Needed for correct types in winsock2.h # else // !defined(_WINSOCK2API_) # error Please define the macro WIN32 in your compiler options # endif // !defined(_WINSOCK2API_) # endif // defined(_WIN32) && !defined(WIN32) # endif // defined(_MSC_VER) # if defined(__BORLANDC__) # if defined(__WIN32__) && !defined(WIN32) # if !defined(_WINSOCK2API_) # define WIN32 // Needed for correct types in winsock2.h # else // !defined(_WINSOCK2API_) # error Please define the macro WIN32 in your compiler options # endif // !defined(_WINSOCK2API_) # endif // defined(__WIN32__) && !defined(WIN32) # endif // defined(__BORLANDC__) # if defined(__CYGWIN__) # if !defined(__USE_W32_SOCKETS) # error You must add -D__USE_W32_SOCKETS to your compiler options. # endif // !defined(__USE_W32_SOCKETS) # endif // defined(__CYGWIN__) #endif // defined(NET_TS_WINDOWS) || defined(__CYGWIN__) // Windows: minimise header inclusion. #if defined(NET_TS_WINDOWS) || defined(__CYGWIN__) # if !defined(NET_TS_NO_WIN32_LEAN_AND_MEAN) # if !defined(WIN32_LEAN_AND_MEAN) # define WIN32_LEAN_AND_MEAN # endif // !defined(WIN32_LEAN_AND_MEAN) # endif // !defined(NET_TS_NO_WIN32_LEAN_AND_MEAN) #endif // defined(NET_TS_WINDOWS) || defined(__CYGWIN__) // Windows: suppress definition of "min" and "max" macros. #if defined(NET_TS_WINDOWS) || defined(__CYGWIN__) # if !defined(NET_TS_NO_NOMINMAX) # if !defined(NOMINMAX) # define NOMINMAX 1 # endif // !defined(NOMINMAX) # endif // !defined(NET_TS_NO_NOMINMAX) #endif // defined(NET_TS_WINDOWS) || defined(__CYGWIN__) // Windows: IO Completion Ports. #if !defined(NET_TS_HAS_IOCP) # if defined(NET_TS_WINDOWS) || defined(__CYGWIN__) # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400) # if !defined(UNDER_CE) && !defined(NET_TS_WINDOWS_APP) # if !defined(NET_TS_DISABLE_IOCP) # define NET_TS_HAS_IOCP 1 # endif // !defined(NET_TS_DISABLE_IOCP) # endif // !defined(UNDER_CE) && !defined(NET_TS_WINDOWS_APP) # endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400) # endif // defined(NET_TS_WINDOWS) || defined(__CYGWIN__) #endif // !defined(NET_TS_HAS_IOCP) // On POSIX (and POSIX-like) platforms we need to include unistd.h in order to // get access to the various platform feature macros, e.g. to be able to test // for threads support. #if !defined(NET_TS_HAS_UNISTD_H) # if !defined(NET_TS_HAS_BOOST_CONFIG) # if defined(unix) \ || defined(__unix) \ || defined(_XOPEN_SOURCE) \ || defined(_POSIX_SOURCE) \ || (defined(__MACH__) && defined(__APPLE__)) \ || defined(__FreeBSD__) \ || defined(__NetBSD__) \ || defined(__OpenBSD__) \ || defined(__linux__) # define NET_TS_HAS_UNISTD_H 1 # endif # endif // !defined(NET_TS_HAS_BOOST_CONFIG) #endif // !defined(NET_TS_HAS_UNISTD_H) #if defined(NET_TS_HAS_UNISTD_H) # include <unistd.h> #endif // defined(NET_TS_HAS_UNISTD_H) // Linux: epoll, eventfd and timerfd. #if defined(__linux__) # include <linux/version.h> # if !defined(NET_TS_HAS_EPOLL) # if !defined(NET_TS_DISABLE_EPOLL) # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45) # define NET_TS_HAS_EPOLL 1 # endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45) # endif // !defined(NET_TS_DISABLE_EPOLL) # endif // !defined(NET_TS_HAS_EPOLL) # if !defined(NET_TS_HAS_EVENTFD) # if !defined(NET_TS_DISABLE_EVENTFD) # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) # define NET_TS_HAS_EVENTFD 1 # endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) # endif // !defined(NET_TS_DISABLE_EVENTFD) # endif // !defined(NET_TS_HAS_EVENTFD) # if !defined(NET_TS_HAS_TIMERFD) # if defined(NET_TS_HAS_EPOLL) # if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) # define NET_TS_HAS_TIMERFD 1 # endif // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) # endif // defined(NET_TS_HAS_EPOLL) # endif // !defined(NET_TS_HAS_TIMERFD) #endif // defined(__linux__) // Mac OS X, FreeBSD, NetBSD, OpenBSD: kqueue. #if (defined(__MACH__) && defined(__APPLE__)) \ || defined(__FreeBSD__) \ || defined(__NetBSD__) \ || defined(__OpenBSD__) # if !defined(NET_TS_HAS_KQUEUE) # if !defined(NET_TS_DISABLE_KQUEUE) # define NET_TS_HAS_KQUEUE 1 # endif // !defined(NET_TS_DISABLE_KQUEUE) # endif // !defined(NET_TS_HAS_KQUEUE) #endif // (defined(__MACH__) && defined(__APPLE__)) // || defined(__FreeBSD__) // || defined(__NetBSD__) // || defined(__OpenBSD__) // Solaris: /dev/poll. #if defined(__sun) # if !defined(NET_TS_HAS_DEV_POLL) # if !defined(NET_TS_DISABLE_DEV_POLL) # define NET_TS_HAS_DEV_POLL 1 # endif // !defined(NET_TS_DISABLE_DEV_POLL) # endif // !defined(NET_TS_HAS_DEV_POLL) #endif // defined(__sun) // Serial ports. #if !defined(NET_TS_HAS_SERIAL_PORT) # if defined(NET_TS_HAS_IOCP) \ || !defined(NET_TS_WINDOWS) \ && !defined(NET_TS_WINDOWS_RUNTIME) \ && !defined(__CYGWIN__) # if !defined(__SYMBIAN32__) # if !defined(NET_TS_DISABLE_SERIAL_PORT) # define NET_TS_HAS_SERIAL_PORT 1 # endif // !defined(NET_TS_DISABLE_SERIAL_PORT) # endif // !defined(__SYMBIAN32__) # endif // defined(NET_TS_HAS_IOCP) // || !defined(NET_TS_WINDOWS) // && !defined(NET_TS_WINDOWS_RUNTIME) // && !defined(__CYGWIN__) #endif // !defined(NET_TS_HAS_SERIAL_PORT) // Windows: stream handles. #if !defined(NET_TS_HAS_WINDOWS_STREAM_HANDLE) # if !defined(NET_TS_DISABLE_WINDOWS_STREAM_HANDLE) # if defined(NET_TS_HAS_IOCP) # define NET_TS_HAS_WINDOWS_STREAM_HANDLE 1 # endif // defined(NET_TS_HAS_IOCP) # endif // !defined(NET_TS_DISABLE_WINDOWS_STREAM_HANDLE) #endif // !defined(NET_TS_HAS_WINDOWS_STREAM_HANDLE) // Windows: random access handles. #if !defined(NET_TS_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) # if !defined(NET_TS_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE) # if defined(NET_TS_HAS_IOCP) # define NET_TS_HAS_WINDOWS_RANDOM_ACCESS_HANDLE 1 # endif // defined(NET_TS_HAS_IOCP) # endif // !defined(NET_TS_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE) #endif // !defined(NET_TS_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) // Windows: object handles. #if !defined(NET_TS_HAS_WINDOWS_OBJECT_HANDLE) # if !defined(NET_TS_DISABLE_WINDOWS_OBJECT_HANDLE) # if defined(NET_TS_WINDOWS) || defined(__CYGWIN__) # if !defined(UNDER_CE) && !defined(NET_TS_WINDOWS_APP) # define NET_TS_HAS_WINDOWS_OBJECT_HANDLE 1 # endif // !defined(UNDER_CE) && !defined(NET_TS_WINDOWS_APP) # endif // defined(NET_TS_WINDOWS) || defined(__CYGWIN__) # endif // !defined(NET_TS_DISABLE_WINDOWS_OBJECT_HANDLE) #endif // !defined(NET_TS_HAS_WINDOWS_OBJECT_HANDLE) // Windows: OVERLAPPED wrapper. #if !defined(NET_TS_HAS_WINDOWS_OVERLAPPED_PTR) # if !defined(NET_TS_DISABLE_WINDOWS_OVERLAPPED_PTR) # if defined(NET_TS_HAS_IOCP) # define NET_TS_HAS_WINDOWS_OVERLAPPED_PTR 1 # endif // defined(NET_TS_HAS_IOCP) # endif // !defined(NET_TS_DISABLE_WINDOWS_OVERLAPPED_PTR) #endif // !defined(NET_TS_HAS_WINDOWS_OVERLAPPED_PTR) // POSIX: stream-oriented file descriptors. #if !defined(NET_TS_HAS_POSIX_STREAM_DESCRIPTOR) # if !defined(NET_TS_DISABLE_POSIX_STREAM_DESCRIPTOR) # if !defined(NET_TS_WINDOWS) \ && !defined(NET_TS_WINDOWS_RUNTIME) \ && !defined(__CYGWIN__) # define NET_TS_HAS_POSIX_STREAM_DESCRIPTOR 1 # endif // !defined(NET_TS_WINDOWS) // && !defined(NET_TS_WINDOWS_RUNTIME) // && !defined(__CYGWIN__) # endif // !defined(NET_TS_DISABLE_POSIX_STREAM_DESCRIPTOR) #endif // !defined(NET_TS_HAS_POSIX_STREAM_DESCRIPTOR) // UNIX domain sockets. #if !defined(NET_TS_HAS_LOCAL_SOCKETS) # if !defined(NET_TS_DISABLE_LOCAL_SOCKETS) # if !defined(NET_TS_WINDOWS) \ && !defined(NET_TS_WINDOWS_RUNTIME) \ && !defined(__CYGWIN__) # define NET_TS_HAS_LOCAL_SOCKETS 1 # endif // !defined(NET_TS_WINDOWS) // && !defined(NET_TS_WINDOWS_RUNTIME) // && !defined(__CYGWIN__) # endif // !defined(NET_TS_DISABLE_LOCAL_SOCKETS) #endif // !defined(NET_TS_HAS_LOCAL_SOCKETS) // Can use sigaction() instead of signal(). #if !defined(NET_TS_HAS_SIGACTION) # if !defined(NET_TS_DISABLE_SIGACTION) # if !defined(NET_TS_WINDOWS) \ && !defined(NET_TS_WINDOWS_RUNTIME) \ && !defined(__CYGWIN__) # define NET_TS_HAS_SIGACTION 1 # endif // !defined(NET_TS_WINDOWS) // && !defined(NET_TS_WINDOWS_RUNTIME) // && !defined(__CYGWIN__) # endif // !defined(NET_TS_DISABLE_SIGACTION) #endif // !defined(NET_TS_HAS_SIGACTION) // Can use signal(). #if !defined(NET_TS_HAS_SIGNAL) # if !defined(NET_TS_DISABLE_SIGNAL) # if !defined(UNDER_CE) # define NET_TS_HAS_SIGNAL 1 # endif // !defined(UNDER_CE) # endif // !defined(NET_TS_DISABLE_SIGNAL) #endif // !defined(NET_TS_HAS_SIGNAL) // Can use getaddrinfo() and getnameinfo(). #if !defined(NET_TS_HAS_GETADDRINFO) # if !defined(NET_TS_DISABLE_GETADDRINFO) # if defined(NET_TS_WINDOWS) || defined(__CYGWIN__) # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501) # define NET_TS_HAS_GETADDRINFO 1 # elif defined(UNDER_CE) # define NET_TS_HAS_GETADDRINFO 1 # endif // defined(UNDER_CE) # elif defined(__MACH__) && defined(__APPLE__) # if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) # if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050) # define NET_TS_HAS_GETADDRINFO 1 # endif // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050) # else // defined(__MAC_OS_X_VERSION_MIN_REQUIRED) # define NET_TS_HAS_GETADDRINFO 1 # endif // defined(__MAC_OS_X_VERSION_MIN_REQUIRED) # else // defined(__MACH__) && defined(__APPLE__) # define NET_TS_HAS_GETADDRINFO 1 # endif // defined(__MACH__) && defined(__APPLE__) # endif // !defined(NET_TS_DISABLE_GETADDRINFO) #endif // !defined(NET_TS_HAS_GETADDRINFO) // Whether standard iostreams are disabled. #if !defined(NET_TS_NO_IOSTREAM) # if defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_NO_IOSTREAM) # define NET_TS_NO_IOSTREAM 1 # endif // !defined(BOOST_NO_IOSTREAM) #endif // !defined(NET_TS_NO_IOSTREAM) // Whether exception handling is disabled. #if !defined(NET_TS_NO_EXCEPTIONS) # if defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_NO_EXCEPTIONS) # define NET_TS_NO_EXCEPTIONS 1 # endif // !defined(BOOST_NO_EXCEPTIONS) #endif // !defined(NET_TS_NO_EXCEPTIONS) // Whether the typeid operator is supported. #if !defined(NET_TS_NO_TYPEID) # if defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_NO_TYPEID) # define NET_TS_NO_TYPEID 1 # endif // !defined(BOOST_NO_TYPEID) #endif // !defined(NET_TS_NO_TYPEID) // Threads. #if !defined(NET_TS_HAS_THREADS) # if !defined(NET_TS_DISABLE_THREADS) # if defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS) # define NET_TS_HAS_THREADS 1 # elif defined(__GNUC__) && !defined(__MINGW32__) \ && !defined(linux) && !defined(__linux) && !defined(__linux__) # define NET_TS_HAS_THREADS 1 # elif defined(_MT) || defined(__MT__) # define NET_TS_HAS_THREADS 1 # elif defined(_REENTRANT) # define NET_TS_HAS_THREADS 1 # elif defined(__APPLE__) # define NET_TS_HAS_THREADS 1 # elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) # define NET_TS_HAS_THREADS 1 # elif defined(_PTHREADS) # define NET_TS_HAS_THREADS 1 # endif // defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS) # endif // !defined(NET_TS_DISABLE_THREADS) #endif // !defined(NET_TS_HAS_THREADS) // POSIX threads. #if !defined(NET_TS_HAS_PTHREADS) # if defined(NET_TS_HAS_THREADS) # if defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS) # define NET_TS_HAS_PTHREADS 1 # elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) # define NET_TS_HAS_PTHREADS 1 # endif // defined(NET_TS_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS) # endif // defined(NET_TS_HAS_THREADS) #endif // !defined(NET_TS_HAS_PTHREADS) // Helper to prevent macro expansion. #define NET_TS_PREVENT_MACRO_SUBSTITUTION // Helper to define in-class constants. #if !defined(NET_TS_STATIC_CONSTANT) # if !defined(NET_TS_DISABLE_BOOST_STATIC_CONSTANT) # define NET_TS_STATIC_CONSTANT(type, assignment) \ BOOST_STATIC_CONSTANT(type, assignment) # else // !defined(NET_TS_DISABLE_BOOST_STATIC_CONSTANT) # define NET_TS_STATIC_CONSTANT(type, assignment) \ static const type assignment # endif // !defined(NET_TS_DISABLE_BOOST_STATIC_CONSTANT) #endif // !defined(NET_TS_STATIC_CONSTANT) // Boost array library. #if !defined(NET_TS_HAS_BOOST_ARRAY) # if !defined(NET_TS_DISABLE_BOOST_ARRAY) # define NET_TS_HAS_BOOST_ARRAY 1 # endif // !defined(NET_TS_DISABLE_BOOST_ARRAY) #endif // !defined(NET_TS_HAS_BOOST_ARRAY) // Boost assert macro. #if !defined(NET_TS_HAS_BOOST_ASSERT) # if !defined(NET_TS_DISABLE_BOOST_ASSERT) # define NET_TS_HAS_BOOST_ASSERT 1 # endif // !defined(NET_TS_DISABLE_BOOST_ASSERT) #endif // !defined(NET_TS_HAS_BOOST_ASSERT) // Boost limits header. #if !defined(NET_TS_HAS_BOOST_LIMITS) # if !defined(NET_TS_DISABLE_BOOST_LIMITS) # define NET_TS_HAS_BOOST_LIMITS 1 # endif // !defined(NET_TS_DISABLE_BOOST_LIMITS) #endif // !defined(NET_TS_HAS_BOOST_LIMITS) // Boost throw_exception function. #if !defined(NET_TS_HAS_BOOST_THROW_EXCEPTION) # if !defined(NET_TS_DISABLE_BOOST_THROW_EXCEPTION) # define NET_TS_HAS_BOOST_THROW_EXCEPTION 1 # endif // !defined(NET_TS_DISABLE_BOOST_THROW_EXCEPTION) #endif // !defined(NET_TS_HAS_BOOST_THROW_EXCEPTION) // Boost regex library. #if !defined(NET_TS_HAS_BOOST_REGEX) # if !defined(NET_TS_DISABLE_BOOST_REGEX) # define NET_TS_HAS_BOOST_REGEX 1 # endif // !defined(NET_TS_DISABLE_BOOST_REGEX) #endif // !defined(NET_TS_HAS_BOOST_REGEX) // Boost bind function. #if !defined(NET_TS_HAS_BOOST_BIND) # if !defined(NET_TS_DISABLE_BOOST_BIND) # define NET_TS_HAS_BOOST_BIND 1 # endif // !defined(NET_TS_DISABLE_BOOST_BIND) #endif // !defined(NET_TS_HAS_BOOST_BIND) // Boost's BOOST_WORKAROUND macro. #if !defined(NET_TS_HAS_BOOST_WORKAROUND) # if !defined(NET_TS_DISABLE_BOOST_WORKAROUND) # define NET_TS_HAS_BOOST_WORKAROUND 1 # endif // !defined(NET_TS_DISABLE_BOOST_WORKAROUND) #endif // !defined(NET_TS_HAS_BOOST_WORKAROUND) // Microsoft Visual C++'s secure C runtime library. #if !defined(NET_TS_HAS_SECURE_RTL) # if !defined(NET_TS_DISABLE_SECURE_RTL) # if defined(NET_TS_MSVC) \ && (NET_TS_MSVC >= 1400) \ && !defined(UNDER_CE) # define NET_TS_HAS_SECURE_RTL 1 # endif // defined(NET_TS_MSVC) // && (NET_TS_MSVC >= 1400) // && !defined(UNDER_CE) # endif // !defined(NET_TS_DISABLE_SECURE_RTL) #endif // !defined(NET_TS_HAS_SECURE_RTL) // Handler hooking. Disabled for ancient Borland C++ and gcc compilers. #if !defined(NET_TS_HAS_HANDLER_HOOKS) # if !defined(NET_TS_DISABLE_HANDLER_HOOKS) # if defined(__GNUC__) # if (__GNUC__ >= 3) # define NET_TS_HAS_HANDLER_HOOKS 1 # endif // (__GNUC__ >= 3) # elif !defined(__BORLANDC__) # define NET_TS_HAS_HANDLER_HOOKS 1 # endif // !defined(__BORLANDC__) # endif // !defined(NET_TS_DISABLE_HANDLER_HOOKS) #endif // !defined(NET_TS_HAS_HANDLER_HOOKS) // Support for the __thread keyword extension. #if !defined(NET_TS_DISABLE_THREAD_KEYWORD_EXTENSION) # if defined(__linux__) # if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) # if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3) # if !defined(__INTEL_COMPILER) && !defined(__ICL) \ && !(defined(__clang__) && defined(__ANDROID__)) # define NET_TS_HAS_THREAD_KEYWORD_EXTENSION 1 # define NET_TS_THREAD_KEYWORD __thread # elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100) # define NET_TS_HAS_THREAD_KEYWORD_EXTENSION 1 # endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100) // && !(defined(__clang__) && defined(__ANDROID__)) # endif // ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3) # endif // defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) # endif // defined(__linux__) # if defined(NET_TS_MSVC) && defined(NET_TS_WINDOWS_RUNTIME) # if (_MSC_VER >= 1700) # define NET_TS_HAS_THREAD_KEYWORD_EXTENSION 1 # define NET_TS_THREAD_KEYWORD __declspec(thread) # endif // (_MSC_VER >= 1700) # endif // defined(NET_TS_MSVC) && defined(NET_TS_WINDOWS_RUNTIME) #endif // !defined(NET_TS_DISABLE_THREAD_KEYWORD_EXTENSION) #if !defined(NET_TS_THREAD_KEYWORD) # define NET_TS_THREAD_KEYWORD __thread #endif // !defined(NET_TS_THREAD_KEYWORD) // Support for POSIX ssize_t typedef. #if !defined(NET_TS_DISABLE_SSIZE_T) # if defined(__linux__) \ || (defined(__MACH__) && defined(__APPLE__)) # define NET_TS_HAS_SSIZE_T 1 # endif // defined(__linux__) // || (defined(__MACH__) && defined(__APPLE__)) #endif // !defined(NET_TS_DISABLE_SSIZE_T) // Helper macros to manage the transition away from the old services-based API. #define NET_TS_SVC_TPARAM #define NET_TS_SVC_TPARAM_DEF1(d1) #define NET_TS_SVC_TPARAM_DEF2(d1, d2) #define NET_TS_SVC_TARG // NET_TS_SVC_T is defined at each point of use. #define NET_TS_SVC_TPARAM1 #define NET_TS_SVC_TPARAM1_DEF1(d1) #define NET_TS_SVC_TPARAM1_DEF2(d1, d2) #define NET_TS_SVC_TARG1 // NET_TS_SVC_T1 is defined at each point of use. #define NET_TS_SVC_ACCESS protected // Helper macros to manage transition away from error_code return values. #define NET_TS_SYNC_OP_VOID void #define NET_TS_SYNC_OP_VOID_RETURN(e) return // Newer gcc, clang need special treatment to suppress unused typedef warnings. #if defined(__clang__) # if defined(__apple_build_version__) # if (__clang_major__ >= 7) # define NET_TS_UNUSED_TYPEDEF __attribute__((__unused__)) # endif // (__clang_major__ >= 7) # elif ((__clang_major__ == 3) && (__clang_minor__ >= 6)) \ || (__clang_major__ > 3) # define NET_TS_UNUSED_TYPEDEF __attribute__((__unused__)) # endif // ((__clang_major__ == 3) && (__clang_minor__ >= 6)) // || (__clang_major__ > 3) #elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) # define NET_TS_UNUSED_TYPEDEF __attribute__((__unused__)) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) #endif // defined(__GNUC__) #if !defined(NET_TS_UNUSED_TYPEDEF) # define NET_TS_UNUSED_TYPEDEF #endif // !defined(NET_TS_UNUSED_TYPEDEF) // Some versions of gcc generate spurious warnings about unused variables. #if defined(__GNUC__) # if (__GNUC__ >= 4) # define NET_TS_UNUSED_VARIABLE __attribute__((__unused__)) # endif // (__GNUC__ >= 4) #endif // defined(__GNUC__) #if !defined(NET_TS_UNUSED_VARIABLE) # define NET_TS_UNUSED_VARIABLE #endif // !defined(NET_TS_UNUSED_VARIABLE) // Support co_await on compilers known to allow it. #if !defined(NET_TS_HAS_CO_AWAIT) # if !defined(NET_TS_DISABLE_CO_AWAIT) # if defined(NET_TS_MSVC) # if (_MSC_FULL_VER >= 190023506) # if defined(_RESUMABLE_FUNCTIONS_SUPPORTED) # define NET_TS_HAS_CO_AWAIT 1 # endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED) # endif // (_MSC_FULL_VER >= 190023506) # endif // defined(NET_TS_MSVC) # endif // !defined(NET_TS_DISABLE_CO_AWAIT) # if defined(__clang__) # if (__cpp_coroutines >= 201703) # if __has_include(<experimental/coroutine>) # define NET_TS_HAS_CO_AWAIT 1 # endif // __has_include(<experimental/coroutine>) # endif // (__cpp_coroutines >= 201703) # endif // defined(__clang__) #endif // !defined(NET_TS_HAS_CO_AWAIT) #endif // NET_TS_DETAIL_CONFIG_HPP
{'repo_name': 'chriskohlhoff/networking-ts-impl', 'stars': '197', 'repo_language': 'C++', 'file_name': 'endpoint.ipp', 'mime_type': 'text/x-c++', 'hash': 8737622219930738036, 'source_dataset': 'data'}
<% content_for :full_page_content do %> <%= react_component("inbox", props: { userDisplayName: current_user.display_name, dropdownUrls: dropdown_urls, feedbackUrl: feedback_url, buildDate: build_date, flash: flash, inbox: { messages: messages, pagination: pagination } }) %> <% end %>
{'repo_name': 'department-of-veterans-affairs/caseflow', 'stars': '101', 'repo_language': 'Ruby', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -7854718003675944319, 'source_dataset': 'data'}
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. #if NETFX_CORE // This file should only be included by the NetCore version of the formatting project, but adding a guard here just in case. using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace System.Net.Http.Internal { // TODO: Remove this class after BCL makes their portable library version. internal sealed class ConcurrentDictionary<TKey, TValue> : IDictionary<TKey, TValue> { private Dictionary<TKey, TValue> _dictionary = new Dictionary<TKey, TValue>(); private object _lock = new object(); public ICollection<TKey> Keys { get { throw new NotImplementedException(); } } public ICollection<TValue> Values { get { throw new NotImplementedException(); } } public int Count { get { throw new NotImplementedException(); } } public bool IsReadOnly { get { return ((IDictionary)_dictionary).IsReadOnly; } } public TValue this[TKey key] { get { throw new NotImplementedException(); } set { throw new NotImplementedException(); } } public void Add(TKey key, TValue value) { throw new NotImplementedException(); } public bool ContainsKey(TKey key) { lock (_lock) { return _dictionary.ContainsKey(key); } } public bool Remove(TKey key) { throw new NotImplementedException(); } public bool TryGetValue(TKey key, out TValue value) { lock (_lock) { return _dictionary.TryGetValue(key, out value); } } public void Add(KeyValuePair<TKey, TValue> item) { throw new NotImplementedException(); } public void Clear() { throw new NotImplementedException(); } public bool Contains(KeyValuePair<TKey, TValue> item) { throw new NotImplementedException(); } public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) { throw new NotImplementedException(); } public bool Remove(KeyValuePair<TKey, TValue> item) { throw new NotImplementedException(); } public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() { throw new NotImplementedException(); } IEnumerator IEnumerable.GetEnumerator() { throw new NotImplementedException(); } // ConcurrentDictionary members public bool TryRemove(TKey key, out TValue removedValue) { lock (_lock) { if (_dictionary.TryGetValue(key, out removedValue)) { return _dictionary.Remove(key); } return false; } } public TValue GetOrAdd(TKey key, Func<TKey, TValue> addValueFactory) { lock (_lock) { TValue value; if (!_dictionary.TryGetValue(key, out value)) { value = addValueFactory.Invoke(key); _dictionary.Add(key, value); } return value; } } public bool TryAdd(TKey key, TValue value) { lock (_lock) { if (_dictionary.ContainsKey(key)) { return false; } _dictionary.Add(key, value); return true; } } public TValue AddOrUpdate(TKey key, TValue addValue, Func<TKey, TValue, TValue> updateValueFactory) { lock (_lock) { TValue value; // update if (_dictionary.TryGetValue(key, out value)) { value = updateValueFactory.Invoke(key, value); _dictionary[key] = value; return value; } // add _dictionary.Add(key, addValue); return addValue; } } } } #endif
{'repo_name': 'aspnet/AspNetWebStack', 'stars': '607', 'repo_language': 'C#', 'file_name': 'DefaultExceptionHandlerTests.cs', 'mime_type': 'text/plain', 'hash': 7723157684174438343, 'source_dataset': 'data'}
import gdb from clasp_inspect.interface import Interface from clasp_inspect.object_layout import * global_udb_interface = None class UdbInterface(Interface): def __init__(self,debugger,internal_dict,prefix): global global_Structs print "In clasp_inspect for gdb_interface" filename = "/tmp/clasp-layout.py" with open(filename, "rb") as source_file: code = compile(source_file.read(), filename, "exec") exec(code) SetupGlobals(self) def print(self,msg): print msg def read_memory(self,address,len): i = gdb.inferiors()[0] m = i.read_memory(address,len) return m def inspect(args): print "In inspect" # global global_lldb_interface # args = command.split(" ") # arg = args[0] # verbose = False # if (len(args)>1): # verbose = True # ptr = None # if (arg[0:2]=='$r'): # debugger.print("Handle register %s\n" % arg) # return # if (is_int(arg,16)): # tptr = int(arg,16) # elif (is_int(arg,10)): # tptr = int(arg,10) # else: # key = lldb.frame.FindVariable(arg) # if (verbose): debugger.print("arg = %s" % key) # theObject = key.GetChildMemberWithName("theObject") # # theObject.GetValue() returns a string - why? dunno # if (verbose): debugger.print("theObject.GetValue() = %s" % theObject.GetValue()) # tptr = int(theObject.GetValue(),16) # print_tagged_ptr(global_lldb_interface,verbose,tptr,toplevel=True) def do_udb_init_module(): global global_lldb_interface prefix = "%s.clasp_inspect.lldb_interface" % prefix print("In do_lldb_init_module") print("installing %s.inspect" % prefix) debugger.HandleCommand('command script add -f %s.inspect il' % prefix) global_lldb_interface = UdbInterface(debugger,internal_dict,prefix) print("Leaving do_lldb_init_module")
{'repo_name': 'clasp-developers/clasp', 'stars': '1695', 'repo_language': 'C++', 'file_name': 'ecl_Copyright', 'mime_type': 'text/plain', 'hash': -2521983429230177011, 'source_dataset': 'data'}
package com.beepiz.bluetooth.gattcoroutines import android.annotation.SuppressLint import android.bluetooth.BluetoothDevice import android.bluetooth.BluetoothGatt import android.bluetooth.BluetoothGattDescriptor import android.bluetooth.BluetoothGattService import androidx.annotation.RequiresApi import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.ObsoleteCoroutinesApi import kotlinx.coroutines.channels.BroadcastChannel import kotlinx.coroutines.channels.ReceiveChannel import kotlinx.coroutines.withTimeout import java.util.UUID /** * The entry point of BluetoothGatt with coroutines. * * Create an instance by passing a Low Energy compatible [BluetoothDevice], then * call [connect] when you need to perform operations, perform your operations, and when you're * done, call [close] or [disconnect]. * * All the functions of this interface can throw one of the following exceptions: * - [ConnectionClosedException] * - [GattException] (either [OperationFailedException] or [OperationInitiationFailedException]) * * You should catch them and react appropriately (fixing your code, fixing the device if you can, * closing the connection and retrying (with linear/exponential backoff), and/or inform the user, * allowing manual retry if appropriate and/or cancel. * * Note that [discoverServices] is usually the first call you want to make after calling [connect]. * * The default implementation of this interface can be instantiated with the [invoke] operator * function. * * **For production apps, see [stateChangeChannel].** */ @ExperimentalBleGattCoroutinesCoroutinesApi interface GattConnection { companion object { @RequiresApi(18) @ExperimentalCoroutinesApi @ObsoleteCoroutinesApi operator fun invoke( bluetoothDevice: BluetoothDevice, connectionSettings: ConnectionSettings = ConnectionSettings() ): GattConnection = GattConnectionImpl(bluetoothDevice, connectionSettings) /** * The characteristic used to enable notifications on the remote device in the * [setCharacteristicNotificationsEnabledOnRemoteDevice] function. * * Sources: * - [Android sample](https://github.com/googlesamples/android-BluetoothLeGatt/blob/74c0006b9e87112d09bc6ed2cb3fcb51b07af4a4/Application/src/main/java/com/example/android/bluetoothlegatt/SampleGattAttributes.java#L27) * - [Official Bluetooth website](https://www.bluetooth.com/specifications/gatt/descriptors/) * (look for `0x2902` or "Client Characteristic Configuration") */ @JvmField val clientCharacteristicConfiguration: UUID = UUID.fromString("00002902-0000-1000-8000-00805f9b34fb") } @SuppressLint("InlinedApi") class ConnectionSettings( val autoConnect: Boolean = false, val allowAutoConnect: Boolean = autoConnect, val disconnectOnClose: Boolean = true, val transport: Int = BluetoothDevice.TRANSPORT_AUTO, val phy: Int = BluetoothDevice.PHY_LE_1M_MASK ) { init { if (autoConnect) require(allowAutoConnect) } } val bluetoothDevice: BluetoothDevice val isConnected: Boolean /** * Suspends until a connection is established with the target device, or throws if an error * happens. * * It is **strongly recommended** to wrap this call with [withTimeout] as this method may never * resume if the target device is not in range. A timeout of about 5 seconds is recommended. * * Note that after any timeout, it is **your responsibility to close this [GattConnection] * instance**. However, this may change in a future version of the library. * * **There's a max concurrent GATT connections** which is 4 on Android 4.3 and * 7 on Android 4.4+. Keep in mind the user may already have a few connected devices such * as a SmartWatch, that top notch Bluetooth headset, or whatever which count as GATT * connections too. Call [close] when you don't need the connection anymore, or [disconnect] * if you don't need the connection to stay active for some amount of time. */ suspend fun connect() /** * Suspends until the target device is disconnected, or throw if an error happens. * * Useful if you want to disconnect from the device for a relatively short time and connect * back later using this same instance. */ suspend fun disconnect() /** * No need to disconnect first if you call this method. * * This [GattConnection] instance is no longer usable after this has been called, and all * coroutines suspended on calls to this instance will receive a cancellation signal. */ fun close(notifyStateChangeChannel: Boolean = false) /** Reads the RSSI for a connected remote device */ suspend fun readRemoteRssi(): Int /** * Use this method only if needed, and do so carefully. * See [BluetoothGatt.requestConnectionPriority]. * * Accepted values are [BluetoothGatt.CONNECTION_PRIORITY_LOW_POWER], * [BluetoothGatt.CONNECTION_PRIORITY_BALANCED] (default) and * [BluetoothGatt.CONNECTION_PRIORITY_HIGH]. Read the documentation of the constant you use. * * Throws an [OperationInitiationFailedException] if the device is not connected. */ @RequiresApi(21) fun requestPriority(priority: Int) /** * This is usually the first call you make after calling [connect]. * * Discovers services offered by the remote device as well as its characteristics and * its descriptors. */ suspend fun discoverServices(): List<BluetoothGattService> /** * **Note:** You can use [openNotificationSubscription] that automatically calls this function * for you. * * Enable or disable notifications/indications for the passed [characteristic]. * Once notifications are enabled for a characteristic, the [notifyChannel] will receive updated * characteristic if the remote device indicates that is has changed. * * Note that **there is a concurrent active notifications limit**, which, according to * [this video](https://youtu.be/qx55Sa8UZAQ?t=28m30s) is **4 on Android 4.3**, * 7 on Android 4.4, and 15 on Android 5.0+. */ fun setCharacteristicNotificationsEnabled(characteristic: BGC, enable: Boolean) /** * Enables notifications for that [characteristic] client-side (you still need to enable it * on the remote device) and returns a [ReceiveChannel] that will get the notifications for that * characteristic only. * * By default, [disableNotificationsOnChannelClose] is true, and will cause the notifications * to be disabled client-side when the channel is closed/consumed. * * **IMPORTANT**: On most BLE devices, you'll need to enable notifications on the remote device * too. You can do so with the [setCharacteristicNotificationsEnabledOnRemoteDevice] function. * * You can enable notifications on the remote device before or after calling this function, both * ways, notifications will be able to arrive once enabling on remote device completes. */ fun openNotificationSubscription( characteristic: BGC, disableNotificationsOnChannelClose: Boolean = true ): ReceiveChannel<BGC> /** * Checks that the passed [characteristic] supports notifications (it should come from * [discoverServices]), and writes the [clientCharacteristicConfiguration] with * [BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE] if [enable] is true, or * [BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE] otherwise. * * If successful, notifications for that characteristic should be enabled on the remote device * and you can now receive them from [openNotificationSubscription] (or from [notifyChannel] if * you called [setCharacteristicNotificationsEnabled] beforehand). */ suspend fun setCharacteristicNotificationsEnabledOnRemoteDevice( characteristic: BGC, enable: Boolean ) /** * This function requires that service discovery has been completed * for the given device. * * If multiple instances of the same service (as identified by UUID) * exist, the first instance of the service is returned. * * @param uuid UUID of the requested service * @return The service of the requested UUID if supported by the remote device, or null */ fun getService(uuid: UUID): BluetoothGattService? suspend fun readCharacteristic(characteristic: BGC): BGC suspend fun writeCharacteristic(characteristic: BGC): BGC @RequiresApi(19) suspend fun reliableWrite(writeOperations: suspend GattConnection.() -> Unit) suspend fun readDescriptor(desc: BGD): BGD suspend fun writeDescriptor(desc: BGD): BGD @RequiresApi(26) suspend fun readPhy(): Phy suspend fun requestMtu(mtu: Int): Int /** * **You should totally use this channel and implement the appropriate behavior for a production * app.** * * Dispatches fine grained connection changes, including errors. * You can consume this channel in a separate coroutine (without awaiting completion, * unless you want to await until [close] is called) and perform the logic you want according * to connection state changes. For example, in case of a 133 status, you could retry connection * a few times by calling [connect] again, or call [close] and alert the user if needed after * multiple errors. * This channel will also receive disconnections that can happen if the device * gets out of range for example. It's then up to you to decide to retry [connect] a few times, * periodically, alert the user or call [close]. */ val stateChangeChannel: ReceiveChannel<StateChange> /** * Receives all characteristic update notifications. * * If you need to get the notifications of only a specific characteristic, you may want to use * the [openNotificationSubscription] function instead. * * Since version 0.4.0, in the default implementation, this channel is backed by a * [BroadcastChannel], which means you can have multiple consumers as each time you get this * property, a new subscription is opened. * * For characteristic notifications to come in this channel, you need to enable it on * client-side (using [setCharacteristicNotificationsEnabled]), and they also need to be enabled * on the remote device (you can enable it with the * [setCharacteristicNotificationsEnabledOnRemoteDevice] function). */ val notifyChannel: ReceiveChannel<BGC> data class StateChange internal constructor(val status: Int, val newState: Int) data class Phy(val tx: Int, val rx: Int) }
{'repo_name': 'Beepiz/BleGattCoroutines', 'stars': '301', 'repo_language': 'Kotlin', 'file_name': 'strings.xml', 'mime_type': 'text/plain', 'hash': 3374792992681304741, 'source_dataset': 'data'}
Pod::Spec.new do |s| s.name = 'RSKPlaceholderTextView' s.version = '6.0.3' s.summary = 'A light-weight UITextView subclass that adds support for placeholder.' s.homepage = 'https://github.com/ruslanskorb/RSKPlaceholderTextView' s.license = { :type => 'Apache', :file => 'LICENSE' } s.authors = { 'Ruslan Skorb' => 'ruslan.skorb@gmail.com' } s.source = { :git => 'https://github.com/ruslanskorb/RSKPlaceholderTextView.git', :tag => s.version.to_s } s.platform = :ios, '9.0' s.swift_version = '5.1' s.source_files = 'RSKPlaceholderTextView/*.{swift}' s.framework = 'UIKit' s.requires_arc = true end
{'repo_name': 'ruslanskorb/RSKPlaceholderTextView', 'stars': '163', 'repo_language': 'Swift', 'file_name': 'Info.plist', 'mime_type': 'text/xml', 'hash': -5596860320616893651, 'source_dataset': 'data'}
# Example Rakefile -*- ruby -*- # Using the power of Ruby task :default => [:main] def ext(fn, newext) fn.sub(/\.[^.]+$/, newext) end SRCFILES = Dir['*.c'] OBJFILES = SRCFILES.collect { |fn| ext(fn,".o") } OBJFILES.each do |objfile| srcfile = ext(objfile, ".c") file objfile => [srcfile] do |t| sh "gcc #{srcfile} -c -o #{t.name}" end end file "main" => OBJFILES do |t| sh "gcc -o #{t.name} main.o a.o b.o" end task :clean do rm_f FileList['*.o'] Dir['*~'].each { |fn| rm_f fn } end task :clobber => [:clean] do rm_f "main" end task :run => ["main"] do sh "./main" end
{'repo_name': 'wycats/merb', 'stars': '341', 'repo_language': 'Ruby', 'file_name': 'namespaced_generator.rb', 'mime_type': 'text/x-ruby', 'hash': 4671758486288821494, 'source_dataset': 'data'}
{ "_comment": "Source - http://adobe.github.io/Spry/samples/data_region/JSONDataSetSample.html", "id": "0001", "type": "donut", "name": "Cake", "ppu": 0.55, "batters": { "batter": [ { "id": "1001", "type": "Regular" }, { "id": "1002", "type": "Chocolate" }, { "id": "1003", "type": "Blueberry" }, { "id": "1004", "type": "Devil's Food" } ] }, "topping": [ { "id": "5001", "type": "None" }, { "id": "5002", "type": "Glazed" }, { "id": "5005", "type": "Sugar" }, { "id": "5007", "type": "Powdered Sugar" }, { "id": "5006", "type": "Chocolate with Sprinkles" }, { "id": "5003", "type": "Chocolate" }, { "id": "5004", "type": "Maple" } ] }
{'repo_name': 'Azure/usql', 'stars': '216', 'repo_language': 'C#', 'file_name': 'USQL_Selfguided_HOL.md', 'mime_type': 'text/plain', 'hash': -4137555050457830711, 'source_dataset': 'data'}
/* * Copyright 2013 Red Hat Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Authors: Ben Skeggs */ #include "gf100.h" static int gk110_pm_ctor(struct nvkm_object *parent, struct nvkm_object *engine, struct nvkm_oclass *oclass, void *data, u32 size, struct nvkm_object **pobject) { struct gf100_pm_priv *priv; int ret; ret = nvkm_pm_create(parent, engine, oclass, &priv); *pobject = nv_object(priv); if (ret) return ret; ret = nvkm_perfdom_new(&priv->base, "pwr", 0, 0, 0, 0, gk104_pm_pwr); if (ret) return ret; nv_engine(priv)->cclass = &nvkm_pm_cclass; nv_engine(priv)->sclass = nvkm_pm_sclass; return 0; } struct nvkm_oclass gk110_pm_oclass = { .handle = NV_ENGINE(PM, 0xf0), .ofuncs = &(struct nvkm_ofuncs) { .ctor = gk110_pm_ctor, .dtor = _nvkm_pm_dtor, .init = _nvkm_pm_init, .fini = gf100_pm_fini, }, };
{'repo_name': 'ljrcore/linuxmooc', 'stars': '217', 'repo_language': 'C', 'file_name': 'ecc.c', 'mime_type': 'text/x-c', 'hash': -1426796806098859056, '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 linux // +build mips mipsle package unix import ( "syscall" "unsafe" ) func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) //sys Dup2(oldfd int, newfd int) (err error) //sysnb EpollCreate(size int) (fd int, err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fchown(fd int, uid int, gid int) (err error) //sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 //sysnb Getegid() (egid int) //sysnb Geteuid() (euid int) //sysnb Getgid() (gid int) //sysnb Getuid() (uid int) //sys Lchown(path string, uid int, gid int) (err error) //sys Listen(s int, n int) (err error) //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev int, err error) //sysnb Setregid(rgid int, egid int) (err error) //sysnb Setresgid(rgid int, egid int, sgid int) (err error) //sysnb Setresuid(ruid int, euid int, suid int) (err error) //sysnb Setreuid(ruid int, euid int) (err error) //sys Shutdown(fd int, how int) (err error) //sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) //sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 //sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) //sysnb getgroups(n int, list *_Gid_t) (nn int, err error) //sysnb setgroups(n int, list *_Gid_t) (err error) //sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) //sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) //sysnb socket(domain int, typ int, proto int) (fd int, err error) //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) //sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) //sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) //sysnb InotifyInit() (fd int, err error) //sys Ioperm(from int, num int, on int) (err error) //sys Iopl(level int) (err error) //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error) //sysnb Gettimeofday(tv *Timeval) (err error) //sysnb Time(t *Time_t) (tt Time_t, err error) //sys Utime(path string, buf *Utimbuf) (err error) //sys utimes(path string, times *[2]Timeval) (err error) //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Pause() (err error) func Fstatfs(fd int, buf *Statfs_t) (err error) { _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) if e != 0 { err = errnoErr(e) } return } func Statfs(path string, buf *Statfs_t) (err error) { p, err := BytePtrFromString(path) if err != nil { return err } _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(p)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) if e != 0 { err = errnoErr(e) } return } func Seek(fd int, offset int64, whence int) (off int64, err error) { _, _, e := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offset>>32), uintptr(offset), uintptr(unsafe.Pointer(&off)), uintptr(whence), 0) if e != 0 { err = errnoErr(e) } return } func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: int32(sec), Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } //sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { return EINVAL } var pp [2]_C_int err = pipe2(&pp, flags) p[0] = int(pp[0]) p[1] = int(pp[1]) return } //sysnb pipe() (p1 int, p2 int, err error) func Pipe(p []int) (err error) { if len(p) != 2 { return EINVAL } p[0], p[1], err = pipe() return } //sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { page := uintptr(offset / 4096) if offset != int64(page)*4096 { return 0, EINVAL } return mmap2(addr, length, prot, flags, fd, page) } const rlimInf32 = ^uint32(0) const rlimInf64 = ^uint64(0) type rlimit32 struct { Cur uint32 Max uint32 } //sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT func Getrlimit(resource int, rlim *Rlimit) (err error) { err = prlimit(0, resource, nil, rlim) if err != ENOSYS { return err } rl := rlimit32{} err = getrlimit(resource, &rl) if err != nil { return } if rl.Cur == rlimInf32 { rlim.Cur = rlimInf64 } else { rlim.Cur = uint64(rl.Cur) } if rl.Max == rlimInf32 { rlim.Max = rlimInf64 } else { rlim.Max = uint64(rl.Max) } return } //sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT func Setrlimit(resource int, rlim *Rlimit) (err error) { err = prlimit(0, resource, rlim, nil) if err != ENOSYS { return err } rl := rlimit32{} if rlim.Cur == rlimInf64 { rl.Cur = rlimInf32 } else if rlim.Cur < uint64(rlimInf32) { rl.Cur = uint32(rlim.Cur) } else { return EINVAL } if rlim.Max == rlimInf64 { rl.Max = rlimInf32 } else if rlim.Max < uint64(rlimInf32) { rl.Max = uint32(rlim.Max) } else { return EINVAL } return setrlimit(resource, &rl) } func (r *PtraceRegs) PC() uint64 { return r.Epc } func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc } func (iov *Iovec) SetLen(length int) { iov.Len = uint32(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = uint32(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) func Poll(fds []PollFd, timeout int) (n int, err error) { if len(fds) == 0 { return poll(nil, 0, timeout) } return poll(&fds[0], len(fds), timeout) }
{'repo_name': 'Netflix/titus-executor', 'stars': '191', 'repo_language': 'Go', 'file_name': 'main.go', 'mime_type': 'text/x-c', 'hash': -307508505428648390, 'source_dataset': 'data'}
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: NPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Netscape Public License * Version 1.1 (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.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Michael Ang <mang@subcarrier.org> * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the NPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the NPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* * Common IDL-processing code. */ #include "xpidl.h" #ifdef XP_MAC #include <stat.h> #endif static gboolean parsed_empty_file; /* * The bulk of the generation happens here. */ gboolean xpidl_process_node(TreeState *state) { gint type; nodeHandler *dispatch, handler; XPT_ASSERT(state->tree); type = IDL_NODE_TYPE(state->tree); if ((dispatch = state->dispatch) && (handler = dispatch[type])) return handler(state); return TRUE; } #if defined(XP_MAC) && defined(XPIDL_PLUGIN) extern void mac_warning(const char* warning_message); #endif static int msg_callback(int level, int num, int line, const char *file, const char *message) { char *warning_message; /* * Egregious hack to permit empty files. * XXX libIDL needs an API to detect this case robustly. */ if (0 == strcmp(message, "File empty after optimization")) { parsed_empty_file = TRUE; return 1; } if (!file) file = "<unknown file>"; warning_message = g_strdup_printf("%s:%d: %s\n", file, line, message); #if defined(XP_MAC) && defined(XPIDL_PLUGIN) mac_warning(warning_message); #else fputs(warning_message, stderr); #endif g_free(warning_message); return 1; } /* * To keep track of the state associated with a given input file. The 'next' * field lets us maintain a stack of input files. */ typedef struct input_data { char *filename; /* where did I come from? */ unsigned int lineno; /* last lineno processed */ char *buf; /* contents of file */ char *point; /* next char to feed to libIDL */ char *max; /* 1 past last char in buf */ struct input_data *next; /* file from which we were included */ } input_data; /* * Passed to us by libIDL. Holds global information and the current stack of * include files. */ typedef struct input_callback_state { struct input_data *input_stack; /* linked list of input_data */ GHashTable *already_included; /* to prevent redundant includes */ IncludePathEntry *include_path; /* search path for included files */ GSList *base_includes; /* to accumulate #includes from *first* file; * for passing thru TreeState to * xpidl_header backend. */ } input_callback_state; static FILE * fopen_from_includes(const char *filename, const char *mode, IncludePathEntry *include_path) { IncludePathEntry *current_path = include_path; char *pathname; FILE *inputfile; if (!strcmp(filename, "-")) return stdin; if (filename[0] != '/') { while (current_path) { pathname = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", current_path->directory, filename); if (!pathname) return NULL; inputfile = fopen(pathname, mode); g_free(pathname); if (inputfile) return inputfile; current_path = current_path->next; } } else { inputfile = fopen(filename, mode); if (inputfile) return inputfile; } return NULL; } #if defined(XP_MAC) && defined(XPIDL_PLUGIN) extern FILE* mac_fopen(const char* filename, const char *mode); #endif static input_data * new_input_data(const char *filename, IncludePathEntry *include_path) { input_data *new_data; FILE *inputfile; char *buffer = NULL; size_t offset = 0; size_t buffer_size; #ifdef XP_MAC size_t i; #endif #if defined(XP_MAC) && defined(XPIDL_PLUGIN) /* on Mac, fopen knows how to find files. */ inputfile = fopen(filename, "r"); #elif defined(XP_OS2) || defined(XP_WIN32) /* * if filename is fully qualified (starts with driver letter), then * just call fopen(); else, go with fopen_from_includes() */ if( filename[1] == ':' ) inputfile = fopen(filename, "r"); else inputfile = fopen_from_includes(filename, "r", include_path); #else inputfile = fopen_from_includes(filename, "r", include_path); #endif if (!inputfile) return NULL; #ifdef XP_MAC { struct stat input_stat; if (fstat(fileno(inputfile), &input_stat)) return NULL; buffer = malloc(input_stat.st_size + 1); if (!buffer) return NULL; offset = fread(buffer, 1, input_stat.st_size, inputfile); if (ferror(inputfile)) return NULL; } #else /* * Rather than try to keep track of many different varieties of state * around the boundaries of a circular buffer, we just read in the entire * file. * * We iteratively grow the buffer here; an alternative would be to use * stat to find the exact buffer size we need, as xpt_dump does. */ for (buffer_size = 8191; ; buffer_size *= 2) { size_t just_read; buffer = realloc(buffer, buffer_size + 1); /* +1 for trailing nul */ just_read = fread(buffer + offset, 1, buffer_size - offset, inputfile); if (ferror(inputfile)) return NULL; if (just_read < buffer_size - offset || just_read == 0) { /* Done reading. */ offset += just_read; break; } offset += just_read; } #endif fclose(inputfile); #ifdef XP_MAC /* * libIDL doesn't speak '\r' properly - always make sure lines end with * '\n'. */ for (i = 0; i < offset; i++) { if (buffer[i] == '\r') buffer[i] = '\n'; } #endif new_data = xpidl_malloc(sizeof (struct input_data)); new_data->point = new_data->buf = buffer; new_data->max = buffer + offset; *new_data->max = '\0'; new_data->filename = xpidl_strdup(filename); /* libIDL expects the line number to be that of the *next* line */ new_data->lineno = 2; new_data->next = NULL; return new_data; } /* process pending raw section */ static int NextIsRaw(input_data *data, char **startp, int *lenp) { char *end, *start; /* * XXXmccabe still needed: an in_raw flag to handle the case where we're in * a raw block, but haven't managed to copy it all to xpidl. This will * happen when we have a raw block larger than * IDL_input_data->fill.max_size (currently 8192.) */ if (!(data->point[0] == '%' && data->point[1] == '{')) return 0; start = *startp = data->point; end = NULL; while (start < data->max && (end = strstr(start, "%}"))) { if (end[-1] == '\r' || end[-1] == '\n') break; start = end + 1; } if (end && start < data->max) { *lenp = end - data->point + 2; return 1; } else { const char *filename; int lineno; IDL_file_get(&filename, &lineno); msg_callback(IDL_ERROR, 0, lineno, filename, "unterminated %{ block"); return -1; } } /* process pending comment */ static int NextIsComment(input_data *data, char **startp, int *lenp) { char *end; if (!(data->point[0] == '/' && data->point[1] == '*')) return 0; end = strstr(data->point, "*/"); *lenp = 0; if (end) { int skippedLines = 0; char *tempPoint; /* get current lineno */ IDL_file_get(NULL,(int *)&data->lineno); /* get line count */ for (tempPoint = data->point; tempPoint < end; tempPoint++) { if (*tempPoint == '\n') skippedLines++; } data->lineno += skippedLines; IDL_file_set(data->filename, (int)data->lineno); *startp = end + 2; /* If it's a ** comment, tell libIDL about it. */ if (data->point[2] == '*') { /* hack termination. +2 to get past '*' '/' */ char t = *(end + 2); *(end + 2) = '\0'; IDL_queue_new_ident_comment(data->point); *(end + 2) = t; } data->point = *startp; /* XXXmccabe move this out of function? */ return 1; } else { const char *filename; int lineno; IDL_file_get(&filename, &lineno); msg_callback(IDL_ERROR, 0, lineno, filename, "unterminated comment"); return -1; } } static int NextIsInclude(input_callback_state *callback_state, char **startp, int *lenp) { input_data *data = callback_state->input_stack; input_data *new_data; char *filename, *end; const char *scratch; /* process the #include that we're in now */ if (strncmp(data->point, "#include \"", 10)) { return 0; } filename = data->point + 10; /* skip #include " */ XPT_ASSERT(filename < data->max); end = filename; while (end < data->max) { if (*end == '\"' || *end == '\n' || *end == '\r') break; end++; } if (*end != '\"') { /* * Didn't find end of include file. Scan 'til next whitespace to find * some reasonable approximation of the filename, and use it to report * an error. */ end = filename; while (end < data->max) { if (*end == ' ' || *end == '\n' || *end == '\r' || *end == '\t') break; end++; } *end = '\0'; /* make sure we have accurate line info */ IDL_file_get(&scratch, (int *)&data->lineno); fprintf(stderr, "%s:%d: didn't find end of quoted include name \"%s\n", scratch, data->lineno, filename); return -1; } *end = '\0'; *startp = end + 1; if (data->next == NULL) { /* * If we're in the initial file, add this filename to the list * of filenames to be turned into #include "filename.h" * directives in xpidl_header.c. We do it here rather than in the * block below so it still gets added to the list even if it's * already been recursively included from some other file. */ char *filename_cp = xpidl_strdup(filename); /* note that g_slist_append accepts and likes null as list-start. */ callback_state->base_includes = g_slist_append(callback_state->base_includes, filename_cp); } /* store offset for when we pop, or if we skip this one */ data->point = *startp; if (!g_hash_table_lookup(callback_state->already_included, filename)) { filename = xpidl_strdup(filename); g_hash_table_insert(callback_state->already_included, filename, (void *)TRUE); new_data = new_input_data(filename, callback_state->include_path); if (!new_data) { char *error_message; IDL_file_get(&scratch, (int *)&data->lineno); error_message = g_strdup_printf("can't open included file %s for reading\n", filename); msg_callback(IDL_ERROR, 0, data->lineno, scratch, error_message); g_free(error_message); return -1; } new_data->next = data; /* tell libIDL to exclude this IDL from the toplevel tree */ IDL_inhibit_push(); IDL_file_get(&scratch, (int *)&data->lineno); callback_state->input_stack = new_data; IDL_file_set(new_data->filename, (int)new_data->lineno); } *lenp = 0; /* this is magic, see the comment below */ return 1; } static void FindSpecial(input_data *data, char **startp, int *lenp) { char *point = data->point; /* magic sequences are: * "%{" raw block * "/\*" comment * "#include \"" include * The first and last want a newline [\r\n] before, or the start of the * file. */ #define LINE_START(data, point) (point == data->buf || \ (point > data->point && \ (point[-1] == '\r' || point[-1] == '\n'))) while (point < data->max) { if (point[0] == '/' && point[1] == '*') break; if (LINE_START(data, point)) { if (point[0] == '%' && point[1] == '{') break; if (point[0] == '#' && !strncmp(point + 1, "include \"", 9)) break; } point++; } #undef LINE_START *startp = data->point; *lenp = point - data->point; } /* set this with a debugger to see exactly what libIDL sees */ static FILE *tracefile; static int input_callback(IDL_input_reason reason, union IDL_input_data *cb_data, gpointer user_data) { input_callback_state *callback_state = user_data; input_data *data = callback_state->input_stack; input_data *new_data = NULL; unsigned int len, copy; int rv; char *start; switch(reason) { case IDL_INPUT_REASON_INIT: if (data == NULL || data->next == NULL) { /* * This is the first file being processed. As it's the target * file, we only look for it in the first entry in the include * path, which we assume to be the current directory. */ /* XXXmccabe proper assumption? Do we handle files in other directories? */ IncludePathEntry first_entry; first_entry.directory = callback_state->include_path->directory; first_entry.next = NULL; new_data = new_input_data(cb_data->init.filename, &first_entry); } else { new_data = new_input_data(cb_data->init.filename, callback_state->include_path); } if (!new_data) return -1; IDL_file_set(new_data->filename, (int)new_data->lineno); callback_state->input_stack = new_data; return 0; case IDL_INPUT_REASON_FILL: start = NULL; len = 0; while (data->point >= data->max) { if (!data->next) return 0; /* Current file is done; revert to including file */ callback_state->input_stack = data->next; free(data->filename); free(data->buf); free(data); data = callback_state->input_stack; IDL_file_set(data->filename, (int)data->lineno); IDL_inhibit_pop(); } /* * Now we scan for sequences which require special attention: * \n#include begins an include statement * \n%{ begins a raw-source block * /\* begins a comment * * We used to be fancier here, so make sure that we sent the most * data possible at any given time. To that end, we skipped over * \n%{ raw \n%} blocks and then _continued_ the search for special * sequences like \n#include or /\* comments . * * It was really ugly, though -- liberal use of goto! lots of implicit * state! what fun! -- so now we just do this: * * if (special at start) { * process that special - * - raw: send it to libIDL, and don't look inside for specials * - comments: adjust point and start over * - includes: push new input_data struct for included file, and * start over * } else { * scan for next special * send data up to that special to libIDL * } * * If len is set to zero, it is a sentinel value indicating we a comment * or include was found, and parsing should start over. * * XXX const string foo = "/\*" will just screw us horribly. * Hm but. We could treat strings as we treat raw blocks, eh? */ /* * Order is important, so that you can have /\* comments and * #includes within raw sections, and so that you can comment out * #includes. */ rv = NextIsRaw(data, &start, (int *)&len); if (rv == -1) return -1; if (!rv) { /* * When NextIsComment succeeds, it returns a 0 len (requesting a * restart) and adjusts data->point to pick up after the comment. */ rv = NextIsComment(data, &start, (int *)&len); if (rv == -1) return -1; if (!rv) { /* * NextIsInclude might push a new input_data struct; if so, it * will return a 0 len, letting the callback pick up the new * file the next time around. */ rv = NextIsInclude(callback_state, &start, (int *)&len); if (rv == -1) return -1; if (!rv) FindSpecial(data, &start, (int *)&len); } } if (len == 0) { /* * len == 0 is a sentinel value that means we found a comment or * include. If we found a comment, point has been adjusted to * point past the comment. If we found an include, a new input_data * has been pushed. In both cases, calling the input_callback again * will pick up the new state. */ return input_callback(reason, cb_data, user_data); } copy = MIN(len, (unsigned int) cb_data->fill.max_size); memcpy(cb_data->fill.buffer, start, copy); data->point = start + copy; if (tracefile) fwrite(cb_data->fill.buffer, copy, 1, tracefile); return copy; case IDL_INPUT_REASON_ABORT: case IDL_INPUT_REASON_FINISH: while (data != NULL) { input_data *next; next = data->next; free(data->filename); free(data->buf); free(data); data = next; } return 0; default: g_error("unknown input reason %d!", reason); return -1; } } static void free_ghash_key(gpointer key, gpointer value, gpointer user_data) { /* We're only storing TRUE in the value... */ free(key); } static void free_gslist_data(gpointer data, gpointer user_data) { free(data); } /* Pick up unlink. */ #ifdef XP_UNIX #include <unistd.h> #elif XP_WIN /* We get it from stdio.h. */ #endif int xpidl_process_idl(char *filename, IncludePathEntry *include_path, char *file_basename, ModeData *mode) { char *tmp, *outname, *real_outname = NULL; IDL_tree top; TreeState state; int rv; input_callback_state callback_state; gboolean ok = TRUE; backend *emitter; callback_state.input_stack = NULL; callback_state.base_includes = NULL; callback_state.include_path = include_path; callback_state.already_included = g_hash_table_new(g_str_hash, g_str_equal); if (!callback_state.already_included) { fprintf(stderr, "failed to create hashtable. out of memory?\n"); return 0; } state.basename = xpidl_strdup(filename); /* if basename has an .extension, truncate it. */ tmp = strrchr(state.basename, '.'); if (tmp) *tmp = '\0'; if (!file_basename) outname = xpidl_strdup(state.basename); else outname = xpidl_strdup(file_basename); /* so we don't include it again! */ g_hash_table_insert(callback_state.already_included, xpidl_strdup(filename), (void *)TRUE); parsed_empty_file = FALSE; rv = IDL_parse_filename_with_input(filename, input_callback, &callback_state, msg_callback, &top, &state.ns, IDLF_IGNORE_FORWARDS | IDLF_XPIDL, enable_warnings ? IDL_WARNING1 : IDL_ERROR); if (parsed_empty_file) { /* * If we've detected (via hack in msg_callback) that libIDL returned * failure because it found a file with no IDL, set the parse tree to * null and proceed. Allowing this is useful to permit .idl files that * collect #includes. */ top = NULL; state.ns = NULL; } else if (rv != IDL_SUCCESS) { if (rv == -1) { g_warning("Parse of %s failed: %s", filename, g_strerror(errno)); } else { g_warning("Parse of %s failed", filename); } return 0; } state.basename = xpidl_strdup(filename); tmp = strrchr(state.basename, '.'); if (tmp) *tmp = '\0'; /* so xpidl_header.c can use it to generate a list of #include directives */ state.base_includes = callback_state.base_includes; emitter = mode->factory(); state.dispatch = emitter->dispatch_table; if (strcmp(outname, "-")) { const char *fopen_mode; const char *out_basename; /* explicit_output_filename can't be true without a filename */ if (explicit_output_filename) { real_outname = g_strdup(outname); } else { /* *This combination seems a little strange, what about OS/2? * Assume it's some build issue */ #if defined(XP_UNIX) || defined(XP_WIN) if (!file_basename) { out_basename = xpidl_basename(outname); } else { out_basename = outname; } #else out_basename = outname; #endif real_outname = g_strdup_printf("%s.%s", out_basename, mode->suffix); } /* Use binary write for typelib mode */ fopen_mode = (strcmp(mode->mode, "typelib")) ? "w" : "wb"; state.file = fopen(real_outname, fopen_mode); if (!state.file) { perror("error opening output file"); return 0; } } else { state.file = stdout; } state.tree = top; #ifdef VBOX_XPIDL_EMULATE_GENJIFACES state.real_outname = real_outname; #endif if (emitter->emit_prolog) emitter->emit_prolog(&state); if (state.tree) /* Only if we have a tree to process. */ ok = xpidl_process_node(&state); if (emitter->emit_epilog) emitter->emit_epilog(&state); if (state.file != stdout) fclose(state.file); free(state.basename); free(outname); g_hash_table_foreach(callback_state.already_included, free_ghash_key, NULL); g_hash_table_destroy(callback_state.already_included); g_slist_foreach(callback_state.base_includes, free_gslist_data, NULL); if (state.ns) IDL_ns_free(state.ns); if (top) IDL_tree_free(top); if (real_outname != NULL) { /* * Delete partial output file on failure. (Mac does this in the plugin * driver code, if the compiler returns failure.) */ #if defined(XP_UNIX) || defined(XP_WIN) if (!ok) unlink(real_outname); #endif g_free(real_outname); } return ok; } /* * Our own version of IDL_tree_warning, which we use when IDL_tree_warning * would crash on us. */ void xpidl_tree_warning(IDL_tree p, int level, const char *fmt, ...) { va_list ap; char *msg, *file; int lineno; /* XXX need to check against __IDL_max_msg_level, no accessor */ va_start(ap, fmt); msg = g_strdup_vprintf(fmt, ap); if (p) { file = p->_file; lineno = p->_line; } else { file = NULL; lineno = 0; } /* call our message callback, like IDL_tree_warning would */ msg_callback(level, 0, lineno, file, msg); g_free(msg); va_end(ap); }
{'repo_name': 'VirtualMonitor/VirtualMonitor', 'stars': '152', 'repo_language': 'C', 'file_name': 'lintian-override.in', 'mime_type': 'text/plain', 'hash': 7092154888405756204, 'source_dataset': 'data'}
/* BLIS An object-based framework for developing high-performance BLAS-like libraries. Copyright (C) 2014, The University of Texas at Austin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 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(s) of the copyright holder(s) 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 THE COPYRIGHT HOLDER OR CONTRIBUTORS 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. */ #include "bli_her2k_front.h"
{'repo_name': 'explosion/cython-blis', 'stars': '149', 'repo_language': 'C', 'file_name': 'common.py', 'mime_type': 'text/x-python', 'hash': 518150803260524355, 'source_dataset': 'data'}
html { height: 100%; min-height: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; } body { -webkit-font-smoothing: antialiased; color: $body-font-color; background-color: $white; font-size: $font-size; font-family: $font-family-open-sans; font-weight: $font-weight-reg; height: 100%; min-height: 100%; } h1, h2, h3, h4, h5 { font-family: $font-family-klavika; -webkit-font-smoothing: antialiased; } h1 { margin-bottom: 24px; } // Avoid FOUT .wf-loading { visibility: hidden; } .wf-active, .wf-inactive { visibility: visible; }
{'repo_name': 'dollarshaveclub/furan', 'stars': '333', 'repo_language': 'Go', 'file_name': 'main.go', 'mime_type': 'text/x-c', 'hash': -1929582797680244614, 'source_dataset': 'data'}
fileFormatVersion: 2 guid: 02c0a84bd64c6f044954d8bde9b46ec8 timeCreated: 1485107928 licenseType: Store TextureImporter: fileIDToRecycleName: {} serializedVersion: 4 mipmaps: mipMapMode: 0 enableMipMap: 0 sRGBTexture: 0 linearTexture: 0 fadeOut: 0 borderMipMap: 0 mipMapFadeDistanceStart: 1 mipMapFadeDistanceEnd: 3 bumpmap: convertToNormalMap: 0 externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 isReadable: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 seamlessCubemap: 0 textureFormat: 1 maxTextureSize: 2048 textureSettings: filterMode: 0 aniso: -1 mipBias: -1 wrapMode: 0 nPOTScale: 1 lightmap: 0 compressionQuality: 50 spriteMode: 0 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} spriteBorder: {x: 0, y: 0, z: 0, w: 0} spritePixelsToUnits: 100 alphaUsage: 2 alphaIsTransparency: 0 spriteTessellationDetail: -1 textureType: 10 textureShape: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 platformSettings: - buildTarget: DefaultTexturePlatform maxTextureSize: 64 textureFormat: -1 textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 - buildTarget: Standalone maxTextureSize: 64 textureFormat: -1 textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] spritePackingTag: userData: assetBundleName: assetBundleVariant:
{'repo_name': 'sebastianstarke/AI4Animation', 'stars': '3141', 'repo_language': 'C++', 'file_name': 'ProjectVersion.txt', 'mime_type': 'text/plain', 'hash': 171223160867245960, 'source_dataset': 'data'}
namespace Server.Items { [Flipable(0xA489, 0xA48A)] public class CowPie : Item { public override int LabelNumber => 1126237; // cow pie [Constructable] public CowPie() : base(0xA4E5) { Weight = 1; LootType = LootType.Blessed; } public override void OnMovement(Mobile m, Point3D oldLocation) { if (IsLockedDown && (!m.Hidden || m.IsPlayer()) && Utility.InRange(m.Location, Location, 2) && !Utility.InRange(oldLocation, Location, 2)) { Effects.PlaySound(Location, Map, 1064); } base.OnMovement(m, oldLocation); } public CowPie(Serial serial) : base(serial) { } public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write(0); } public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); } } }
{'repo_name': 'ServUO/ServUO', 'stars': '321', 'repo_language': 'C#', 'file_name': 'WrongRevamped.xml', 'mime_type': 'text/plain', 'hash': -1908185099717291657, 'source_dataset': 'data'}
from BfsSdk import BfsSdkException from BfsSdk import FS import time if __name__ == '__main__': try: fs = FS() fs.ListDirectory("/") fs.Rmdir("/", True) fs.ListDirectory("/") fs.CreateDirectory("/test") print "touch", fs.Touchz(["file0", "file1", "file2"]) time.sleep(1) fs.ListDirectory("/") time.sleep(1) print "delete", fs.DeleteFile(["file0", "file"]) time.sleep(1) fs.Rename("test", "test2") time.sleep(1) fs.ListDirectory("/") time.sleep(1) fs.Symlink("file1", "link") time.sleep(1) fs.Put("/home/users/sunjinjin01/bfs/sandbox/bfs.flag", "/") time.sleep(1) fs.ListDirectory("/") time.sleep(1) print fs.Cat(["bfs.flag"]) time.sleep(1) fs.Get("/bfs.flag", "/home/users/sunjinjin01/") time.sleep(1) fs.Du(["/bfs.flag"]) time.sleep(1) fs.Chmod("777", "/bfs.flag") time.sleep(1) fs.Location("/bfs.flag") time.sleep(1) fs.ChangeReplicaNum("/bfs.flag", "4") fs.Location("/bfs.flag") except BfsSdkException as e: print(e.reason)
{'repo_name': 'baidu/bfs', 'stars': '2626', 'repo_language': 'C++', 'file_name': 'start_bfs.sh', 'mime_type': 'text/x-shellscript', 'hash': -4708913151229742421, 'source_dataset': 'data'}
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\MediaGallerySynchronizationMetadata\Model; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Filesystem; use Magento\Framework\Filesystem\Directory\WriteInterface; use Magento\Framework\Filesystem\DriverInterface; use Magento\MediaGalleryApi\Api\Data\AssetInterface; use Magento\MediaGalleryApi\Api\Data\KeywordInterface; use Magento\MediaGalleryApi\Api\GetAssetsByPathsInterface; use Magento\MediaGallerySynchronizationApi\Api\SynchronizeFilesInterface; use Magento\MediaGalleryApi\Api\GetAssetsKeywordsInterface; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; /** * Test for SynchronizeFiles. */ class SynchronizeFilesTest extends TestCase { /** * @var DriverInterface */ private $driver; /** * @var SynchronizeFilesInterface */ private $synchronizeFiles; /** * @var GetAssetsByPathsInterface */ private $getAssetsByPath; /** * @var WriteInterface */ private $mediaDirectory; /** * @var GetAssetsKeywordsInterface */ private $getAssetKeywords; /** * @inheritdoc */ protected function setUp(): void { $this->driver = Bootstrap::getObjectManager()->get(DriverInterface::class); $this->synchronizeFiles = Bootstrap::getObjectManager()->get(SynchronizeFilesInterface::class); $this->getAssetsByPath = Bootstrap::getObjectManager()->get(GetAssetsByPathsInterface::class); $this->getAssetKeywords = Bootstrap::getObjectManager()->get(GetAssetsKeywordsInterface::class); $this->mediaDirectory = Bootstrap::getObjectManager()->get(Filesystem::class) ->getDirectoryWrite(DirectoryList::MEDIA); } /** * Test for SynchronizeFiles::execute * * @dataProvider filesProvider * @param null|string $file * @param null|string $title * @param null|string $description * @param null|array $keywords * @throws FileSystemException * @throws \Magento\Framework\Exception\LocalizedException */ public function testExecute( ?string $file, ?string $title, ?string $description, ?array $keywords ): void { $path = realpath(__DIR__ . '/../_files/' . $file); $modifiableFilePath = $this->mediaDirectory->getAbsolutePath($file); $this->driver->copy( $path, $modifiableFilePath ); $this->synchronizeFiles->execute([$file]); $loadedAssets = $this->getAssetsByPath->execute([$file])[0]; $loadedKeywords = $this->getKeywords($loadedAssets) ?: null; $this->assertEquals($title, $loadedAssets->getTitle()); $this->assertEquals($description, $loadedAssets->getDescription()); $this->assertEquals($keywords, $loadedKeywords); $this->driver->deleteFile($modifiableFilePath); } /** * Data provider for testExecute * * @return array[] */ public function filesProvider(): array { return [ [ '/magento.jpg', 'magento', null, null ], [ '/magento_metadata.jpg', 'Title of the magento image', 'Description of the magento image', [ 'magento', 'mediagallerymetadata' ] ] ]; } /** * Key asset keywords * * @param AssetInterface $asset * @return string[] */ private function getKeywords(AssetInterface $asset): array { $assetKeywords = $this->getAssetKeywords->execute([$asset->getId()]); if (empty($assetKeywords)) { return []; } $keywords = current($assetKeywords)->getKeywords(); return array_map( function (KeywordInterface $keyword) { return $keyword->getKeyword(); }, $keywords ); } }
{'repo_name': 'magento/magento2', 'stars': '8767', 'repo_language': 'PHP', 'file_name': 'report.phtml', 'mime_type': 'text/x-php', 'hash': 4278227020290810173, 'source_dataset': 'data'}
%YAML 1.1 %TAG !u! tag:unity3d.com,2011: --- !u!1 &101084 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 406288} m_Layer: 0 m_Name: Character1_LeftHandRing3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &101322 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 424664} m_Layer: 0 m_Name: J_L_ForeArm_00_tw m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &102158 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 424754} m_Layer: 0 m_Name: J_R_Sode_D00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &102694 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 448580} m_Layer: 0 m_Name: J_L_Sode_A00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &102872 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 464660} m_Layer: 0 m_Name: Character1_LeftHandThumb1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &103448 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 460394} m_Layer: 0 m_Name: J_R_HairTail_03 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &103636 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 479532} - component: {fileID: 11440608} m_Layer: 0 m_Name: J_R_HairTail_02 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &103700 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 431390} m_Layer: 0 m_Name: Character1_RightHandIndex1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &105166 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 428196} - component: {fileID: 11413768} m_Layer: 0 m_Name: J_L_Skirt_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &105408 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 471968} m_Layer: 0 m_Name: Character1_LeftHandRing1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &105662 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 422466} - component: {fileID: 13734710} m_Layer: 10 m_Name: _Fhair m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &107408 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 470710} m_Layer: 0 m_Name: J_L_HairTail_03 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &107806 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 443940} m_Layer: 0 m_Name: Character1_RightHandMiddle1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &108516 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 405344} m_Layer: 0 m_Name: J_L_SkirtBack_02 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &109162 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 478194} m_Layer: 0 m_Name: J_L_Sode_A01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &111216 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 495514} m_Layer: 0 m_Name: Character1_Head m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &111598 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 443468} m_Layer: 0 m_Name: J_acce_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &112702 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 496274} m_Layer: 0 m_Name: J_L_Sode_D01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &115436 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 450538} m_Layer: 0 m_Name: J_L_Sode_C00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &115582 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 463998} m_Layer: 0 m_Name: Mesh_SD_unitychan m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &115666 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 437898} - component: {fileID: 11422026} m_Layer: 0 m_Name: Locator_RightUpLeg m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &116026 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 400478} - component: {fileID: 11485412} m_Layer: 0 m_Name: Character1_LeftLeg m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &116352 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 479342} m_Layer: 0 m_Name: Character1_RightHandThumb1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &116632 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 459752} m_Layer: 0 m_Name: Character1_LeftShoulder m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &116776 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 445894} m_Layer: 0 m_Name: Character1_RightHandMiddle3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &117122 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 473090} - component: {fileID: 13776644} m_Layer: 9 m_Name: _eye m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &117682 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 403454} m_Layer: 0 m_Name: Character1_LeftToeBase m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &118684 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 411960} m_Layer: 0 m_Name: J_R_Elbow m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &119240 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 475842} m_Layer: 0 m_Name: Character1_LeftUpLeg m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &120278 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 459530} m_Layer: 0 m_Name: bone_eye_L m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &121468 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 420806} m_Layer: 0 m_Name: Character1_RightHandRing3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &124286 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 421266} - component: {fileID: 11427652} m_Layer: 0 m_Name: J_L_HairSide_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &125228 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 485478} m_Layer: 0 m_Name: J_L_HairSide2_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &125444 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 436990} m_Layer: 0 m_Name: Character1_RightFoot m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &125536 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 409954} m_Layer: 0 m_Name: Character1_Spine1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &126320 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 471556} m_Layer: 0 m_Name: J_R_HairSide2_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &127304 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 466798} m_Layer: 0 m_Name: Character1_Spine2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &128060 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 417188} - component: {fileID: 13754798} m_Layer: 9 m_Name: _face m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &128174 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 404752} m_Layer: 0 m_Name: J_R_HairFront_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &128454 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 461876} - component: {fileID: 11460292} m_Layer: 0 m_Name: Character1_RightHand m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &130530 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 429620} m_Layer: 0 m_Name: J_R_Sode_A01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &130868 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 476014} - component: {fileID: 11401616} m_Layer: 0 m_Name: J_L_SkirtBack_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &131196 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 471242} m_Layer: 0 m_Name: J_L_HairSide_02 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &133454 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 486260} m_Layer: 0 m_Name: Character1_LeftHandRing2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &133520 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 431466} m_Layer: 0 m_Name: Character1_Neck m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &133628 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 441392} - component: {fileID: 11493618} m_Layer: 0 m_Name: J_L_HairSide2_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &134016 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 403656} - component: {fileID: 11461428} m_Layer: 0 m_Name: J_L_HeadRibbon_02 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &135772 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 495940} m_Layer: 0 m_Name: Character1_Hips m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &136014 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 439084} m_Layer: 0 m_Name: J_R_Sode_D01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &136302 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 410954} m_Layer: 0 m_Name: Character1_LeftHandMiddle3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &137686 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 474790} m_Layer: 0 m_Name: J_R_Sode_C00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &137872 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 489566} m_Layer: 0 m_Name: Character1_RightHandIndex3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &138054 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 459154} - component: {fileID: 11450774} m_Layer: 0 m_Name: Character1_LeftForeArm m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &138952 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 412410} m_Layer: 0 m_Name: J_L_Elbow m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &140138 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 433318} - component: {fileID: 11487032} m_Layer: 0 m_Name: Character1_RightLeg m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &143416 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 497564} m_Layer: 0 m_Name: Character1_RightHandRing2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &143728 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 422038} m_Layer: 0 m_Name: Character1_Spine m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &144166 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 442048} m_Layer: 0 m_Name: Character1_RightHandPinky3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &144456 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 464586} m_Layer: 0 m_Name: J_L_Sode_D00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &144870 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 415334} m_Layer: 0 m_Name: Character1_RightHandThumb4 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &146194 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 450632} m_Layer: 0 m_Name: Character1_RightHandIndex2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &147160 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 458576} m_Layer: 0 m_Name: Character1_Reference m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &147480 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 437260} m_Layer: 0 m_Name: J_R_Sode_A00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &147564 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 422122} - component: {fileID: 11472872} m_Layer: 0 m_Name: Locator_LeftUpLeg m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &147914 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 444686} - component: {fileID: 11485610} m_Layer: 0 m_Name: J_R_HeadRibbon_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &147960 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 487328} - component: {fileID: 11494580} m_Layer: 0 m_Name: J_R_HairTail_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &148588 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 489894} - component: {fileID: 11493890} m_Layer: 0 m_Name: J_R_HairSide_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &149068 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 416448} - component: {fileID: 11414194} m_Layer: 0 m_Name: J_R_Skirt_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &149922 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 497976} - component: {fileID: 13715496} m_Layer: 10 m_Name: _Fhair2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &150328 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 413752} m_Layer: 0 m_Name: Character1_LeftHandThumb4 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &151060 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 406836} m_Layer: 0 m_Name: J_L_HeadRibbon_03 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &151876 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 463852} m_Layer: 0 m_Name: J_R_Sode_B01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &152350 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 425290} m_Layer: 0 m_Name: J_R_Arm_00_tw m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &153844 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 406358} m_Layer: 0 m_Name: J_L_knee m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &157136 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 406120} m_Layer: 0 m_Name: Character1_LeftHandMiddle1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &158104 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 453694} m_Layer: 0 m_Name: J_L_HairFront_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &158548 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 483210} m_Layer: 0 m_Name: Character1_RightHandThumb2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &160016 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 489738} - component: {fileID: 11483922} m_Layer: 0 m_Name: J_L_HairSide_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &160664 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 494738} m_Layer: 0 m_Name: J_L_Arm_00_tw m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &162326 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 468316} m_Layer: 0 m_Name: J_R_SkirtBack_02 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &163394 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 401654} m_Layer: 0 m_Name: Character1_RightToeBase m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &163416 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 405056} - component: {fileID: 11441606} m_Layer: 0 m_Name: J_R_HeadRibbon_02 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &163442 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 474840} - component: {fileID: 11433068} m_Layer: 0 m_Name: Character1_RightForeArm m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &163622 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 428160} - component: {fileID: 11410642} m_Layer: 0 m_Name: J_R_Skirt_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &163654 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 499994} m_Layer: 0 m_Name: J_R_HeadRibbon_03 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &163968 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 401394} - component: {fileID: 11494026} m_Layer: 0 m_Name: Character1_LeftArm m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &164426 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 424044} m_Layer: 0 m_Name: J_R_Sode_E00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &166466 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 495216} m_Layer: 0 m_Name: J_L_Sode_B00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &167034 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 424704} - component: {fileID: 11490566} m_Layer: 0 m_Name: J_R_SkirtBack_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &167878 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 412052} m_Layer: 0 m_Name: Character1_RightHandMiddle2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &168348 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 461536} - component: {fileID: 13739638} m_Layer: 8 m_Name: _body m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &168742 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 420014} - component: {fileID: 11423942} m_Layer: 0 m_Name: J_L_HairFront_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &169290 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 410782} - component: {fileID: 11400794} m_Layer: 0 m_Name: J_L_HeadRibbon_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &171812 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 401650} - component: {fileID: 11449226} m_Layer: 0 m_Name: J_R_HairFront_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &173356 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 438192} m_Layer: 0 m_Name: J_L_Sode_B01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &173842 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 445974} m_Layer: 0 m_Name: Character1_RightUpLeg m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &173982 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 418178} m_Layer: 0 m_Name: Character1_RightHandRing1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &174252 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 482624} - component: {fileID: 11466700} m_Layer: 0 m_Name: Character1_LeftHand m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &174474 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 435546} - component: {fileID: 11484052} m_Layer: 0 m_Name: J_R_HairTail_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &174726 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 410892} m_Layer: 0 m_Name: Character1_LeftHandThumb2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &174752 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 493618} - component: {fileID: 11463516} m_Layer: 0 m_Name: J_L_Skirt_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &174846 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 454582} - component: {fileID: 11475410} m_Layer: 0 m_Name: Locator_AboveHead m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &174952 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 414828} m_Layer: 0 m_Name: J_L_Skirt_02 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &175036 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 488512} - component: {fileID: 11480238} m_Layer: 0 m_Name: J_R_HairSide_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &178050 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 457492} m_Layer: 0 m_Name: J_R_knee m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &180956 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 409880} m_Layer: 0 m_Name: Character1_RightHandPinky1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &182512 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 492230} m_Layer: 0 m_Name: Character1_LeftHandIndex3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &183442 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 430642} m_Layer: 0 m_Name: J_L_Sode_E00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &185054 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 447366} - component: {fileID: 11477726} m_Layer: 0 m_Name: Character1_RightArm m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &186156 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 446758} m_Layer: 0 m_Name: J_R_ForeArm_00_tw m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &186196 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 492094} m_Layer: 0 m_Name: Character1_LeftHandPinky1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &186456 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 410040} m_Layer: 0 m_Name: J_L_Sode_C01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &186786 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 402048} - component: {fileID: 11477592} m_Layer: 0 m_Name: J_L_HairTail_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &187898 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 485144} - component: {fileID: 11432284} m_Layer: 0 m_Name: J_R_HeadRibbon_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &189164 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 448000} m_Layer: 0 m_Name: LookPos m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &189298 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 492704} m_Layer: 0 m_Name: Character1_RightHandThumb3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &189664 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 491790} - component: {fileID: 13709152} m_Layer: 10 m_Name: _head m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &192032 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 422784} - component: {fileID: 11478798} m_Layer: 0 m_Name: J_L_HeadRibbon_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &192564 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 466900} - component: {fileID: 11475020} m_Layer: 0 m_Name: J_L_HairTail_01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &192952 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 405740} - component: {fileID: 11401110} m_Layer: 0 m_Name: J_R_HairSide2_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &193266 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 498692} m_Layer: 0 m_Name: Character1_RightShoulder m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &193330 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 419232} m_Layer: 0 m_Name: J_R_Sode_B00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &193392 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 423662} m_Layer: 0 m_Name: Character1_LeftHandIndex1 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &193394 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 497562} - component: {fileID: 11455728} m_Layer: 0 m_Name: Locator_Hips m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &193440 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 458890} m_Layer: 0 m_Name: Character1_LeftHandPinky2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &193582 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 455156} - component: {fileID: 11453144} m_Layer: 0 m_Name: Locator_UpperBody m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &193992 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 463448} m_Layer: 0 m_Name: Character1_LeftHandIndex2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &194192 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 409428} - component: {fileID: 11496038} m_Layer: 0 m_Name: J_acce_00 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &194216 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 411554} m_Layer: 0 m_Name: Character1_LeftHandThumb3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &194316 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 402178} m_Layer: 0 m_Name: Character1_RightHandPinky2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &194560 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 428930} m_Layer: 0 m_Name: bone_eye_R m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &196304 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 406892} m_Layer: 0 m_Name: J_R_Sode_C01 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &196616 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 427704} m_Layer: 0 m_Name: J_R_Skirt_02 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &197224 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 495280} - component: {fileID: 9536708} - component: {fileID: 11493534} - component: {fileID: 11463618} - component: {fileID: 11474006} - component: {fileID: 11443736} - component: {fileID: 11403798} m_Layer: 0 m_Name: ToonShader_SD_unitychan_humanoid m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &197482 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 452790} m_Layer: 0 m_Name: Character1_LeftFoot m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &198474 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 475456} m_Layer: 0 m_Name: J_R_HairSide_02 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &198480 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 422496} - component: {fileID: 11441024} m_Layer: 0 m_Name: J_L_HairTail_02 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &199516 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 469820} m_Layer: 0 m_Name: Character1_LeftHandPinky3 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!1 &199830 GameObject: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} serializedVersion: 5 m_Component: - component: {fileID: 432790} m_Layer: 0 m_Name: Character1_LeftHandMiddle2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 --- !u!4 &400478 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 116026} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0.021834202, z: -0.15186352} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 452790} - {fileID: 406358} m_Father: {fileID: 475842} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &401394 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 163968} m_LocalRotation: {x: 0.026822958, y: -0.19842313, z: 0.0032788063, w: 0.9797439} m_LocalPosition: {x: -0.046947505, y: -0.0003006166, z: 0.0036682128} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 0.9999999} m_Children: - {fileID: 459154} - {fileID: 494738} m_Father: {fileID: 459752} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &401650 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 171812} m_LocalRotation: {x: -0.06683042, y: -0.07431372, z: 0.0030237695, w: 0.9949885} m_LocalPosition: {x: 0.014399265, y: -0.09940759, z: 0.28018036} m_LocalScale: {x: 1.0000001, y: 0.9999998, z: 0.99999976} m_Children: - {fileID: 404752} m_Father: {fileID: 495514} m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &401654 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 163394} m_LocalRotation: {x: 0, y: 0, z: 6.1098625e-13, w: 1} m_LocalPosition: {x: 0.00009202957, y: -0.044022463, z: -0.041161664} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 436990} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &402048 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 186786} m_LocalRotation: {x: 0.27495223, y: 0.14915642, z: 0.13304274, w: 0.94045377} m_LocalPosition: {x: -0.08453446, y: 0.12091128, z: 0.07472458} m_LocalScale: {x: 1.0000001, y: 0.99999994, z: 1} m_Children: - {fileID: 466900} m_Father: {fileID: 495514} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &402178 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 194316} m_LocalRotation: {x: -0.0041054687, y: 0.021180103, z: 0.004780198, w: 0.99975586} m_LocalPosition: {x: 0.009599628, y: 0.00000007390976, z: 0.0000011444091} m_LocalScale: {x: 1.0000004, y: 0.9999999, z: 1.0000001} m_Children: - {fileID: 442048} m_Father: {fileID: 409880} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &403454 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 117682} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0.00009206772, y: -0.044022497, z: -0.041161656} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 452790} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &403656 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 134016} m_LocalRotation: {x: 0.68807155, y: -0.053607468, z: -0.044375025, w: 0.7222982} m_LocalPosition: {x: -0, y: 0.00000022888183, z: 0.13667938} m_LocalScale: {x: 1, y: 0.99999976, z: 0.9999999} m_Children: - {fileID: 406836} m_Father: {fileID: 410782} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &404752 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 128174} m_LocalRotation: {x: 0.14653113, y: -0.012764582, z: -0.0018909615, w: 0.9891219} m_LocalPosition: {x: -0.000000028610229, y: 0.000000019073486, z: -0.18115318} m_LocalScale: {x: 1.0000001, y: 1.0000002, z: 1.0000001} m_Children: [] m_Father: {fileID: 401650} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &405056 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 163416} m_LocalRotation: {x: 0.68807024, y: 0.05360729, z: 0.0443758, w: 0.7222994} m_LocalPosition: {x: 0.0000008010864, y: 0.000001335144, z: 0.13668053} m_LocalScale: {x: 1.0000001, y: 1, z: 1.0000001} m_Children: - {fileID: 499994} m_Father: {fileID: 444686} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &405344 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 108516} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0, z: -0.06979225} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 476014} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &405740 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 192952} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0.13977984, y: -0.032653518, z: 0.14276077} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 471556} m_Father: {fileID: 495514} m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &406120 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 157136} m_LocalRotation: {x: 0.0055155223, y: -0.087773144, z: 0.0217056, w: 0.9958887} m_LocalPosition: {x: -0.05140888, y: -0.0063463617, z: 0.006106071} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 0.99999976} m_Children: - {fileID: 432790} m_Father: {fileID: 482624} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &406288 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 101084} m_LocalRotation: {x: 6.765418e-17, y: -0.000000044703473, z: 0.0000000015133989, w: 1} m_LocalPosition: {x: -0.010001297, y: 0.0000000017881393, z: 0} m_LocalScale: {x: 1.0000002, y: 1.0000002, z: 1} m_Children: [] m_Father: {fileID: 486260} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &406358 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 153844} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0.00028729916, z: -0.0016981125} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 400478} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &406836 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 151060} m_LocalRotation: {x: -0.00000022351746, y: -0.00000011920929, z: 0.0000000149011345, w: 1} m_LocalPosition: {x: -0.000000076293944, y: -0.00000015258789, z: 0.16675673} m_LocalScale: {x: 1, y: 0.9999998, z: 1} m_Children: [] m_Father: {fileID: 403656} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &406892 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 196304} m_LocalRotation: {x: 0.00002408773, y: -0.0000046640653, z: 1.1234674e-10, w: 1} m_LocalPosition: {x: 0.10796964, y: 0.000000333786, z: 0.0000027847288} m_LocalScale: {x: 0.99999964, y: 0.9999999, z: 0.9999999} m_Children: [] m_Father: {fileID: 474790} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &409428 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 194192} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -2.5015806e-10, y: -0.052113816, z: 0.06192604} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 443468} m_Father: {fileID: 466798} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &409880 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 180956} m_LocalRotation: {x: 0.009402843, y: 0.14908786, z: -0.03696336, w: 0.98808813} m_LocalPosition: {x: 0.046354044, y: 0.022601992, z: 0.00095024105} m_LocalScale: {x: 0.9999999, y: 1, z: 0.9999998} m_Children: - {fileID: 402178} m_Father: {fileID: 461876} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &409954 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 125536} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0.000000009536743, z: 0.04283531} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 466798} m_Father: {fileID: 422038} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &410040 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 186456} m_LocalRotation: {x: 0.0000000037252907, y: -0.000000044703487, z: 0.0000000074505815, w: 1} m_LocalPosition: {x: -0.107970506, y: -0.000000009536743, z: 0} m_LocalScale: {x: 0.9999999, y: 0.99999994, z: 0.99999994} m_Children: [] m_Father: {fileID: 450538} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &410782 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 169290} m_LocalRotation: {x: -0.8290727, y: -0.12707953, z: 0.09669092, w: 0.5358546} m_LocalPosition: {x: 0.000000076293944, y: -0.000000114440915, z: 0.2478369} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000005} m_Children: - {fileID: 403656} m_Father: {fileID: 422784} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &410892 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 174726} m_LocalRotation: {x: -0.0072667697, y: -0.07349535, z: 0.11157922, w: 0.99100745} m_LocalPosition: {x: -0.017500991, y: 0, z: -0.000000076293944} m_LocalScale: {x: 0.99999976, y: 0.9999999, z: 0.9999999} m_Children: - {fileID: 411554} m_Father: {fileID: 464660} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &410954 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 136302} m_LocalRotation: {x: 0.000000007450579, y: -0.000000014901163, z: -0.0000000037252907, w: 1} m_LocalPosition: {x: -0.012807655, y: -0.000000005960464, z: -0.000000076293944} m_LocalScale: {x: 0.9999999, y: 1.0000002, z: 1} m_Children: [] m_Father: {fileID: 432790} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &411554 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 194216} m_LocalRotation: {x: -0.01386693, y: -0.019060507, z: -0.00015807952, w: 0.9997222} m_LocalPosition: {x: -0.010315971, y: 0, z: 0.00000007152557} m_LocalScale: {x: 0.99999994, y: 0.9999999, z: 1} m_Children: - {fileID: 413752} m_Father: {fileID: 410892} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &411960 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 118684} m_LocalRotation: {x: -0.006511231, y: 0.00071536587, z: 0.017952094, w: 0.99981743} m_LocalPosition: {x: -0.00022066115, y: 0.0046890113, z: -0.000079879756} m_LocalScale: {x: 1.0000002, y: 1.0000001, z: 1.0000005} m_Children: [] m_Father: {fileID: 474840} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &412052 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 167878} m_LocalRotation: {x: -0.0038748826, y: -0.017280553, z: 0.010274474, w: 0.9997904} m_LocalPosition: {x: 0.01678072, y: -0.000000042915342, z: 0.000000076293944} m_LocalScale: {x: 0.9999997, y: 0.9999998, z: 1.0000001} m_Children: - {fileID: 445894} m_Father: {fileID: 443940} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &412410 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 138952} m_LocalRotation: {x: -0.0065112184, y: -0.0007156489, z: -0.017952146, w: 0.99981743} m_LocalPosition: {x: 0.00022022247, y: 0.0046890355, z: -0.00008010864} m_LocalScale: {x: 1.0000002, y: 0.99999976, z: 0.99999994} m_Children: [] m_Father: {fileID: 459154} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &413752 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 150328} m_LocalRotation: {x: 0.00000014156107, y: 0.00000002607702, z: -0.000000089406974, w: 1} m_LocalPosition: {x: -0.012429466, y: -0.000000038146972, z: 0.000000038146972} m_LocalScale: {x: 1, y: 0.99999976, z: 0.9999997} m_Children: [] m_Father: {fileID: 411554} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &414828 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 174952} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0, z: -0.06979223} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 493618} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &415334 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 144870} m_LocalRotation: {x: 0.00000030919912, y: 0.000000108033525, z: 0.00000022351746, w: 1} m_LocalPosition: {x: 0.012428941, y: -0.0000006866455, z: 0.00000018596648} m_LocalScale: {x: 0.99999964, y: 0.9999998, z: 0.9999998} m_Children: [] m_Father: {fileID: 492704} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &416448 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 149068} m_LocalRotation: {x: -0.08715573, y: 0, z: -0, w: 0.9961947} m_LocalPosition: {x: 0.08367225, y: -0.05437761, z: 0.015768737} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 428160} m_Father: {fileID: 495940} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &417188 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 128060} m_LocalRotation: {x: 0.7071068, y: 0, z: -0, w: 0.7071068} m_LocalPosition: {x: -2.5015806e-10, y: 0.009918099, z: -0.6672374} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 495514} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} --- !u!4 &418178 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 173982} m_LocalRotation: {x: -0.0026424497, y: 0.034782935, z: 0.00474744, w: 0.9993802} m_LocalPosition: {x: 0.049340207, y: 0.008889168, z: 0.0041255187} m_LocalScale: {x: 1, y: 1, z: 0.99999994} m_Children: - {fileID: 497564} m_Father: {fileID: 461876} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &419232 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 193330} m_LocalRotation: {x: -0.0044931974, y: -0.16546617, z: 0.024590768, w: 0.9858986} m_LocalPosition: {x: 0.010701637, y: 0.00085137604, z: 0.0204319} m_LocalScale: {x: 1.0000001, y: 0.9999998, z: 1.0000002} m_Children: - {fileID: 463852} m_Father: {fileID: 474840} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &420014 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 168742} m_LocalRotation: {x: -0.032923594, y: 0.012465945, z: 0.003332434, w: 0.99937457} m_LocalPosition: {x: 0.00047761618, y: -0.102207325, z: 0.28018036} m_LocalScale: {x: 1, y: 0.9999999, z: 0.9999999} m_Children: - {fileID: 453694} m_Father: {fileID: 495514} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &420806 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 121468} m_LocalRotation: {x: 0.0000002421438, y: 0.000000029802315, z: -0.0000000022118978, w: 1} m_LocalPosition: {x: 0.0100004, y: -0.000000009834766, z: -0.00000034332274} m_LocalScale: {x: 1.0000002, y: 1.0000002, z: 1.0000001} m_Children: [] m_Father: {fileID: 497564} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &421266 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 124286} m_LocalRotation: {x: 0.029233634, y: -0.33951724, z: -0.06338306, w: 0.93800646} m_LocalPosition: {x: -0.124109186, y: 0.000000047683713, z: -0.00000030517577} m_LocalScale: {x: 0.9999999, y: 1.0000002, z: 1.0000002} m_Children: - {fileID: 471242} m_Father: {fileID: 489738} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &422038 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 143728} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: -0.00017591476, z: 0.001539917} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 409954} m_Father: {fileID: 495940} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &422122 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 147564} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalPosition: {x: 0, y: 0, z: -0.07247563} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 475842} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &422466 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 105662} m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} m_LocalPosition: {x: -0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 463998} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} --- !u!4 &422496 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 198480} m_LocalRotation: {x: -4.9960047e-16, y: -0.00000006705523, z: -0.0000000074505815, w: 1} m_LocalPosition: {x: -0, y: 0.000000114440915, z: -0.2224917} m_LocalScale: {x: 0.9999999, y: 1.0000004, z: 0.9999999} m_Children: - {fileID: 470710} m_Father: {fileID: 466900} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &422784 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 192032} m_LocalRotation: {x: -0.2504739, y: -0.2833735, z: -0.049994256, w: 0.9243716} m_LocalPosition: {x: -0.079515405, y: -0.068754226, z: 0.3136406} m_LocalScale: {x: 0.99999994, y: 0.99999976, z: 0.9999998} m_Children: - {fileID: 410782} m_Father: {fileID: 495514} m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &423662 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 193392} m_LocalRotation: {x: 0.008546737, y: -0.09441612, z: 0.03057627, w: 0.99502647} m_LocalPosition: {x: -0.046978243, y: -0.022182073, z: 0.0025979613} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 0.99999994} m_Children: - {fileID: 463448} m_Father: {fileID: 482624} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &424044 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 164426} m_LocalRotation: {x: 0.002230505, y: 0.0000016093232, z: -0.0000000026582874, w: 0.99999756} m_LocalPosition: {x: 0.0237582, y: 0.000000004172325, z: 0.0000009918213} m_LocalScale: {x: 1.0000002, y: 1, z: 1} m_Children: [] m_Father: {fileID: 425290} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &424664 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 101322} m_LocalRotation: {x: -0.012573468, y: 0.00046314503, z: -0.00002451689, w: 0.99992085} m_LocalPosition: {x: -0.10891037, y: 0.00009298801, z: -0.00038040162} m_LocalScale: {x: 1.0000004, y: 1, z: 1.0000001} m_Children: [] m_Father: {fileID: 459154} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &424704 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 167034} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0.065894224, y: 0.049491055, z: -0.019820098} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 468316} m_Father: {fileID: 495940} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &424754 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 102158} m_LocalRotation: {x: -0.010909932, y: 0.104387626, z: 0.022491591, w: 0.99422246} m_LocalPosition: {x: 0.015457363, y: 0.00009038925, z: -0.03743225} m_LocalScale: {x: 0.99999976, y: 1.0000001, z: 1.0000002} m_Children: - {fileID: 439084} m_Father: {fileID: 474840} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &425290 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 152350} m_LocalRotation: {x: -0.019467767, y: 0.0000867438, z: 0.0000013984003, w: 0.9998105} m_LocalPosition: {x: -0.0006183624, y: 0.00000034093856, z: 0.000029029845} m_LocalScale: {x: 0.99999976, y: 0.9999998, z: 1.0000002} m_Children: - {fileID: 424044} m_Father: {fileID: 447366} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &427704 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 196616} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0.000000019073486, z: -0.06979223} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 428160} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &428160 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 163622} m_LocalRotation: {x: 0.0000000074505815, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0.000000095367426, z: -0.060169753} m_LocalScale: {x: 1, y: 0.9999999, z: 0.9999999} m_Children: - {fileID: 427704} m_Father: {fileID: 416448} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &428196 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 105166} m_LocalRotation: {x: -0.08715573, y: 0, z: -0, w: 0.9961947} m_LocalPosition: {x: -0.08367218, y: -0.054377582, z: 0.01576828} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 493618} m_Father: {fileID: 495940} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &428930 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 194560} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0.026893293, y: 0.046498314, z: 0.10205597} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 495514} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &429620 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 130530} m_LocalRotation: {x: 0.000023934985, y: 0.0000045448483, z: -0.00000024597793, w: 1} m_LocalPosition: {x: 0.10319793, y: 0.00000018596648, z: -0.0000025939942} m_LocalScale: {x: 1, y: 1.0000002, z: 1} m_Children: [] m_Father: {fileID: 437260} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &430642 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 183442} m_LocalRotation: {x: 0.000000006519262, y: -0.00000046193605, z: 0.000000004190955, w: 1} m_LocalPosition: {x: -0.02375902, y: -5.9604643e-10, z: 0.000000114440915} m_LocalScale: {x: 0.9999999, y: 0.9999997, z: 1} m_Children: [] m_Father: {fileID: 494738} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &431390 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 103700} m_LocalRotation: {x: 0.008546484, y: 0.094416015, z: -0.030576246, w: 0.99502647} m_LocalPosition: {x: 0.046977613, y: -0.02218206, z: 0.002598419} m_LocalScale: {x: 1.0000001, y: 1.0000002, z: 1} m_Children: - {fileID: 450632} m_Father: {fileID: 461876} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &431466 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 133520} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0.047267172, z: 0.1330844} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 495514} m_Father: {fileID: 466798} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &432790 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 199830} m_LocalRotation: {x: -0.0038751021, y: 0.017281516, z: -0.010274473, w: 0.9997904} m_LocalPosition: {x: -0.016781254, y: 0.000000019073486, z: 0} m_LocalScale: {x: 1.0000001, y: 1, z: 1.0000001} m_Children: - {fileID: 410954} m_Father: {fileID: 406120} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &433318 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 140138} m_LocalRotation: {x: 8.881784e-16, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0.02183431, z: -0.1518638} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 436990} m_Father: {fileID: 445974} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &435546 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 174474} m_LocalRotation: {x: 0.27495188, y: -0.14915672, z: -0.13304274, w: 0.9404538} m_LocalPosition: {x: 0.08453457, y: 0.12091121, z: 0.074723355} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 487328} m_Father: {fileID: 495514} m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &436990 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 125444} m_LocalRotation: {x: -0.00000000509566, y: 0.000029975812, z: -0.00016999245, w: 1} m_LocalPosition: {x: -0, y: 0.033916343, z: -0.16433214} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 401654} m_Father: {fileID: 433318} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &437260 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 147480} m_LocalRotation: {x: -0.007507754, y: -0.0075066104, z: -0.09549668, w: 0.99537313} m_LocalPosition: {x: 0.016253967, y: -0.04258907, z: -0.004563751} m_LocalScale: {x: 1, y: 1, z: 1.0000001} m_Children: - {fileID: 429620} m_Father: {fileID: 474840} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &437898 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 115666} m_LocalRotation: {x: 0.7071068, y: -0.00009900672, z: -0.00014139892, w: 0.7071068} m_LocalPosition: {x: 0, y: 0, z: -0.0699162} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 445974} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &438192 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 173356} m_LocalRotation: {x: 0, y: -0, z: -0.0000000018626454, w: 1} m_LocalPosition: {x: -0.11148712, y: -0.0000000023841857, z: 0} m_LocalScale: {x: 0.99999994, y: 1, z: 0.9999999} m_Children: [] m_Father: {fileID: 495216} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &439084 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 136014} m_LocalRotation: {x: 0.00002354477, y: -0.0000008641438, z: 0.000005244297, w: 1} m_LocalPosition: {x: 0.10183468, y: 0.0000029587745, z: 0.00000125885} m_LocalScale: {x: 1.0000001, y: 1, z: 1} m_Children: [] m_Father: {fileID: 424754} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &441392 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 133628} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0.13977991, y: -0.032653578, z: 0.14276138} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 485478} m_Father: {fileID: 495514} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &442048 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 144166} m_LocalRotation: {x: -0.00000024121255, y: 0.00000025331983, z: -0.000000014901105, w: 1} m_LocalPosition: {x: 0.0075922012, y: 0.00000013589859, z: -0.00000030517577} m_LocalScale: {x: 0.99999964, y: 1, z: 1} m_Children: [] m_Father: {fileID: 402178} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &443468 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 111598} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: -0.017489681, z: -0.022835387} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 409428} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &443940 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 107806} m_LocalRotation: {x: 0.0055155335, y: 0.08777313, z: -0.021705609, w: 0.9958887} m_LocalPosition: {x: 0.051409397, y: -0.006346327, z: 0.006106949} m_LocalScale: {x: 1, y: 1.0000002, z: 0.9999999} m_Children: - {fileID: 412052} m_Father: {fileID: 461876} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &444686 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 147914} m_LocalRotation: {x: -0.82907134, y: 0.12707938, z: -0.096691504, w: 0.5358566} m_LocalPosition: {x: -0.0000011062622, y: -0.0000010299682, z: 0.24783768} m_LocalScale: {x: 1.0000002, y: 1.0000002, z: 1} m_Children: - {fileID: 405056} m_Father: {fileID: 485144} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &445894 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 116776} m_LocalRotation: {x: -0.0000000018626964, y: -0.00000092387177, z: -0.000000055879344, w: 1} m_LocalPosition: {x: 0.012807674, y: 0.0000000667572, z: -0.00000087738033} m_LocalScale: {x: 1.0000002, y: 1.0000001, z: 1} m_Children: [] m_Father: {fileID: 412052} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &445974 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 173842} m_LocalRotation: {x: 0.0000000050956612, y: -0.00002997581, z: 0.00016999245, w: 1} m_LocalPosition: {x: 0.09838916, y: 0.0002045536, z: -0.06464706} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 433318} - {fileID: 457492} - {fileID: 437898} m_Father: {fileID: 495940} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &446758 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 186156} m_LocalRotation: {x: -0.012467529, y: -0.00039108118, z: 0.000021479957, w: 0.9999222} m_LocalPosition: {x: 0.1089093, y: 0.00009293079, z: -0.00038059233} m_LocalScale: {x: 0.99999994, y: 0.9999999, z: 1.0000004} m_Children: [] m_Father: {fileID: 474840} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &447366 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 185054} m_LocalRotation: {x: 0.02679965, y: 0.1984241, z: -0.003274372, w: 0.9797443} m_LocalPosition: {x: 0.04694744, y: -0.0003006053, z: 0.0036683274} m_LocalScale: {x: 1.0000002, y: 1.0000001, z: 1} m_Children: - {fileID: 474840} - {fileID: 425290} m_Father: {fileID: 498692} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &448000 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 189164} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0.8, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 495280} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &448580 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 102694} m_LocalRotation: {x: -0.0075075305, y: 0.0075068395, z: 0.095496655, w: 0.99537313} m_LocalPosition: {x: -0.016254006, y: -0.042589106, z: -0.004563713} m_LocalScale: {x: 1.0000002, y: 0.99999976, z: 1.0000001} m_Children: - {fileID: 478194} m_Father: {fileID: 459154} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &450538 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 115436} m_LocalRotation: {x: -0.008827749, y: 0.0058973646, z: -0.10055546, w: 0.99487484} m_LocalPosition: {x: -0.012543258, y: 0.036262, z: -0.005905571} m_LocalScale: {x: 1.0000001, y: 0.9999999, z: 1} m_Children: - {fileID: 410040} m_Father: {fileID: 459154} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &450632 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 146194} m_LocalRotation: {x: 0.0058521065, y: -0.04137672, z: -0.0068952506, w: 0.9991027} m_LocalPosition: {x: 0.014227294, y: 0.00000006437301, z: -0.00000015258789} m_LocalScale: {x: 0.99999994, y: 0.9999998, z: 0.99999976} m_Children: - {fileID: 489566} m_Father: {fileID: 431390} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &452790 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 197482} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0.03391635, z: -0.16433224} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 403454} m_Father: {fileID: 400478} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &453694 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 158104} m_LocalRotation: {x: 0.14653109, y: -0.012764544, z: -0.0018909584, w: 0.9891219} m_LocalPosition: {x: 0.0000000023841857, y: 0, z: -0.18115325} m_LocalScale: {x: 0.9999999, y: 1.0000001, z: 1} m_Children: [] m_Father: {fileID: 420014} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &454582 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 174846} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalPosition: {x: 0, y: 0.03246137, z: 0.166686} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 495514} m_RootOrder: 13 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &455156 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 193582} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalPosition: {x: 0, y: 0.04870856, z: 0.05303502} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 466798} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &457492 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 178050} m_LocalRotation: {x: 0.0000000025893838, y: 0.000000009194991, z: 0.0000000023283064, w: 1} m_LocalPosition: {x: -0, y: 0.022121582, z: -0.15356168} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 445974} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &458576 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 147160} m_LocalRotation: {x: 0, y: -0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: -0.000000002661807} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 495940} m_Father: {fileID: 495280} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &458890 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 193440} m_LocalRotation: {x: -0.0041052187, y: -0.02118038, z: -0.00477994, w: 0.99975586} m_LocalPosition: {x: -0.009598923, y: 0.000000007152557, z: 0.000000076293944} m_LocalScale: {x: 1.0000001, y: 0.9999998, z: 0.9999999} m_Children: - {fileID: 469820} m_Father: {fileID: 492094} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &459154 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 138054} m_LocalRotation: {x: 0.013020072, y: 0.001430947, z: 0.035897728, w: 0.99926966} m_LocalPosition: {x: -0.11878532, y: 0.000000009536743, z: 0.000000076293944} m_LocalScale: {x: 0.9999999, y: 0.9999998, z: 1} m_Children: - {fileID: 482624} - {fileID: 412410} - {fileID: 424664} - {fileID: 448580} - {fileID: 495216} - {fileID: 450538} - {fileID: 464586} m_Father: {fileID: 401394} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &459530 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 120278} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0.026893321, y: 0.04649828, z: 0.102056116} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 495514} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &459752 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 116632} m_LocalRotation: {x: 5.4117755e-10, y: -0.14720343, z: -0.012063365, w: 0.9890327} m_LocalPosition: {x: -0.026731491, y: 0.046953294, z: 0.10265426} m_LocalScale: {x: 1, y: 1, z: 1.0000001} m_Children: - {fileID: 401394} m_Father: {fileID: 466798} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &460394 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 103448} m_LocalRotation: {x: -1.6653337e-16, y: -0.000000014901158, z: -0.000000011175868, w: 1} m_LocalPosition: {x: -0.000000038146972, y: -0.000000038146972, z: -0.17191932} m_LocalScale: {x: 1.0000002, y: 1.0000002, z: 1.0000002} m_Children: [] m_Father: {fileID: 479532} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &461536 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 168348} m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} m_LocalPosition: {x: -0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 463998} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} --- !u!4 &461876 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 128454} m_LocalRotation: {x: -0.024933074, y: -0.0007821354, z: 0.000042964955, w: 0.9996888} m_LocalPosition: {x: 0.11270626, y: -0.00000007152557, z: -0.0000009536743} m_LocalScale: {x: 1.0000001, y: 0.99999994, z: 1.0000004} m_Children: - {fileID: 431390} - {fileID: 443940} - {fileID: 409880} - {fileID: 418178} - {fileID: 479342} m_Father: {fileID: 474840} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &463448 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 193992} m_LocalRotation: {x: 0.0058518304, y: 0.04137672, z: 0.0068952497, w: 0.9991027} m_LocalPosition: {x: -0.014227028, y: -0.00000000834465, z: 0.000000076293944} m_LocalScale: {x: 0.9999999, y: 0.99999994, z: 0.9999996} m_Children: - {fileID: 492230} m_Father: {fileID: 423662} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &463852 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 151876} m_LocalRotation: {x: 0.000022957096, y: -0.0000007750364, z: -0.000007668492, w: 1} m_LocalPosition: {x: 0.111486964, y: -0.0000026249886, z: 0.00000125885} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 419232} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &463998 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 115582} m_LocalRotation: {x: 0, y: -0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 461536} - {fileID: 473090} - {fileID: 422466} - {fileID: 497976} - {fileID: 491790} m_Father: {fileID: 495280} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &464586 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 144456} m_LocalRotation: {x: -0.0109099485, y: -0.104387544, z: -0.022491656, w: 0.9942225} m_LocalPosition: {x: -0.015458488, y: 0.00009045124, z: -0.037431754} m_LocalScale: {x: 0.9999999, y: 0.99999976, z: 0.9999998} m_Children: - {fileID: 496274} m_Father: {fileID: 459154} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &464660 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 102872} m_LocalRotation: {x: 0.7231719, y: 0.16827042, z: 0.18860354, w: 0.6427568} m_LocalPosition: {x: -0.016437054, y: -0.01568381, z: -0.017473105} m_LocalScale: {x: 1, y: 0.99999994, z: 1} m_Children: - {fileID: 410892} m_Father: {fileID: 482624} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &466798 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 127304} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0.00015314102, z: 0.041275635} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 459752} - {fileID: 431466} - {fileID: 498692} - {fileID: 409428} - {fileID: 455156} m_Father: {fileID: 409954} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &466900 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 192564} m_LocalRotation: {x: 0.000000029802326, y: -0.000000022351744, z: 0.000000011175873, w: 1} m_LocalPosition: {x: 0.000000019073486, y: -0.000000076293944, z: -0.19820912} m_LocalScale: {x: 0.99999994, y: 0.9999999, z: 1.0000001} m_Children: - {fileID: 422496} m_Father: {fileID: 402048} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &468316 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 162326} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0, z: -0.06979225} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 424704} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &469820 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 199516} m_LocalRotation: {x: -0.000000002793968, y: -0.000000029802322, z: -0.000000007450581, w: 1} m_LocalPosition: {x: -0.0075915335, y: -0.000000009536743, z: 0} m_LocalScale: {x: 1, y: 1, z: 0.99999994} m_Children: [] m_Father: {fileID: 458890} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &470710 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 107408} m_LocalRotation: {x: 0.000000014901161, y: -0.000000007450581, z: -0.000000007450581, w: 1} m_LocalPosition: {x: 0.000000019073486, y: 0.000000076293944, z: -0.17191942} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 422496} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &471242 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 131196} m_LocalRotation: {x: 0.000000077299774, y: -0.00000008475035, z: -0.000000014901153, w: 1} m_LocalPosition: {x: -0.17118454, y: 0.000000009536743, z: 0.00000022888183} m_LocalScale: {x: 1.0000001, y: 1, z: 0.9999999} m_Children: [] m_Father: {fileID: 421266} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &471556 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 126320} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0, z: -0.07184112} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 405740} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &471968 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 105408} m_LocalRotation: {x: -0.002642449, y: -0.03478314, z: -0.004747433, w: 0.9993802} m_LocalPosition: {x: -0.049339905, y: 0.008889142, z: 0.0041249082} m_LocalScale: {x: 1.0000001, y: 1, z: 1} m_Children: - {fileID: 486260} m_Father: {fileID: 482624} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &473090 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 117122} m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} m_LocalPosition: {x: -0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 463998} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} --- !u!4 &474790 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 137686} m_LocalRotation: {x: -0.008828224, y: -0.005897476, z: 0.10055573, w: 0.9948748} m_LocalPosition: {x: 0.01254324, y: 0.036262, z: -0.0059057614} m_LocalScale: {x: 0.99999994, y: 1.0000002, z: 1.0000002} m_Children: - {fileID: 406892} m_Father: {fileID: 474840} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &474840 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 163442} m_LocalRotation: {x: 0.013020083, y: -0.0014304537, z: -0.03589762, w: 0.99926966} m_LocalPosition: {x: 0.11878662, y: -0.0000000023841857, z: -0.0000005340576} m_LocalScale: {x: 1, y: 0.99999994, z: 1} m_Children: - {fileID: 461876} - {fileID: 411960} - {fileID: 446758} - {fileID: 437260} - {fileID: 419232} - {fileID: 474790} - {fileID: 424754} m_Father: {fileID: 447366} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &475456 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 198474} m_LocalRotation: {x: -0.00000069662923, y: 0.00000008195637, z: 0.000000029802383, w: 1} m_LocalPosition: {x: 0.17118447, y: 0.000000009536743, z: -0.00000016212464} m_LocalScale: {x: 0.9999999, y: 1.0000001, z: 0.99999976} m_Children: [] m_Father: {fileID: 488512} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &475842 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 119240} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0.09838927, y: 0.0002046585, z: -0.06464721} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 400478} - {fileID: 422122} m_Father: {fileID: 495940} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &476014 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 130868} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0.06589424, y: 0.049491055, z: -0.019819336} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 405344} m_Father: {fileID: 495940} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &478194 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 109162} m_LocalRotation: {x: -0.000000014901161, y: 0.000000014901158, z: -0.000000018626446, w: 1} m_LocalPosition: {x: -0.10319832, y: 0.000000028610229, z: 0.000000038146972} m_LocalScale: {x: 1.0000002, y: 1, z: 1.0000002} m_Children: [] m_Father: {fileID: 448580} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &479342 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 116352} m_LocalRotation: {x: 0.7231718, y: -0.16827066, z: -0.18860316, w: 0.6427569} m_LocalPosition: {x: 0.016436901, y: -0.015683817, z: -0.017472915} m_LocalScale: {x: 0.9999999, y: 1, z: 1.0000002} m_Children: - {fileID: 483210} m_Father: {fileID: 461876} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &479532 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 103636} m_LocalRotation: {x: 0.000000089406925, y: 0.000000014901161, z: -0.000000040978207, w: 1} m_LocalPosition: {x: -0.0000004196167, y: -0.0000005340576, z: -0.2224927} m_LocalScale: {x: 0.9999997, y: 1.0000005, z: 1.0000002} m_Children: - {fileID: 460394} m_Father: {fileID: 487328} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &482624 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 174252} m_LocalRotation: {x: -0.025144951, y: 0.0009263517, z: -0.00004903172, w: 0.9996834} m_LocalPosition: {x: -0.112707324, y: -0.0000000047683715, z: -0.000000038146972} m_LocalScale: {x: 1.0000001, y: 0.99999976, z: 1.0000002} m_Children: - {fileID: 423662} - {fileID: 406120} - {fileID: 492094} - {fileID: 471968} - {fileID: 464660} m_Father: {fileID: 459154} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &483210 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 158548} m_LocalRotation: {x: -0.007267016, y: 0.07349538, z: -0.111579284, w: 0.99100745} m_LocalPosition: {x: 0.017501583, y: 0.000000114440915, z: -0.00000050544736} m_LocalScale: {x: 0.99999994, y: 0.99999964, z: 1} m_Children: - {fileID: 492704} m_Father: {fileID: 479342} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &485144 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 187898} m_LocalRotation: {x: -0.25047436, y: 0.28337345, z: 0.04999436, w: 0.92437154} m_LocalPosition: {x: 0.0795154, y: -0.06875421, z: 0.31363952} m_LocalScale: {x: 0.9999998, y: 1, z: 0.99999994} m_Children: - {fileID: 444686} m_Father: {fileID: 495514} m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &485478 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 125228} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0, z: -0.07184112} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 441392} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &486260 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 133454} m_LocalRotation: {x: -0.005074419, y: -0.01721808, z: -0.011732383, w: 0.99977005} m_LocalPosition: {x: -0.013061695, y: 0.000000007152557, z: -0.000000038146972} m_LocalScale: {x: 0.99999964, y: 0.99999976, z: 0.9999998} m_Children: - {fileID: 406288} m_Father: {fileID: 471968} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &487328 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 147960} m_LocalRotation: {x: 0.000000029802322, y: -0.0000000074505815, z: -0.00000010058282, w: 1} m_LocalPosition: {x: -0.000000095367426, y: 0.0000009918213, z: -0.19820796} m_LocalScale: {x: 1.0000002, y: 1, z: 1.0000001} m_Children: - {fileID: 479532} m_Father: {fileID: 435546} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &488512 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 175036} m_LocalRotation: {x: 0.029233143, y: 0.33951682, z: 0.063383006, w: 0.9380066} m_LocalPosition: {x: 0.124110945, y: -0.00000016212464, z: -0.0000010681152} m_LocalScale: {x: 1.0000001, y: 0.99999994, z: 1.0000002} m_Children: - {fileID: 475456} m_Father: {fileID: 489894} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &489566 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 137872} m_LocalRotation: {x: -0.000000007450581, y: 0.000000104308135, z: -0.000000016763806, w: 1} m_LocalPosition: {x: 0.010736103, y: -0.000000085830685, z: -0.00000015258789} m_LocalScale: {x: 0.99999994, y: 0.99999976, z: 1.0000001} m_Children: [] m_Father: {fileID: 450632} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &489738 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 160016} m_LocalRotation: {x: 0.032767124, y: -0.43403226, z: -0.092962936, w: 0.89548886} m_LocalPosition: {x: -0.07298515, y: -0.0934125, z: 0.27946135} m_LocalScale: {x: 1.0000001, y: 0.99999994, z: 0.99999994} m_Children: - {fileID: 421266} m_Father: {fileID: 495514} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &489894 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 148588} m_LocalRotation: {x: 0.03276742, y: 0.4340327, z: 0.09296258, w: 0.8954887} m_LocalPosition: {x: 0.072985135, y: -0.09341254, z: 0.27946243} m_LocalScale: {x: 1.0000001, y: 0.99999994, z: 0.99999994} m_Children: - {fileID: 488512} m_Father: {fileID: 495514} m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &491790 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 189664} m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} m_LocalPosition: {x: -0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 463998} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} --- !u!4 &492094 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 186196} m_LocalRotation: {x: 0.009402834, y: -0.1490879, z: 0.036963325, w: 0.98808813} m_LocalPosition: {x: -0.046355017, y: 0.022602014, z: 0.0009494018} m_LocalScale: {x: 1, y: 1.0000002, z: 0.99999994} m_Children: - {fileID: 458890} m_Father: {fileID: 482624} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &492230 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 182512} m_LocalRotation: {x: -0.0000000018626456, y: -0.00000014901154, z: -0.0000000037252887, w: 1} m_LocalPosition: {x: -0.0107357595, y: 0.000000014305114, z: -0.000000076293944} m_LocalScale: {x: 1.0000005, y: 1, z: 1.0000004} m_Children: [] m_Father: {fileID: 463448} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &492704 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 189298} m_LocalRotation: {x: -0.01386646, y: 0.019060291, z: 0.00015806762, w: 0.9997222} m_LocalPosition: {x: 0.010316124, y: 0.0000005340576, z: -0.00000010967254} m_LocalScale: {x: 1.0000002, y: 1.0000004, z: 1.0000002} m_Children: - {fileID: 415334} m_Father: {fileID: 483210} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &493618 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 174752} m_LocalRotation: {x: 0.0000000074505815, y: -0, z: -0, w: 1} m_LocalPosition: {x: -0, y: 0, z: -0.060169294} m_LocalScale: {x: 1, y: 0.9999999, z: 0.9999999} m_Children: - {fileID: 414828} m_Father: {fileID: 428196} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &494738 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 160664} m_LocalRotation: {x: -0.019484475, y: -0.000087756256, z: -0.0000014493894, w: 0.99981016} m_LocalPosition: {x: 0.00061920163, y: 0.0000003504753, z: 0.000030059813} m_LocalScale: {x: 1, y: 0.99999976, z: 1.0000002} m_Children: - {fileID: 430642} m_Father: {fileID: 401394} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &495216 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 166466} m_LocalRotation: {x: -0.004493182, y: 0.16546658, z: -0.024590796, w: 0.98589855} m_LocalPosition: {x: -0.0107017895, y: 0.000851388, z: 0.02043209} m_LocalScale: {x: 1.0000002, y: 0.99999994, z: 1} m_Children: - {fileID: 438192} m_Father: {fileID: 459154} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &495280 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 197224} m_LocalRotation: {x: 0, y: 1, z: 0, w: -0.00000016292068} m_LocalPosition: {x: 0, y: 0.02, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 458576} - {fileID: 448000} - {fileID: 463998} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} --- !u!4 &495514 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 111216} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 2.5015806e-10, y: -0.00804217, z: 0.030468559} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 417188} - {fileID: 459530} - {fileID: 428930} - {fileID: 420014} - {fileID: 441392} - {fileID: 489738} - {fileID: 402048} - {fileID: 422784} - {fileID: 401650} - {fileID: 405740} - {fileID: 489894} - {fileID: 435546} - {fileID: 485144} - {fileID: 454582} m_Father: {fileID: 431466} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &495940 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 135772} m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} m_LocalPosition: {x: -0, y: 0.41803354, z: 0.049120344} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 475842} - {fileID: 445974} - {fileID: 422038} - {fileID: 428196} - {fileID: 476014} - {fileID: 416448} - {fileID: 424704} - {fileID: 497562} m_Father: {fileID: 458576} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &496274 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 112702} m_LocalRotation: {x: 0.0000000018626454, y: -0.000000044703476, z: 0.000000001862645, w: 1} m_LocalPosition: {x: -0.101834446, y: 0, z: 0.000000038146972} m_LocalScale: {x: 1.0000001, y: 0.9999999, z: 1} m_Children: [] m_Father: {fileID: 464586} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &497562 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 193394} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} m_LocalPosition: {x: 0, y: 0.005178678, z: -0.02264928} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 495940} m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &497564 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 143416} m_LocalRotation: {x: -0.0050746724, y: 0.017218595, z: 0.01173241, w: 0.99977005} m_LocalPosition: {x: 0.013061752, y: 0.000000005960464, z: 0.00000015258789} m_LocalScale: {x: 0.9999998, y: 0.9999999, z: 0.99999964} m_Children: - {fileID: 420806} m_Father: {fileID: 418178} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &497976 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 149922} m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071068} m_LocalPosition: {x: -0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 463998} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} --- !u!4 &498692 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 193266} m_LocalRotation: {x: 0.000000017797277, y: 0.14720337, z: 0.012063239, w: 0.9890327} m_LocalPosition: {x: 0.02673147, y: 0.046953294, z: 0.1026548} m_LocalScale: {x: 0.99999994, y: 0.99999994, z: 0.9999999} m_Children: - {fileID: 447366} m_Father: {fileID: 466798} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &499994 Transform: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 163654} m_LocalRotation: {x: 0.0000007748599, y: -0.00000043213427, z: -0.00000084936573, w: 1} m_LocalPosition: {x: -0.0000009536743, y: -0.0000010681152, z: 0.16675788} m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 0.99999994} m_Children: [] m_Father: {fileID: 405056} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!95 &9536708 Animator: serializedVersion: 3 m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 197224} m_Enabled: 1 m_Avatar: {fileID: 9000000, guid: dd6ec75974b69a3409711f8110698bbb, type: 3} m_Controller: {fileID: 9100000, guid: a0702f03fac0faa4d983e423203b2fb4, type: 2} m_CullingMode: 1 m_UpdateMode: 0 m_ApplyRootMotion: 1 m_LinearVelocityBlending: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 --- !u!114 &11400794 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 169290} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 403656} boneAxis: {x: 0, y: 0, z: 1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11475410} debug: 1 threshold: 0.01 --- !u!114 &11401110 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 192952} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 471556} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: [] debug: 1 threshold: 0.01 --- !u!114 &11401616 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 130868} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 405344} boneAxis: {x: 0, y: 0, z: -1} radius: 0.03 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.01, z: 0} colliders: - {fileID: 11455728} - {fileID: 11485412} - {fileID: 11472872} debug: 1 threshold: 0.01 --- !u!114 &11403798 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 197224} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: a38e39ada51aaba4db6d352ce218849e, type: 3} m_Name: m_EditorClassIdentifier: isWindActive: 1 threshold: 0.5 interval: 5 windPower: 1 gravity: 0.98 isGUI: 0 --- !u!114 &11410642 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 163622} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 427704} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11455728} - {fileID: 11487032} - {fileID: 11422026} debug: 1 threshold: 0.01 --- !u!114 &11413768 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 105166} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 493618} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.01, z: 0} colliders: - {fileID: 11455728} - {fileID: 11485412} - {fileID: 11472872} debug: 1 threshold: 0.01 --- !u!114 &11414194 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 149068} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 428160} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.01, z: 0} colliders: - {fileID: 11455728} - {fileID: 11487032} - {fileID: 11422026} debug: 1 threshold: 0.01 --- !u!114 &11422026 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 115666} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.06 --- !u!114 &11423942 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 168742} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 453694} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: [] debug: 1 threshold: 0.01 --- !u!114 &11427652 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 124286} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 471242} boneAxis: {x: -1, y: 0, z: 0} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: [] debug: 1 threshold: 0.01 --- !u!114 &11432284 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 187898} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 444686} boneAxis: {x: 0, y: 0, z: 1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11475410} debug: 1 threshold: 0.01 --- !u!114 &11433068 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 163442} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.05 --- !u!114 &11440608 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 103636} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 460394} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11475410} - {fileID: 11477726} - {fileID: 11433068} - {fileID: 11453144} - {fileID: 11460292} debug: 1 threshold: 0.01 --- !u!114 &11441024 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 198480} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 470710} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11475410} - {fileID: 11494026} - {fileID: 11450774} - {fileID: 11453144} - {fileID: 11466700} debug: 1 threshold: 0.01 --- !u!114 &11441606 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 163416} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 499994} boneAxis: {x: 0, y: 0, z: 1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11475410} debug: 1 threshold: 0.01 --- !u!114 &11443736 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 197224} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 6514ba86f976d724ab63844a6015b2aa, type: 3} m_Name: m_EditorClassIdentifier: dynamicRatio: 1 stiffnessForce: 0.01 stiffnessCurve: serializedVersion: 2 m_Curve: - serializedVersion: 2 time: 0 value: 0.010707155 inSlope: 0 outSlope: 0 tangentMode: 0 - serializedVersion: 2 time: 1 value: 0.010707155 inSlope: 0 outSlope: 0 tangentMode: 0 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 dragForce: 0.4 dragCurve: serializedVersion: 2 m_Curve: - serializedVersion: 2 time: 0 value: 0.40000004 inSlope: 0 outSlope: 0 tangentMode: 0 - serializedVersion: 2 time: 1 value: 0.40000004 inSlope: 0 outSlope: 0 tangentMode: 0 m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 springBones: - {fileID: 11423942} - {fileID: 11493618} - {fileID: 11483922} - {fileID: 11427652} - {fileID: 11477592} - {fileID: 11475020} - {fileID: 11441024} - {fileID: 11478798} - {fileID: 11400794} - {fileID: 11461428} - {fileID: 11413768} - {fileID: 11463516} - {fileID: 11401616} - {fileID: 11449226} - {fileID: 11401110} - {fileID: 11493890} - {fileID: 11480238} - {fileID: 11484052} - {fileID: 11494580} - {fileID: 11440608} - {fileID: 11432284} - {fileID: 11485610} - {fileID: 11441606} - {fileID: 11414194} - {fileID: 11410642} - {fileID: 11490566} - {fileID: 11496038} --- !u!114 &11449226 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 171812} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 404752} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: [] debug: 1 threshold: 0.01 --- !u!114 &11450774 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 138054} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.05 --- !u!114 &11453144 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 193582} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.1 --- !u!114 &11455728 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 193394} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.08 --- !u!114 &11460292 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 128454} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.07 --- !u!114 &11461428 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 134016} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 406836} boneAxis: {x: 0, y: 0, z: 1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11475410} debug: 1 threshold: 0.01 --- !u!114 &11463516 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 174752} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 414828} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11455728} - {fileID: 11485412} - {fileID: 11472872} debug: 1 threshold: 0.01 --- !u!114 &11463618 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 197224} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5e658bfc1e524494b9e54a1c92d8c1e0, type: 3} m_Name: m_EditorClassIdentifier: animations: - {fileID: 7400000, guid: 5ba07efc7490d48959dfb3879f8be04a, type: 2} - {fileID: 7400000, guid: cec97cfaae8c7454f9e3fb92ebf3b337, type: 2} - {fileID: 7400000, guid: d022baae72960439ca9bc35168cde644, type: 2} - {fileID: 7400000, guid: 7fb84b7bbc6fe402a8a888ea10646789, type: 2} - {fileID: 7400000, guid: ccf2553d159754da6b08936ec9999869, type: 2} - {fileID: 7400000, guid: e4b9611887a9f43c0ae3fc39870a7b5f, type: 2} - {fileID: 7400000, guid: e996ba46f070c4ec9b73996777f95a10, type: 2} - {fileID: 7400000, guid: 4b7c62bb2e05c47c5afd5486e2eceaf6, type: 2} - {fileID: 7400000, guid: 052052524e8fd4e47b75db0131b4b118, type: 2} - {fileID: 7400000, guid: a9388e606933645cdbb57d61ab9cc186, type: 2} - {fileID: 7400000, guid: 0c7ae9e4974854c81a425f98211bc25f, type: 2} - {fileID: 7400000, guid: 1c6ef5f43979d4ac396faf724a6a4dd0, type: 2} - {fileID: 7400000, guid: 2ac255bd0dd6047e9b2df5ac70b1c45d, type: 2} - {fileID: 7400000, guid: a13d16a8fe186444f9bd2b411d43351c, type: 2} - {fileID: 7400000, guid: 73be46601457e417584986e26fcaf567, type: 2} - {fileID: 7400000, guid: e7c86dc2bf7f54f6caa8076d5b450437, type: 2} - {fileID: 7400000, guid: 24f6fd9f7d6e14b429858f4d017e7195, type: 2} - {fileID: 7400000, guid: 0ccfe86ed1121478bbeacb8e227ec19c, type: 2} - {fileID: 7400000, guid: 508261753cbbd4493b10da3a43602a39, type: 2} delayWeight: 3 isKeepFace: 1 isGUI: 0 --- !u!114 &11466700 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 174252} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.07 --- !u!114 &11472872 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 147564} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.06 --- !u!114 &11474006 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 197224} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: b450e0eeaa67f4e4f83448b61a571d3b, type: 3} m_Name: m_EditorClassIdentifier: isActive: 1 ref_face: {fileID: 13754798} ratio_Close: 85 ratio_HalfClose: 20 index_EYE_blk: 0 index_EYE_sml: 1 index_EYE_dmg: 15 ratio_Open: 0 timeBlink: 0.4 threshold: 0.3 interval: 3 --- !u!114 &11475020 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 192564} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 422496} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11475410} - {fileID: 11494026} - {fileID: 11450774} - {fileID: 11453144} debug: 1 threshold: 0.01 --- !u!114 &11475410 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 174846} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.2 --- !u!114 &11477592 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 186786} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 466900} boneAxis: {x: 0, y: 0, z: -1} radius: 0.08 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.007, z: 0} colliders: - {fileID: 11475410} - {fileID: 11494026} - {fileID: 11450774} - {fileID: 11453144} debug: 1 threshold: 0.01 --- !u!114 &11477726 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 185054} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.05 --- !u!114 &11478798 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 192032} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 410782} boneAxis: {x: 0, y: 0, z: 1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11475410} debug: 1 threshold: 0.01 --- !u!114 &11480238 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 175036} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 475456} boneAxis: {x: 1, y: 0, z: 0} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: [] debug: 1 threshold: 0.01 --- !u!114 &11483922 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 160016} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 421266} boneAxis: {x: -1, y: 0, z: 0} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: [] debug: 1 threshold: 0.01 --- !u!114 &11484052 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 174474} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 487328} boneAxis: {x: 0, y: 0, z: -1} radius: 0.08 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.007, z: 0} colliders: - {fileID: 11475410} - {fileID: 11477726} - {fileID: 11433068} - {fileID: 11453144} debug: 1 threshold: 0.01 --- !u!114 &11485412 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 116026} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.05 --- !u!114 &11485610 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 147914} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 405056} boneAxis: {x: 0, y: 0, z: 1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11475410} debug: 1 threshold: 0.01 --- !u!114 &11487032 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 140138} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.05 --- !u!114 &11490566 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 167034} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 468316} boneAxis: {x: 0, y: 0, z: -1} radius: 0.03 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.01, z: 0} colliders: - {fileID: 11455728} - {fileID: 11487032} - {fileID: 11422026} debug: 1 threshold: 0.01 --- !u!114 &11493534 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 197224} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 058a2736f2afd564eae55007a87eed87, type: 3} m_Name: m_EditorClassIdentifier: _random: 0 _threshold: 0.5 _interval: 10 isGUI: 0 --- !u!114 &11493618 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 133628} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 485478} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: [] debug: 1 threshold: 0.01 --- !u!114 &11493890 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 148588} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 488512} boneAxis: {x: 1, y: 0, z: 0} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: [] debug: 1 threshold: 0.01 --- !u!114 &11494026 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 163968} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fcb73b690c023734fb267911061a15c6, type: 3} m_Name: m_EditorClassIdentifier: radius: 0.05 --- !u!114 &11494580 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 147960} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 479532} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.4 springForce: {x: 0, y: -0.0001, z: 0} colliders: - {fileID: 11475410} - {fileID: 11477726} - {fileID: 11433068} - {fileID: 11453144} debug: 1 threshold: 0.01 --- !u!114 &11496038 MonoBehaviour: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 194192} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 37b7c58dc2d739b4c90fe59f6875debf, type: 3} m_Name: m_EditorClassIdentifier: child: {fileID: 443468} boneAxis: {x: 0, y: 0, z: -1} radius: 0.05 isUseEachBoneForceSettings: 1 stiffnessForce: 0.01 dragForce: 0.1 springForce: {x: 0, y: -0.0001, z: 0} colliders: [] debug: 1 threshold: 0.01 --- !u!137 &13709152 SkinnedMeshRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 189664} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 2 m_Materials: - {fileID: 2100000, guid: e0bcb7711e193a14cbf50e0e4669856f, type: 2} - {fileID: 2100000, guid: f85bb41401631bd468026d9d11deb0da, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 serializedVersion: 2 m_Quality: 0 m_UpdateWhenOffscreen: 0 m_SkinnedMotionVectors: 1 m_Mesh: {fileID: 4300002, guid: dd6ec75974b69a3409711f8110698bbb, type: 3} m_Bones: - {fileID: 495514} - {fileID: 441392} - {fileID: 402048} - {fileID: 466900} - {fileID: 422496} - {fileID: 422784} - {fileID: 410782} - {fileID: 403656} - {fileID: 405740} - {fileID: 435546} - {fileID: 487328} - {fileID: 479532} - {fileID: 485144} - {fileID: 444686} - {fileID: 405056} m_BlendShapeWeights: [] m_RootBone: {fileID: 495514} m_AABB: m_Center: {x: 0, y: 0.26, z: 0.026} m_Extent: {x: 0.487, y: 0.359, z: 0.572} m_DirtyAABB: 0 --- !u!137 &13715496 SkinnedMeshRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 149922} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 2 m_Materials: - {fileID: 2100000, guid: d3ad50d6134293d4fa208fb666d198b2, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 serializedVersion: 2 m_Quality: 0 m_UpdateWhenOffscreen: 0 m_SkinnedMotionVectors: 1 m_Mesh: {fileID: 4300010, guid: dd6ec75974b69a3409711f8110698bbb, type: 3} m_Bones: - {fileID: 495514} - {fileID: 420014} - {fileID: 401650} m_BlendShapeWeights: [] m_RootBone: {fileID: 495514} m_AABB: m_Center: {x: 0.019, y: -0.111, z: 0.188} m_Extent: {x: 0.037, y: 0.044, z: 0.105} m_DirtyAABB: 0 --- !u!137 &13734710 SkinnedMeshRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 105662} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 2 m_Materials: - {fileID: 2100000, guid: d3ad50d6134293d4fa208fb666d198b2, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 serializedVersion: 2 m_Quality: 0 m_UpdateWhenOffscreen: 0 m_SkinnedMotionVectors: 1 m_Mesh: {fileID: 4300006, guid: dd6ec75974b69a3409711f8110698bbb, type: 3} m_Bones: - {fileID: 421266} - {fileID: 489738} - {fileID: 495514} - {fileID: 489894} - {fileID: 488512} m_BlendShapeWeights: [] m_RootBone: {fileID: 495514} m_AABB: m_Center: {x: 0, y: -0.03, z: 0.16} m_Extent: {x: 0.295, y: 0.12, z: 0.176} m_DirtyAABB: 0 --- !u!137 &13739638 SkinnedMeshRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 168348} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_Materials: - {fileID: 2100000, guid: dc973ab4b5c2d0f489351b4b9b2ad1b5, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 serializedVersion: 2 m_Quality: 0 m_UpdateWhenOffscreen: 0 m_SkinnedMotionVectors: 1 m_Mesh: {fileID: 4300004, guid: dd6ec75974b69a3409711f8110698bbb, type: 3} m_Bones: - {fileID: 400478} - {fileID: 452790} - {fileID: 495940} - {fileID: 475842} - {fileID: 466798} - {fileID: 459752} - {fileID: 494738} - {fileID: 406358} - {fileID: 416448} - {fileID: 428196} - {fileID: 493618} - {fileID: 476014} - {fileID: 428160} - {fileID: 430642} - {fileID: 464586} - {fileID: 495216} - {fileID: 448580} - {fileID: 412410} - {fileID: 450538} - {fileID: 459154} - {fileID: 482624} - {fileID: 471968} - {fileID: 401394} - {fileID: 492094} - {fileID: 423662} - {fileID: 464660} - {fileID: 406120} - {fileID: 486260} - {fileID: 463448} - {fileID: 458890} - {fileID: 432790} - {fileID: 411554} - {fileID: 424664} - {fileID: 410892} - {fileID: 409428} - {fileID: 433318} - {fileID: 436990} - {fileID: 445974} - {fileID: 425290} - {fileID: 498692} - {fileID: 457492} - {fileID: 424704} - {fileID: 411960} - {fileID: 424044} - {fileID: 474840} - {fileID: 437260} - {fileID: 419232} - {fileID: 424754} - {fileID: 474790} - {fileID: 461876} - {fileID: 446758} - {fileID: 492704} - {fileID: 497564} - {fileID: 447366} - {fileID: 450632} - {fileID: 479342} - {fileID: 409880} - {fileID: 402178} - {fileID: 412052} - {fileID: 418178} - {fileID: 431390} - {fileID: 443940} - {fileID: 483210} - {fileID: 495514} - {fileID: 431466} m_BlendShapeWeights: [] m_RootBone: {fileID: 495940} m_AABB: m_Center: {x: 0, y: 0.008, z: -0.081} m_Extent: {x: 0.324, y: 0.145, z: 0.336} m_DirtyAABB: 0 --- !u!137 &13754798 SkinnedMeshRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 128060} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 2 m_Materials: - {fileID: 2100000, guid: 74cdcbc544573354cbb8046be7f6d625, type: 2} - {fileID: 2100000, guid: 59bf2d8771a54d54a85261a693d9a99b, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 serializedVersion: 2 m_Quality: 0 m_UpdateWhenOffscreen: 0 m_SkinnedMotionVectors: 1 m_Mesh: {fileID: 4300000, guid: dd6ec75974b69a3409711f8110698bbb, type: 3} m_Bones: [] m_BlendShapeWeights: - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 m_RootBone: {fileID: 0} m_AABB: m_Center: {x: 0, y: 0.754, z: 0.045} m_Extent: {x: 0.141, y: 0.115, z: 0.069} m_DirtyAABB: 0 --- !u!137 &13776644 SkinnedMeshRenderer: m_ObjectHideFlags: 1 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 100100000} m_GameObject: {fileID: 117122} m_Enabled: 1 m_CastShadows: 1 m_ReceiveShadows: 1 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 2 m_Materials: - {fileID: 2100000, guid: 696a8f70a1249e149b905201941ebaf7, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 m_StaticBatchRoot: {fileID: 0} m_ProbeAnchor: {fileID: 0} m_LightProbeVolumeOverride: {fileID: 0} m_ScaleInLightmap: 1 m_PreserveUVs: 0 m_IgnoreNormalsForChartDetection: 0 m_ImportantGI: 0 m_SelectedEditorRenderState: 3 m_MinimumChartSize: 4 m_AutoUVMaxDistance: 0.5 m_AutoUVMaxAngle: 89 m_LightmapParameters: {fileID: 0} m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 serializedVersion: 2 m_Quality: 0 m_UpdateWhenOffscreen: 0 m_SkinnedMotionVectors: 1 m_Mesh: {fileID: 4300008, guid: dd6ec75974b69a3409711f8110698bbb, type: 3} m_Bones: - {fileID: 459530} - {fileID: 428930} m_BlendShapeWeights: [] m_RootBone: {fileID: 428930} m_AABB: m_Center: {x: -0.027, y: -0.108, z: -0.021} m_Extent: {x: 0.094, y: 0.008, z: 0.034} m_DirtyAABB: 0 --- !u!1001 &100100000 Prefab: m_ObjectHideFlags: 1 serializedVersion: 2 m_Modification: m_TransformParent: {fileID: 0} m_Modifications: [] m_RemovedComponents: [] m_ParentPrefab: {fileID: 0} m_RootGameObject: {fileID: 197224} m_IsPrefabParent: 1
{'repo_name': 'unity3d-jp/UnityChanToonShaderVer2_Project', 'stars': '1198', 'repo_language': 'ShaderLab', 'file_name': 'UTS2_Manual_en.md', 'mime_type': 'text/plain', 'hash': 6985827408044659892, 'source_dataset': 'data'}
/* Copyright (c) 2011, Intel Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * 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 of Intel Corporation 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 THE COPYRIGHT OWNER OR CONTRIBUTORS 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. ******************************************************************************** * Content : Eigen bindings to Intel(R) MKL * LU decomposition with partial pivoting based on LAPACKE_?getrf function. ******************************************************************************** */ #ifndef EIGEN_PARTIALLU_LAPACK_H #define EIGEN_PARTIALLU_LAPACK_H #include "Eigen/src/Core/util/MKL_support.h" namespace Eigen { namespace internal { /** \internal Specialization for the data types supported by MKL */ #define EIGEN_MKL_LU_PARTPIV(EIGTYPE, MKLTYPE, MKLPREFIX) \ template<int StorageOrder> \ struct partial_lu_impl<EIGTYPE, StorageOrder, lapack_int> \ { \ /* \internal performs the LU decomposition in-place of the matrix represented */ \ static lapack_int blocked_lu(lapack_int rows, lapack_int cols, EIGTYPE* lu_data, lapack_int luStride, lapack_int* row_transpositions, lapack_int& nb_transpositions, lapack_int maxBlockSize=256) \ { \ EIGEN_UNUSED_VARIABLE(maxBlockSize);\ lapack_int matrix_order, first_zero_pivot; \ lapack_int m, n, lda, *ipiv, info; \ EIGTYPE* a; \ /* Set up parameters for ?getrf */ \ matrix_order = StorageOrder==RowMajor ? LAPACK_ROW_MAJOR : LAPACK_COL_MAJOR; \ lda = luStride; \ a = lu_data; \ ipiv = row_transpositions; \ m = rows; \ n = cols; \ nb_transpositions = 0; \ \ info = LAPACKE_##MKLPREFIX##getrf( matrix_order, m, n, (MKLTYPE*)a, lda, ipiv ); \ \ for(int i=0;i<m;i++) { ipiv[i]--; if (ipiv[i]!=i) nb_transpositions++; } \ \ eigen_assert(info >= 0); \ /* something should be done with nb_transpositions */ \ \ first_zero_pivot = info; \ return first_zero_pivot; \ } \ }; EIGEN_MKL_LU_PARTPIV(double, double, d) EIGEN_MKL_LU_PARTPIV(float, float, s) EIGEN_MKL_LU_PARTPIV(dcomplex, MKL_Complex16, z) EIGEN_MKL_LU_PARTPIV(scomplex, MKL_Complex8, c) } // end namespace internal } // end namespace Eigen #endif // EIGEN_PARTIALLU_LAPACK_H
{'repo_name': 'cvxgrp/cvxpy', 'stars': '2656', 'repo_language': 'C++', 'file_name': 'cvxpy_alabaster.css', 'mime_type': 'text/plain', 'hash': 5138338275350723816, 'source_dataset': 'data'}
[kakao](../../index.md) / [com.agoda.kakao.common.builders](../index.md) / [RootBuilder](index.md) / [isSystemAlertWindow](./is-system-alert-window.md) # isSystemAlertWindow `fun isSystemAlertWindow(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) Matches root that is system alert window
{'repo_name': 'agoda-com/Kakao', 'stars': '1039', 'repo_language': 'Kotlin', 'file_name': 'KViewPager.kt', 'mime_type': 'text/plain', 'hash': -975627571937885905, 'source_dataset': 'data'}
# ASK resource type reference<a name="Alexa_ASK"></a> **Resource types** + [Alexa::ASK::Skill](aws-resource-ask-skill.md)
{'repo_name': 'awsdocs/aws-cloudformation-user-guide', 'stars': '411', 'repo_language': 'None', 'file_name': 'aws-properties-backup-backupvault-notificationobjecttype.md', 'mime_type': 'text/plain', 'hash': 8451302793266640228, 'source_dataset': 'data'}
<?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright 2009-2013 Roland Huss ~ ~ 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. --> <section id="write"> <title>Writing attributes (write)</title> <para> Writing an attribute is quite similar to reading one, except that the request takes an additional <constant>value</constant> element. </para> <section id="get-write"> <title>GET write request</title> <para> Writing an attribute wit an GET request, an URL with the following format has to be used: <synopsis><![CDATA[<base url>/write/<mbean name>/<attribute name>/<value>/<inner path>]]></synopsis> </para> <table> <title>GET Write Request</title> <thead> <tr> <td>Part</td> <td>Description</td> <td>Example</td> </tr> </thead> <tr> <td><literal>&lt;mbean name&gt;</literal></td> <td>MBean's ObjectName</td> <td><literal>java.lang:type=ClassLoading</literal></td> </tr> <tr> <td><literal>&lt;attribute name&gt;</literal></td> <td>Name of attribute to set</td> <td><literal>Verbose</literal></td> </tr> <tr> <td><literal>&lt;value&gt;</literal></td> <td> The attribute name to value. The value must be serializable as described in <xref linkend="serialization-request"/>. </td> <td><literal>true</literal></td> </tr> <tr> <td><literal>&lt;path&gt;</literal></td> <td> Inner path for accessing the parent object on which to set the value. (See also <xref linkend="paths"/>). Note, that this is <emphasis>not</emphasis> the path to the attribute itself, but to the object carrying this attribute. With a given path it is possible to deeply set an value on a complex object. </td> <td></td> </tr> </table> <para> For example, you can set the garbage collector to verbose mode by using something like <informalexample> <literallayout class="monospaced">http://localhost:8080/jolokia/write/java.lang:type=Memory/Verbose/true</literallayout> </informalexample> </para> </section> <section id="post-write"> <title>POST write request</title> <para> The keys which are evaluated for a POST write request are: </para> <table> <title>POST Write Request</title> <thead> <tr> <td>Key</td> <td>Description</td> <td>Example</td> </tr> </thead> <tr> <td><constant>type</constant></td> <td><emphasis role="bold">write</emphasis></td> <td/> </tr> <tr> <td><constant>mbean</constant></td> <td>MBean's ObjectName</td> <td><literal>java.lang:type=ClassLoading</literal></td> </tr> <tr> <td><constant>attribute</constant></td> <td>Name of attribute to set</td> <td><literal>Verbose</literal></td> </tr> <tr> <td><constant>value</constant></td> <td> The attribute name to value. The value must be serializable as described in <xref linkend="serialization-request"/>. </td> <td><literal>true</literal></td> </tr> <tr> <td><constant>path</constant></td> <td> An optional inner path for specifying an inner object on which to set the value. See <xref linkend="paths"/> for more on inner paths. </td> <td></td> </tr> </table> </section> <section id="response-write"> <title>Write response</title> <para> As response for a write operation the old attribute's value is returned. For a request <synopsis><![CDATA[http://localhost:8080/jolokia/write/java.lang:type=ClassLoading/Verbose/true]]></synopsis> you get the answer (supposed that verbose mode was switched off for class loading at the time this request was sent) </para> <programlisting><![CDATA[ { "value":"false", "status":200, "request": { "mbean":"java.lang:type=ClassLoading", "type":"write", "attribute":"Verbose", "value":true } }]]></programlisting> <para> The response is quite similar to the read operation except for the additional <constant>value</constant> element in the request (and of course, the different <constant>type</constant>). </para> </section> </section>
{'repo_name': 'rhuss/jolokia', 'stars': '682', 'repo_language': 'Java', 'file_name': 'index.apt', 'mime_type': 'text/plain', 'hash': 5646904038595254674, 'source_dataset': 'data'}
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. 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. ==============================================================================*/ #include "tensorflow/core/profiler/internal/gpu/cupti_tracer.h" #include "tensorflow/core/lib/core/errors.h" #include "tensorflow/core/lib/gtl/cleanup.h" #include "tensorflow/core/platform/annotation.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/mem.h" namespace tensorflow { namespace profiler { namespace { // Maps an OverheadKind enum to a const string. const char *getActivityOverheadKindString(CUpti_ActivityOverheadKind kind) { switch (kind) { case CUPTI_ACTIVITY_OVERHEAD_DRIVER_COMPILER: return "COMPILER"; case CUPTI_ACTIVITY_OVERHEAD_CUPTI_BUFFER_FLUSH: return "BUFFER_FLUSH"; case CUPTI_ACTIVITY_OVERHEAD_CUPTI_INSTRUMENTATION: return "INSTRUMENTATION"; case CUPTI_ACTIVITY_OVERHEAD_CUPTI_RESOURCE: return "RESOURCE"; default: break; } return "<UNKNOWN>"; } const char *getActivityUnifiedMemoryKindString( CUpti_ActivityUnifiedMemoryCounterKind kind) { switch (kind) { case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD: return "UM_BYTES_TRANSFER_HTOD"; case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH: return "UM_BYTES_TRANSFER_DTOH"; case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT: return "UM_CPU_PAGE_FAULT"; case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_GPU_PAGE_FAULT: return "UM_GPU_PAGE_FAULT"; case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING: return "UM_THRASHING"; case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THROTTLING: return "UM_THROTTLING"; case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP: return "UM_REMOTE_MAP"; case CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOD: return "UM_BYTES_TRANSFER_DTOD"; default: break; } return "<UNKNOWN>"; } #define RETURN_IF_CUPTI_ERROR(expr) \ do { \ CUptiResult status = expr; \ if (status != CUPTI_SUCCESS) { \ const char *errstr = ""; \ cupti_interface_->GetResultString(status, &errstr); \ LOG(ERROR) << "function " << #expr << "failed with error " << errstr; \ return errors::Internal(absl::StrCat("cutpi call error", errstr)); \ } \ } while (false) // GetCachedTID() caches the thread ID in thread-local storage (which is a // userspace construct) to avoid unnecessary system calls. Without this caching, // it can take roughly 98ns, while it takes roughly 1ns with this caching. pid_t GetCachedTID() { static thread_local pid_t current_thread_id = Env::Default()->GetCurrentThreadId(); return current_thread_id; } size_t Bytes2D(const CUDA_MEMCPY2D *p) { return p->Height * p->WidthInBytes; } size_t Bytes3D(const CUDA_MEMCPY3D *p) { return p->Depth * p->Height * p->WidthInBytes; } template <typename CudaMemcpy> CuptiTracerEventType MemcpyKind(const CudaMemcpy *p) { if (p->srcMemoryType == CU_MEMORYTYPE_HOST && p->dstMemoryType == CU_MEMORYTYPE_DEVICE) { return CuptiTracerEventType::MemcpyH2D; } if (p->srcMemoryType == CU_MEMORYTYPE_DEVICE && p->dstMemoryType == CU_MEMORYTYPE_HOST) { return CuptiTracerEventType::MemcpyD2H; } if (p->srcMemoryType == CU_MEMORYTYPE_DEVICE && p->dstMemoryType == CU_MEMORYTYPE_DEVICE) { return CuptiTracerEventType::MemcpyD2D; } return CuptiTracerEventType::Unsupported; } std::tuple<size_t /*bytes*/, CuptiTracerEventType, bool /*async*/> DecodeDriverMemcpy(CUpti_CallbackId cbid, const void *params) { switch (cbid) { case CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD_v2: { const auto *p = reinterpret_cast<const cuMemcpyHtoD_v2_params *>(params); return std::make_tuple(p->ByteCount, CuptiTracerEventType::MemcpyH2D, false); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync_v2: { const auto *p = reinterpret_cast<const cuMemcpyHtoDAsync_v2_params *>(params); return std::make_tuple(p->ByteCount, CuptiTracerEventType::MemcpyH2D, true); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH_v2: { const auto *p = reinterpret_cast<const cuMemcpyDtoH_v2_params *>(params); return std::make_tuple(p->ByteCount, CuptiTracerEventType::MemcpyD2H, false); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync_v2: { const auto *p = reinterpret_cast<const cuMemcpyDtoHAsync_v2_params *>(params); return std::make_tuple(p->ByteCount, CuptiTracerEventType::MemcpyD2H, true); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD_v2: { const auto *p = reinterpret_cast<const cuMemcpyDtoD_v2_params *>(params); return std::make_tuple(p->ByteCount, CuptiTracerEventType::MemcpyD2D, false); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync_v2: { const auto *p = reinterpret_cast<const cuMemcpyDtoDAsync_v2_params *>(params); return std::make_tuple(p->ByteCount, CuptiTracerEventType::MemcpyD2D, true); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpy: { const auto *p = reinterpret_cast<const cuMemcpy_params *>(params); return std::make_tuple(p->ByteCount, CuptiTracerEventType::Unsupported, false); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpyAsync: { const auto *p = reinterpret_cast<const cuMemcpyAsync_params *>(params); return std::make_tuple(p->ByteCount, CuptiTracerEventType::Unsupported, true); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D_v2: { const auto *p = reinterpret_cast<const cuMemcpy2D_v2_params *>(params); return std::make_tuple(Bytes2D(p->pCopy), MemcpyKind(p->pCopy), false); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync_v2: { const auto *p = reinterpret_cast<const cuMemcpy2DAsync_v2_params *>(params); return std::make_tuple(Bytes2D(p->pCopy), MemcpyKind(p->pCopy), true); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D_v2: { const auto *p = reinterpret_cast<const cuMemcpy3D_v2_params *>(params); return std::make_tuple(Bytes3D(p->pCopy), MemcpyKind(p->pCopy), true); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync_v2: { const auto *p = reinterpret_cast<const cuMemcpy3DAsync_v2_params *>(params); return std::make_tuple(Bytes3D(p->pCopy), MemcpyKind(p->pCopy), true); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeer: { const cuMemcpyPeer_params *p2p_params = reinterpret_cast<const cuMemcpyPeer_params *>(params); return std::make_tuple(p2p_params->ByteCount, CuptiTracerEventType::MemcpyP2P, false); } case CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeerAsync: { const cuMemcpyPeerAsync_params_st *p2p_params = reinterpret_cast<const cuMemcpyPeerAsync_params_st *>(params); return std::make_tuple(p2p_params->ByteCount, CuptiTracerEventType::MemcpyP2P, true); } default: { LOG(ERROR) << "Unsupported memcpy activity observed: " << cbid; return std::make_tuple(0, CuptiTracerEventType::Unsupported, false); } } } // Cupti callback corresponding to a driver or runtime API. This global function // is invoked twice for each API: at entry and at exit. The callback_info // parameter is guaranteed by Cupti to be thread-safe. Most invocations are // dropped to the floor and entry/exit is tracked for the APIs we deem // performance-relevant. void CUPTIAPI ApiCallback(void *user_data, CUpti_CallbackDomain domain, CUpti_CallbackId cbid, const CUpti_CallbackData *callback_info) { CuptiTracer *tracer = reinterpret_cast<CuptiTracer *>(user_data); tracer->HandleCallback(domain, cbid, callback_info).IgnoreError(); } // Callback which is invoked when an empty buffer is requested by CUPTI. // Allocates an empty aligned-memory buffer. The buffer is used by CUPTI as a // ring buffer where device maintains activity profiles that have been // collected. void CUPTIAPI AllocCuptiActivityBuffer(uint8_t **buffer, size_t *size, size_t *maxNumRecords) { // Buffer size and alignment, 32K and 8 as in CUPTI samples. constexpr size_t kBufferSize = 32 * 1024; constexpr int kBufferAlignSize = 8; *buffer = reinterpret_cast<uint8_t *>( port::AlignedMalloc(kBufferSize, kBufferAlignSize)); if (*buffer == nullptr) { LOG(WARNING) << "Cupti Buffer not allocated, activity records will be dropped"; return; } *size = kBufferSize; *maxNumRecords = 0; // Cupti to fill as many records as fit in the buffer. VLOG(3) << "Allocated Cupti Buffer, buffer=" << std::hex << reinterpret_cast<uintptr_t>(*buffer) << std::dec << " size=" << *size; } // Callback which is invoked when a buffer containing activity records is // available from CUPTI. Frees the buffer after reading activity records from // it. void CUPTIAPI FreeCuptiActivityBuffer(CUcontext context, uint32_t stream_id, uint8_t *buffer, size_t size, size_t valid_size) { VLOG(3) << "Freeing Cupti Buffer, buffer:" << std::hex << reinterpret_cast<uintptr_t>(buffer) << std::dec << " size: " << size << " valid_size: " << valid_size; // Ensure buffer is free when this function returns. auto buffer_cleanup = gtl::MakeCleanup([buffer] { port::AlignedFree(buffer); }); if (valid_size <= 0) { return; } VLOG(3) << "Activity profile for stream " << stream_id; CuptiTracer *cupti_tracer = CuptiTracer::GetCuptiTracerSingleton(); cupti_tracer->ProcessActivityBuffer(context, stream_id, buffer, valid_size) .IgnoreError(); } void AddKernelEventUponApiExit(CuptiTraceCollector *collector, uint32 device_id, const CUpti_CallbackData *callback_info, uint64 start_time, uint64 end_time) { CuptiTracerEvent event; event.type = CuptiTracerEventType::Kernel; event.source = CuptiTracerEventSource::DriverCallback; event.name = callback_info->symbolName; event.start_time_ns = start_time; event.end_time_ns = end_time; event.thread_id = GetCachedTID(); event.device_id = device_id; event.context_id = callback_info->contextUid; event.correlation_id = callback_info->correlationId; VLOG(3) << "Cuda Kernel Launched: " << event.name; collector->AddEvent(std::move(event)); } // Performs the actual callback for both normal and P2P memcpy operations. CuptiTracerEvent PopulateMemcpyCallbackEvent( CuptiTracerEventType type, const CUpti_CallbackData *callback_info, size_t num_bytes, uint32 src_device, uint32 dst_device, bool async, uint64 start_time, uint64 end_time) { CuptiTracerEvent event; event.type = type; event.source = CuptiTracerEventSource::DriverCallback; event.start_time_ns = start_time; event.end_time_ns = end_time; event.thread_id = GetCachedTID(); event.device_id = src_device; event.context_id = callback_info->contextUid; event.correlation_id = callback_info->correlationId; event.memcpy_info.kind = CUPTI_ACTIVITY_MEMCPY_KIND_UNKNOWN; event.memcpy_info.num_bytes = num_bytes; event.memcpy_info.destination = dst_device; event.memcpy_info.async = async; return event; } void AddNormalMemcpyEventUponApiExit(CuptiTraceCollector *collector, uint32 device_id, CUpti_CallbackId cbid, const CUpti_CallbackData *callback_info, uint64 start_time, uint64 end_time) { size_t num_bytes; CuptiTracerEventType type; bool async; std::tie(num_bytes, type, async) = DecodeDriverMemcpy(cbid, callback_info->functionParams); VLOG(3) << "Cuda Memcpy observed :" << num_bytes; CuptiTracerEvent event = PopulateMemcpyCallbackEvent(type, callback_info, num_bytes, device_id, device_id, async, start_time, end_time); collector->AddEvent(std::move(event)); } void AddP2PMemcpyEventUponApiExit(CuptiTraceCollector *collector, CuptiInterface *cupti_interface, uint32 device_id, CUpti_CallbackId cbid, const CUpti_CallbackData *callback_info, uint64 start_time, uint64 end_time) { size_t num_bytes; CuptiTracerEventType type; bool async; std::tie(num_bytes, type, async) = DecodeDriverMemcpy(cbid, callback_info->functionParams); uint32 dst_device = -1, src_device = -1; const cuMemcpyPeer_params *p2p_params = reinterpret_cast<const cuMemcpyPeer_params *>( callback_info->functionParams); cupti_interface->GetDeviceId(p2p_params->srcContext, &src_device); cupti_interface->GetDeviceId(p2p_params->dstContext, &dst_device); VLOG(3) << "Cuda P2P Memcpy observed, src: " << src_device << " dst: " << dst_device << " size:" << num_bytes; CuptiTracerEvent event = PopulateMemcpyCallbackEvent(type, callback_info, num_bytes, src_device, dst_device, async, start_time, end_time); collector->AddEvent(std::move(event)); } void AddCudaMallocEventUponApiExit(CuptiTraceCollector *collector, uint32 device_id, CUpti_CallbackId cbid, const CUpti_CallbackData *callback_info, uint64 start_time, uint64 end_time) { const cuMemAlloc_v2_params_st *params = reinterpret_cast<const cuMemAlloc_v2_params_st *>( callback_info->functionParams); CuptiTracerEvent event; event.type = CuptiTracerEventType::MemoryAlloc; event.source = CuptiTracerEventSource::DriverCallback; event.name = callback_info->functionName; event.start_time_ns = start_time; event.end_time_ns = end_time; event.thread_id = GetCachedTID(); event.device_id = device_id; event.context_id = callback_info->contextUid; event.correlation_id = callback_info->correlationId; event.memalloc_info.num_bytes = params->bytesize; VLOG(3) << "Cuda Malloc/Free observed: " << params->bytesize; collector->AddEvent(std::move(event)); } void AddGenericEventUponApiExit(CuptiTraceCollector *collector, uint32 device_id, CUpti_CallbackId cbid, const CUpti_CallbackData *callback_info, uint64 start_time, uint64 end_time) { CuptiTracerEvent event; event.type = CuptiTracerEventType::Generic; event.source = CuptiTracerEventSource::DriverCallback; event.name = callback_info->functionName; event.start_time_ns = start_time; event.end_time_ns = end_time; event.thread_id = GetCachedTID(); event.device_id = device_id; event.context_id = callback_info->contextUid; event.correlation_id = callback_info->correlationId; collector->AddEvent(std::move(event)); } void AddKernelActivityEvent(CuptiTraceCollector *collector, AnnotationMap *annotation_map, const CUpti_ActivityKernel4 *kernel) { CuptiTracerEvent event; event.type = CuptiTracerEventType::Kernel; event.source = CuptiTracerEventSource::Activity; event.name = kernel->name; event.start_time_ns = kernel->start; event.end_time_ns = kernel->end; event.device_id = kernel->deviceId; event.context_id = kernel->contextId; event.stream_id = kernel->streamId; event.correlation_id = kernel->correlationId; event.annotation = annotation_map->LookUp(event.device_id, event.correlation_id); event.kernel_info.registers_per_thread = kernel->registersPerThread; event.kernel_info.static_shared_memory_usage = kernel->staticSharedMemory; event.kernel_info.dynamic_shared_memory_usage = kernel->dynamicSharedMemory; event.kernel_info.block_x = kernel->blockX; event.kernel_info.block_y = kernel->blockY; event.kernel_info.block_z = kernel->blockZ; event.kernel_info.grid_x = kernel->gridX; event.kernel_info.grid_y = kernel->gridY; event.kernel_info.grid_z = kernel->gridZ; collector->AddEvent(std::move(event)); } void AddMemcpyActivityEvent(CuptiTraceCollector *collector, AnnotationMap *annotation_map, const CUpti_ActivityMemcpy *memcpy) { CuptiTracerEvent event; switch (memcpy->copyKind) { case CUPTI_ACTIVITY_MEMCPY_KIND_HTOD: event.type = CuptiTracerEventType::MemcpyH2D; event.name = "MemcpyH2D"; break; case CUPTI_ACTIVITY_MEMCPY_KIND_DTOH: event.type = CuptiTracerEventType::MemcpyD2H; event.name = "MemcpyD2H"; break; case CUPTI_ACTIVITY_MEMCPY_KIND_DTOD: event.type = CuptiTracerEventType::MemcpyD2D; event.name = "MemcpyD2D"; break; case CUPTI_ACTIVITY_MEMCPY_KIND_PTOP: event.type = CuptiTracerEventType::MemcpyP2P; event.name = "MemcpyP2P"; break; default: event.type = CuptiTracerEventType::MemcpyOther; event.name = "MemcpyOther"; break; } event.source = CuptiTracerEventSource::Activity; event.start_time_ns = memcpy->start; event.end_time_ns = memcpy->end; event.device_id = memcpy->deviceId; event.context_id = memcpy->contextId; event.stream_id = memcpy->streamId; event.correlation_id = memcpy->correlationId; event.annotation = annotation_map->LookUp(event.device_id, event.correlation_id); event.memcpy_info.kind = memcpy->copyKind; event.memcpy_info.num_bytes = memcpy->bytes; event.memcpy_info.destination = memcpy->deviceId; event.memcpy_info.async = memcpy->flags & CUPTI_ACTIVITY_FLAG_MEMCPY_ASYNC; collector->AddEvent(std::move(event)); } // Invokes callback upon peer-2-peer memcpy between different GPU devices. void AddMemcpy2ActivityEvent(CuptiTraceCollector *collector, AnnotationMap *annotation_map, const CUpti_ActivityMemcpy2 *memcpy2) { CuptiTracerEvent event; event.type = CuptiTracerEventType::MemcpyP2P; event.name = "MemcpyP2P"; event.source = CuptiTracerEventSource::Activity; event.start_time_ns = memcpy2->start; event.end_time_ns = memcpy2->end; event.device_id = memcpy2->srcDeviceId; event.context_id = memcpy2->contextId; event.stream_id = memcpy2->streamId; event.correlation_id = memcpy2->correlationId; event.annotation = annotation_map->LookUp(event.device_id, event.correlation_id); event.memcpy_info.kind = CUPTI_ACTIVITY_MEMCPY_KIND_PTOP; event.memcpy_info.num_bytes = memcpy2->bytes; event.memcpy_info.destination = memcpy2->dstDeviceId; event.memcpy_info.async = memcpy2->flags & CUPTI_ACTIVITY_FLAG_MEMCPY_ASYNC; collector->AddEvent(std::move(event)); } void AddCuptiOverheadActivityEvent(CuptiTraceCollector *collector, const CUpti_ActivityOverhead *overhead) { CuptiTracerEvent event; event.type = CuptiTracerEventType::Overhead; event.name = getActivityOverheadKindString(overhead->overheadKind); event.source = CuptiTracerEventSource::Activity; event.start_time_ns = overhead->start; event.end_time_ns = overhead->end; // If the overhead is not related to a device, we assign it to device 0. event.device_id = 0; // NOTE: no correlation id. switch (overhead->objectKind) { case CUPTI_ACTIVITY_OBJECT_UNKNOWN: // Don't know how to deal with such activities because of we need either // attribute it to a GPU stream or a CPU thread. return; case CUPTI_ACTIVITY_OBJECT_THREAD: case CUPTI_ACTIVITY_OBJECT_PROCESS: event.thread_id = overhead->objectId.pt.threadId; break; case CUPTI_ACTIVITY_OBJECT_STREAM: event.stream_id = overhead->objectId.dcs.streamId; ABSL_FALLTHROUGH_INTENDED; case CUPTI_ACTIVITY_OBJECT_DEVICE: case CUPTI_ACTIVITY_OBJECT_CONTEXT: event.device_id = overhead->objectId.dcs.deviceId; break; default: LOG(ERROR) << "Unexpected object kind: " << overhead->objectKind; return; } collector->AddEvent(std::move(event)); } void AddUnifiedMemoryActivityEvent( CuptiTraceCollector *collector, const CUpti_ActivityUnifiedMemoryCounter2 *record) { VLOG(3) << "Cuda Unified Memory Activity, kind: " << record->counterKind << " src: " << record->srcId << " dst: " << record->dstId; CuptiTracerEvent event; event.type = CuptiTracerEventType::UnifiedMemory; event.name = getActivityUnifiedMemoryKindString(record->counterKind); event.source = CuptiTracerEventSource::Activity; event.start_time_ns = record->start; if (record->counterKind == CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_CPU_PAGE_FAULT_COUNT || record->counterKind == CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_THRASHING || record->counterKind == CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_REMOTE_MAP || record->end <= record->start) { // If the end time is not valid, trim it so that it can be shown on the UI. event.end_time_ns = record->start + 1; } else { event.end_time_ns = record->end; } event.device_id = record->srcId; // NOTE: not context id and correlation id. // For visualization purpose, we assign a pseudo stream id for each // record->counterKind of unified memory related events. constexpr int kPseudoStreamId = 0x10000000; event.stream_id = kPseudoStreamId + record->counterKind; event.memcpy_info.kind = CUPTI_ACTIVITY_MEMCPY_KIND_UNKNOWN; // Check whether the activity is byte transfer. if (record->counterKind == CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD || record->counterKind == CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH || record->counterKind == CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOD) { event.memcpy_info.num_bytes = record->value; } else { event.memcpy_info.num_bytes = 0; } event.memcpy_info.destination = record->dstId; event.memcpy_info.async = false; collector->AddEvent(std::move(event)); } } // namespace void AnnotationMap::Add(uint32 device_id, uint32 correlation_id, const string &annotation) { if (annotation.empty()) return; VLOG(3) << "Add annotation: device_id: " << device_id << " correlation_id: " << correlation_id << " annotation: " << annotation; if (device_id >= per_device_map_.size()) return; auto &per_device_map = per_device_map_[device_id]; absl::MutexLock lock(&per_device_map.mutex); if (per_device_map.annotations.size() < max_size_) { per_device_map.correlation_map.emplace( correlation_id, *per_device_map.annotations.insert(annotation).first); } } absl::string_view AnnotationMap::LookUp(uint32 device_id, uint32 correlation_id) { if (device_id >= per_device_map_.size()) return absl::string_view(); auto &per_device_map = per_device_map_[device_id]; absl::MutexLock lock(&per_device_map.mutex); auto it = per_device_map.correlation_map.find(correlation_id); return it != per_device_map.correlation_map.end() ? it->second : absl::string_view(); } /* static */ CuptiTracer *CuptiTracer::GetCuptiTracerSingleton() { static auto *singleton = new CuptiTracer(); return singleton; } bool CuptiTracer::IsAvailable() const { return !activity_tracing_enabled_ && !api_tracing_enabled_; } int CuptiTracer::NumGpus() { static int num_gpus = []() -> int { if (cuInit(0) != CUDA_SUCCESS) { return 0; } int gpu_count; if (cuDeviceGetCount(&gpu_count) != CUDA_SUCCESS) { return 0; } LOG(INFO) << "Profiler found " << gpu_count << " GPUs"; return gpu_count; }(); return num_gpus; } void CuptiTracer::Enable(const CuptiTracerOptions &option, CuptiInterface *cupti_interface, CuptiTraceCollector *collector) { option_ = option; cupti_interface_ = cupti_interface, collector_ = collector; annotation_map_.emplace(option.max_annotation_strings, NumGpus()); EnableApiTracing().IgnoreError(); if (option_->enable_activity_api) { EnableActivityTracing().IgnoreError(); } } void CuptiTracer::Disable() { DisableApiTracing().IgnoreError(); if (option_->enable_activity_api) { DisableActivityTracing().IgnoreError(); } cupti_interface_->CleanUp(); collector_->Flush(); collector_ = nullptr; cupti_interface_ = nullptr; option_.reset(); annotation_map_.reset(); } Status CuptiTracer::EnableApiTracing() { if (api_tracing_enabled_) return Status::OK(); api_tracing_enabled_ = true; VLOG(1) << "Enable subscriber"; RETURN_IF_CUPTI_ERROR(cupti_interface_->Subscribe( &subscriber_, (CUpti_CallbackFunc)ApiCallback, this)); if (!option_->cbids_selected.empty()) { for (auto cbid : option_->cbids_selected) { RETURN_IF_CUPTI_ERROR(cupti_interface_->EnableCallback( 1 /* ENABLE */, subscriber_, CUPTI_CB_DOMAIN_DRIVER_API, cbid)); } } else { // select all callback ids. RETURN_IF_CUPTI_ERROR(cupti_interface_->EnableDomain( 1 /* ENABLE */, subscriber_, CUPTI_CB_DOMAIN_DRIVER_API)); } return Status::OK(); } Status CuptiTracer::DisableApiTracing() { if (!api_tracing_enabled_) return Status::OK(); api_tracing_enabled_ = false; if (!option_->cbids_selected.empty()) { for (auto cbid : option_->cbids_selected) { RETURN_IF_CUPTI_ERROR(cupti_interface_->EnableCallback( 0 /* DISABLE */, subscriber_, CUPTI_CB_DOMAIN_DRIVER_API, cbid)); } } else { RETURN_IF_CUPTI_ERROR(cupti_interface_->EnableDomain( 0 /* DISABLE */, subscriber_, CUPTI_CB_DOMAIN_DRIVER_API)); } VLOG(1) << "Disable subscriber"; RETURN_IF_CUPTI_ERROR(cupti_interface_->Unsubscribe(subscriber_)); return Status::OK(); } Status CuptiTracer::EnableActivityTracing() { if (!option_->activities_selected.empty()) { // Initialize callback functions for Cupti Activity API. VLOG(1) << "Registering CUPTI activity callbacks"; RETURN_IF_CUPTI_ERROR(cupti_interface_->ActivityRegisterCallbacks( AllocCuptiActivityBuffer, FreeCuptiActivityBuffer)); VLOG(1) << "Enabling activity tracing for " << option_->activities_selected.size() << " activities"; for (auto activity : option_->activities_selected) { VLOG(1) << "Enabling activity tracing for: " << activity; if (activity == CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER) { ConfigureActivityUnifiedMemoryCounter(true); } RETURN_IF_CUPTI_ERROR(cupti_interface_->ActivityEnable(activity)); } } activity_tracing_enabled_ = true; return Status::OK(); } Status CuptiTracer::DisableActivityTracing() { if (activity_tracing_enabled_) { VLOG(1) << "Disabling activity tracing for " << option_->activities_selected.size() << " activities"; for (auto activity : option_->activities_selected) { VLOG(1) << "Disabling activity tracing for: " << activity; if (activity == CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER) { ConfigureActivityUnifiedMemoryCounter(false); } RETURN_IF_CUPTI_ERROR(cupti_interface_->ActivityDisable(activity)); } option_->activities_selected.clear(); VLOG(1) << "Flushing CUPTI activity buffer"; RETURN_IF_CUPTI_ERROR( cupti_interface_->ActivityFlushAll(CUPTI_ACTIVITY_FLAG_FLUSH_FORCED)); if (option_->cupti_finalize) { RETURN_IF_CUPTI_ERROR(cupti_interface_->Finalize()); } } activity_tracing_enabled_ = false; return Status::OK(); } uint64 CuptiTracer::GetTimestamp() { uint64_t tsc; if (cupti_interface_ && cupti_interface_->GetTimestamp(&tsc) == CUPTI_SUCCESS) { return tsc; } // Return 0 on error. If an activity timestamp is 0, the activity will be // dropped during time normalization. return 0; } Status CuptiTracer::HandleCallback(CUpti_CallbackDomain domain, CUpti_CallbackId cbid, const CUpti_CallbackData *callback_info) { if (domain != CUPTI_CB_DOMAIN_DRIVER_API) return Status::OK(); if (callback_info->callbackSite == CUPTI_API_ENTER) { // Stash away the current Cupti timestamp into callback_info. *callback_info->correlationData = GetTimestamp(); } else if (callback_info->callbackSite == CUPTI_API_EXIT) { if (callback_info->context == nullptr) { // API callback is called before any CUDA context is created. // This is expected to be rare, and we ignore this case. VLOG(3) << "API callback received before creation of CUDA context\n"; return errors::Internal("cutpi callback without context"); } // Grab timestamp for API exit. API entry timestamp saved in callback_info // data. uint64 end_tsc = GetTimestamp(); uint64 start_tsc = *callback_info->correlationData; // Grab a correct device ID. uint32 device_id = -1; RETURN_IF_CUPTI_ERROR( cupti_interface_->GetDeviceId(callback_info->context, &device_id)); // Set up the map from correlation id to annotation string. const string &annotation = tensorflow::Annotation::CurrentAnnotation(); if (!annotation.empty()) { annotation_map_->Add(device_id, callback_info->correlationId, annotation); } // If we are not collecting CPU events from Callback API, we can return now. if (!option_->required_callback_api_events) { return Status::OK(); } switch (cbid) { case CUPTI_DRIVER_TRACE_CBID_cuLaunchKernel: AddKernelEventUponApiExit(collector_, device_id, callback_info, start_tsc, end_tsc); break; case CUPTI_DRIVER_TRACE_CBID_cuMemcpy: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyAsync: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoD_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoDAsync_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoH_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoHAsync_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoD_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoDAsync_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoH_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoHAsync_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoD_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyDtoA_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyAtoA_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpy2D_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DUnaligned_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpy2DAsync_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpy3D_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpy3DAsync_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoA_v2: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyHtoAAsync_v2: AddNormalMemcpyEventUponApiExit(collector_, device_id, cbid, callback_info, start_tsc, end_tsc); break; case CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeer: case CUPTI_DRIVER_TRACE_CBID_cuMemcpyPeerAsync: AddP2PMemcpyEventUponApiExit(collector_, cupti_interface_, device_id, cbid, callback_info, start_tsc, end_tsc); break; case CUPTI_DRIVER_TRACE_CBID_cuMemAlloc_v2: AddCudaMallocEventUponApiExit(collector_, device_id, cbid, callback_info, start_tsc, end_tsc); break; default: AddGenericEventUponApiExit(collector_, device_id, cbid, callback_info, start_tsc, end_tsc); break; } } // CUPTI_API_EXIT return Status::OK(); } void CuptiTracer::ConfigureActivityUnifiedMemoryCounter(bool enable) { CUpti_ActivityUnifiedMemoryCounterConfig config[2]; // By experiments, currently only measurements from these two activities are // trustworthy. Others like GPU page fault may be problematic. config[0].kind = CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_HTOD; config[1].kind = CUPTI_ACTIVITY_UNIFIED_MEMORY_COUNTER_KIND_BYTES_TRANSFER_DTOH; for (size_t i = 0; i < 2; i++) { config[i].enable = enable; } CUptiResult res; res = cupti_interface_->ActivityConfigureUnifiedMemoryCounter(config, 2); if (res == CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED) { LOG(ERROR) << "Unified memory is not supported on the " "underlying platform.\n"; } else if (res == CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED_ON_DEVICE) { LOG(ERROR) << "Unified memory is not supported on the device.\n"; } else if (res == CUPTI_ERROR_UM_PROFILING_NOT_SUPPORTED_ON_NON_P2P_DEVICES) { LOG(ERROR) << "Unified memory is not supported on the " "non-P2P multi-gpu setup.\n"; } else if (res != CUPTI_SUCCESS) { const char *errstr = ""; cuptiGetResultString(res, &errstr); LOG(ERROR) << "Error while enabling unified memory profiling: " << errstr; } else { VLOG(1) << "Configuring Unified memory profiling: " << res; } } Status CuptiTracer::ProcessActivityBuffer(CUcontext context, uint32_t stream_id, uint8_t *buffer, size_t size) { if (cupti_interface_->Disabled()) return errors::Internal("Disabled."); CUpti_Activity *record = nullptr; while (true) { CUptiResult status = cupti_interface_->ActivityGetNextRecord(buffer, size, &record); if (status == CUPTI_SUCCESS) { switch (record->kind) { case CUPTI_ACTIVITY_KIND_KERNEL: // sequential case CUPTI_ACTIVITY_KIND_CONCURRENT_KERNEL: AddKernelActivityEvent( collector_, &*annotation_map_, reinterpret_cast<CUpti_ActivityKernel4 *>(record)); break; case CUPTI_ACTIVITY_KIND_MEMCPY: AddMemcpyActivityEvent( collector_, &*annotation_map_, reinterpret_cast<CUpti_ActivityMemcpy *>(record)); break; case CUPTI_ACTIVITY_KIND_MEMCPY2: AddMemcpy2ActivityEvent( collector_, &*annotation_map_, reinterpret_cast<CUpti_ActivityMemcpy2 *>(record)); break; case CUPTI_ACTIVITY_KIND_OVERHEAD: AddCuptiOverheadActivityEvent( collector_, reinterpret_cast<CUpti_ActivityOverhead *>(record)); break; case CUPTI_ACTIVITY_KIND_UNIFIED_MEMORY_COUNTER: AddUnifiedMemoryActivityEvent( collector_, reinterpret_cast<CUpti_ActivityUnifiedMemoryCounter2 *>(record)); break; default: LOG(ERROR) << "Activity type " << record->kind << " not supported."; break; } } else if (status == CUPTI_ERROR_MAX_LIMIT_REACHED) { break; } else { return errors::Internal("Parse cupti activity buffer error."); } } // Report dropped records. size_t dropped; RETURN_IF_CUPTI_ERROR(cupti_interface_->ActivityGetNumDroppedRecords( context, stream_id, &dropped)); if (dropped != 0) { uint32 device_id = -1; RETURN_IF_CUPTI_ERROR(cupti_interface_->GetDeviceId(context, &device_id)); collector_->OnEventsDropped("CUpti activity buffer", dropped); } return Status::OK(); } } // namespace profiler } // namespace tensorflow
{'repo_name': 'Xilinx/Vitis-AI', 'stars': '259', 'repo_language': 'C++', 'file_name': 'README.md', 'mime_type': 'text/plain', 'hash': 8558245533936951282, 'source_dataset': 'data'}